mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 16:41:17 +08:00
1.重构防爆逻辑,基于IP+UserName锁定(单位时间内,锁定相同IP下的相同用户,其它IP和用户不影响)
2.增加基于用户的全局锁定 3.增加基于IP的全局锁定 4.用户单位时间内的请求频率限制(暂未开放)
This commit is contained in:
@@ -85,10 +85,19 @@ type ServerConfig struct {
|
||||
DisplayError bool `json:"display_error"`
|
||||
ExcludeExportIp bool `json:"exclude_export_ip"`
|
||||
|
||||
MaxBanCount int `json:"max_ban_score"`
|
||||
BanResetTime int `json:"ban_reset_time"`
|
||||
LockTime int `json:"lock_time"`
|
||||
UserStateExpiration int `json:"user_state_expiration"`
|
||||
AntiBruteForce bool `json:"anti_brute_force"`
|
||||
|
||||
MaxBanCount int `json:"max_ban_score"`
|
||||
BanResetTime int `json:"ban_reset_time"`
|
||||
LockTime int `json:"lock_time"`
|
||||
|
||||
MaxGlobalUserBanCount int `json:"max_global_user_ban_count"`
|
||||
GlobalUserBanResetTime int `json:"global_user_ban_reset_time"`
|
||||
GlobalUserLockTime int `json:"global_user_lock_time"`
|
||||
|
||||
MaxGlobalIPBanCount int `json:"max_global_ip_ban_count"`
|
||||
GlobalIPBanResetTime int `json:"global_ip_ban_reset_time"`
|
||||
GlobalIPLockTime int `json:"global_ip_lock_time"`
|
||||
}
|
||||
|
||||
func initServerCfg() {
|
||||
|
Reference in New Issue
Block a user