Documentation ¶
Index ¶
- type AlarmBeat
- type Banning
- type Config
- type Limits
- type PolicyServer
- func (s *PolicyServer) ApplyLimitPolicy(ip string) bool
- func (s *PolicyServer) ApplyLoginPolicy(addy, ip string) bool
- func (s *PolicyServer) ApplyMalformedPolicy(ip string) bool
- func (s *PolicyServer) ApplyShareID(login string, validShare bool)
- func (s *PolicyServer) ApplySharePolicy(ip string, validShare bool) bool
- func (s *PolicyServer) BanClient(ip string)
- func (s *PolicyServer) CheckInboundIP(ip string) bool
- func (s *PolicyServer) CheckShareID(login string) bool
- func (s *PolicyServer) Get(ip string) *Stats
- func (s *PolicyServer) InForceBanWhiteList(ip string) bool
- func (s *PolicyServer) InIdBlackList(addy string) bool
- func (s *PolicyServer) InitAlarmBeat(beatIntv time.Duration)
- func (s *PolicyServer) IsBanned(ip string) bool
- func (s *PolicyServer) NewStats() *Stats
- func (s *PolicyServer) RefreshBanWhiteList()
- func (s *PolicyServer) RefreshInboundID()
- func (s *PolicyServer) RefreshInboundIP()
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PolicyServer ¶
func Start ¶
func Start(cfg *Config, storage *redis.RedisClient, db *mysql.Database) *PolicyServer
func (*PolicyServer) ApplyLimitPolicy ¶
func (s *PolicyServer) ApplyLimitPolicy(ip string) bool
func (*PolicyServer) ApplyLoginPolicy ¶
func (s *PolicyServer) ApplyLoginPolicy(addy, ip string) bool
func (*PolicyServer) ApplyMalformedPolicy ¶
func (s *PolicyServer) ApplyMalformedPolicy(ip string) bool
func (*PolicyServer) ApplyShareID ¶
func (s *PolicyServer) ApplyShareID(login string, validShare bool)
func (*PolicyServer) ApplySharePolicy ¶
func (s *PolicyServer) ApplySharePolicy(ip string, validShare bool) bool
func (*PolicyServer) BanClient ¶
func (s *PolicyServer) BanClient(ip string)
func (*PolicyServer) CheckInboundIP ¶
func (s *PolicyServer) CheckInboundIP(ip string) bool
func (*PolicyServer) CheckShareID ¶
func (s *PolicyServer) CheckShareID(login string) bool
func (*PolicyServer) Get ¶
func (s *PolicyServer) Get(ip string) *Stats
func (*PolicyServer) InForceBanWhiteList ¶
func (s *PolicyServer) InForceBanWhiteList(ip string) bool
func (*PolicyServer) InIdBlackList ¶
func (s *PolicyServer) InIdBlackList(addy string) bool
func (*PolicyServer) InitAlarmBeat ¶
func (s *PolicyServer) InitAlarmBeat(beatIntv time.Duration)
InitAlarmBeat When the proxy server is turned on for the first time, put all the children who need an alarm.
func (*PolicyServer) IsBanned ¶
func (s *PolicyServer) IsBanned(ip string) bool
func (*PolicyServer) NewStats ¶
func (s *PolicyServer) NewStats() *Stats
func (*PolicyServer) RefreshBanWhiteList ¶
func (s *PolicyServer) RefreshBanWhiteList()
func (*PolicyServer) RefreshInboundID ¶
func (s *PolicyServer) RefreshInboundID()
func (*PolicyServer) RefreshInboundIP ¶
func (s *PolicyServer) RefreshInboundIP()
Click to show internal directories.
Click to hide internal directories.