Documentation
¶
Index ¶
- Variables
- func CleanBanRecord(force bool)
- func GetBestBridge(ip string) (bridgeType, bridgeAddr, bridgeIp, bridgePort string)
- func IfLoginFail(key string, explicit bool)
- func InitLogin()
- func IsLoginBan(key string, ti int64) bool
- func RemoveAllLoginBan()
- func RemoveLoginBan(key string) bool
- func RemoveRepeatedElement(arr []string) (newArr []string)
- type AuthController
- type BanRecord
- type BaseController
- func (s *BaseController) AjaxErr(str string)
- func (s *BaseController) AjaxOk(str string)
- func (s *BaseController) AjaxOkWithId(str string, id int)
- func (s *BaseController) AjaxTable(list interface{}, cnt int, recordsTotal int, kwargs map[string]interface{})
- func (s *BaseController) CheckUserAuth()
- func (s *BaseController) GetAjaxParams() (start, limit int)
- func (s *BaseController) GetBoolNoErr(key string, def ...bool) bool
- func (s *BaseController) GetIntNoErr(key string, def ...int) int
- func (s *BaseController) Prepare()
- func (s *BaseController) SetInfo(name string)
- func (s *BaseController) SetType(name string)
- type ClientController
- func (s *ClientController) Add()
- func (s *ClientController) ChangeStatus()
- func (s *ClientController) Clear()
- func (s *ClientController) Del()
- func (s *ClientController) Edit()
- func (s *ClientController) GetClient()
- func (s *ClientController) List()
- func (s *ClientController) PingClient()
- func (s *ClientController) Qr()
- type GlobalController
- type IndexController
- func (s *IndexController) Add()
- func (s *IndexController) AddHost()
- func (s *IndexController) All()
- func (s *IndexController) Clear()
- func (s *IndexController) ClearHost()
- func (s *IndexController) Del()
- func (s *IndexController) DelHost()
- func (s *IndexController) Edit()
- func (s *IndexController) EditHost()
- func (s *IndexController) File()
- func (s *IndexController) GetHost()
- func (s *IndexController) GetOneTunnel()
- func (s *IndexController) GetTunnel()
- func (s *IndexController) Help()
- func (s *IndexController) Host()
- func (s *IndexController) HostList()
- func (s *IndexController) Http()
- func (s *IndexController) Index()
- func (s *IndexController) Mix()
- func (s *IndexController) P2p()
- func (s *IndexController) Secret()
- func (s *IndexController) Socks5()
- func (s *IndexController) Start()
- func (s *IndexController) StartHost()
- func (s *IndexController) Stats()
- func (s *IndexController) Stop()
- func (s *IndexController) StopHost()
- func (s *IndexController) Tcp()
- func (s *IndexController) Udp()
- type LoginController
Constants ¶
This section is empty.
Variables ¶
View Source
var BanTime int64 = 5
View Source
var IpBanTime int64 = 180
View Source
var MaxFailTimes int = 10
View Source
var MaxLoginBody int64 = 1024
View Source
var MaxSkew int64 = 5 * 60 * 1000
View Source
var UserBanTime int64 = 3600
Functions ¶
func CleanBanRecord ¶ added in v0.34.4
func CleanBanRecord(force bool)
func GetBestBridge ¶ added in v0.29.3
func IfLoginFail ¶ added in v0.29.30
func IsLoginBan ¶ added in v0.29.30
func RemoveLoginBan ¶ added in v0.34.4
RemoveLoginBan 手动解除指定key的封禁
func RemoveRepeatedElement ¶
Types ¶
type AuthController ¶
type AuthController struct {
beego.Controller
}
func (*AuthController) GetAuthKey ¶
func (s *AuthController) GetAuthKey()
func (*AuthController) GetCert ¶ added in v0.29.15
func (s *AuthController) GetCert()
func (*AuthController) GetTime ¶
func (s *AuthController) GetTime()
type BanRecord ¶ added in v0.34.4
type BanRecord struct {
Key string `json:"key"`
FailTimes int `json:"fail_times"`
LastLoginTime string `json:"last_login_time"`
IsBanned bool `json:"is_banned"`
BanType string `json:"ban_type"`
}
BanRecord 封禁记录,用于展示给管理员
func GetLoginBanList ¶ added in v0.34.4
func GetLoginBanList() []BanRecord
GetLoginBanList 获取当前所有封禁记录
type BaseController ¶
type BaseController struct {
beego.Controller
// contains filtered or unexported fields
}
func (*BaseController) AjaxErr ¶
func (s *BaseController) AjaxErr(str string)
func (*BaseController) AjaxOk ¶
func (s *BaseController) AjaxOk(str string)
func (*BaseController) AjaxOkWithId ¶
func (s *BaseController) AjaxOkWithId(str string, id int)
func (*BaseController) AjaxTable ¶
func (s *BaseController) AjaxTable(list interface{}, cnt int, recordsTotal int, kwargs map[string]interface{})
func (*BaseController) CheckUserAuth ¶
func (s *BaseController) CheckUserAuth()
func (*BaseController) GetAjaxParams ¶
func (s *BaseController) GetAjaxParams() (start, limit int)
func (*BaseController) GetBoolNoErr ¶
func (s *BaseController) GetBoolNoErr(key string, def ...bool) bool
func (*BaseController) GetIntNoErr ¶
func (s *BaseController) GetIntNoErr(key string, def ...int) int
func (*BaseController) Prepare ¶
func (s *BaseController) Prepare()
func (*BaseController) SetInfo ¶
func (s *BaseController) SetInfo(name string)
func (*BaseController) SetType ¶
func (s *BaseController) SetType(name string)
type ClientController ¶
type ClientController struct {
BaseController
}
func (*ClientController) Add ¶
func (s *ClientController) Add()
func (*ClientController) ChangeStatus ¶
func (s *ClientController) ChangeStatus()
func (*ClientController) Clear ¶ added in v0.29.0
func (s *ClientController) Clear()
func (*ClientController) Del ¶
func (s *ClientController) Del()
func (*ClientController) Edit ¶
func (s *ClientController) Edit()
func (*ClientController) GetClient ¶
func (s *ClientController) GetClient()
func (*ClientController) List ¶
func (s *ClientController) List()
func (*ClientController) PingClient ¶ added in v0.33.4
func (s *ClientController) PingClient()
func (*ClientController) Qr ¶ added in v0.29.30
func (s *ClientController) Qr()
type GlobalController ¶
type GlobalController struct {
BaseController
}
func (*GlobalController) BanClean ¶ added in v0.34.4
func (s *GlobalController) BanClean()
BanClean 强制清理失效条目
func (*GlobalController) BanList ¶ added in v0.34.4
func (s *GlobalController) BanList()
BanList 封禁列表管理页面
func (*GlobalController) Index ¶
func (s *GlobalController) Index()
func (*GlobalController) Save ¶
func (s *GlobalController) Save()
func (*GlobalController) Unban ¶ added in v0.34.4
func (s *GlobalController) Unban()
Unban 解除指定key的封禁
func (*GlobalController) UnbanAll ¶ added in v0.34.4
func (s *GlobalController) UnbanAll()
UnbanAll 清除所有封禁记录
type IndexController ¶
type IndexController struct {
BaseController
}
func (*IndexController) Add ¶
func (s *IndexController) Add()
func (*IndexController) AddHost ¶
func (s *IndexController) AddHost()
func (*IndexController) All ¶
func (s *IndexController) All()
func (*IndexController) Clear ¶ added in v0.29.0
func (s *IndexController) Clear()
func (*IndexController) ClearHost ¶ added in v0.29.0
func (s *IndexController) ClearHost()
func (*IndexController) Del ¶
func (s *IndexController) Del()
func (*IndexController) DelHost ¶
func (s *IndexController) DelHost()
func (*IndexController) Edit ¶
func (s *IndexController) Edit()
func (*IndexController) EditHost ¶
func (s *IndexController) EditHost()
func (*IndexController) File ¶
func (s *IndexController) File()
func (*IndexController) GetHost ¶
func (s *IndexController) GetHost()
func (*IndexController) GetOneTunnel ¶
func (s *IndexController) GetOneTunnel()
func (*IndexController) GetTunnel ¶
func (s *IndexController) GetTunnel()
func (*IndexController) Help ¶
func (s *IndexController) Help()
func (*IndexController) Host ¶
func (s *IndexController) Host()
func (*IndexController) HostList ¶
func (s *IndexController) HostList()
func (*IndexController) Http ¶
func (s *IndexController) Http()
func (*IndexController) Index ¶
func (s *IndexController) Index()
func (*IndexController) Mix ¶ added in v0.29.0
func (s *IndexController) Mix()
func (*IndexController) P2p ¶
func (s *IndexController) P2p()
func (*IndexController) Secret ¶
func (s *IndexController) Secret()
func (*IndexController) Socks5 ¶
func (s *IndexController) Socks5()
func (*IndexController) Start ¶
func (s *IndexController) Start()
func (*IndexController) StartHost ¶ added in v0.26.43
func (s *IndexController) StartHost()
func (*IndexController) Stats ¶ added in v0.29.5
func (s *IndexController) Stats()
func (*IndexController) Stop ¶
func (s *IndexController) Stop()
func (*IndexController) StopHost ¶ added in v0.26.43
func (s *IndexController) StopHost()
func (*IndexController) Tcp ¶
func (s *IndexController) Tcp()
func (*IndexController) Udp ¶
func (s *IndexController) Udp()
type LoginController ¶
type LoginController struct {
beego.Controller
}
func (*LoginController) Index ¶
func (s *LoginController) Index()
func (*LoginController) Out ¶
func (s *LoginController) Out()
func (*LoginController) Register ¶
func (s *LoginController) Register()
func (*LoginController) Verify ¶
func (s *LoginController) Verify()
Click to show internal directories.
Click to hide internal directories.