1
0
Fork 0
forked from External/ergo

Add automated client connection limiting

This commit is contained in:
Daniel Oaks 2016-10-23 23:05:00 +10:00
parent 1092caa190
commit a404bf83d1
6 changed files with 202 additions and 10 deletions

View file

@ -89,6 +89,13 @@ func (conf *OperConfig) PasswordBytes() []byte {
return bytes
}
type ConnectionLimitsConfig struct {
CidrLenIPv4 int `yaml:"cidr-len-ipv4"`
CidrLenIPv6 int `yaml:"cidr-len-ipv6"`
IPsPerCidr int `yaml:"ips-per-subnet"`
Exempted []string
}
type Config struct {
Network struct {
Name string
@ -96,14 +103,15 @@ type Config struct {
Server struct {
PassConfig
Password string
Name string
Listen []string
Wslisten string `yaml:"ws-listen"`
TLSListeners map[string]*TLSListenConfig `yaml:"tls-listeners"`
CheckIdent bool `yaml:"check-ident"`
Log string
MOTD string
Password string
Name string
Listen []string
Wslisten string `yaml:"ws-listen"`
TLSListeners map[string]*TLSListenConfig `yaml:"tls-listeners"`
CheckIdent bool `yaml:"check-ident"`
Log string
MOTD string
ConnectionLimits ConnectionLimitsConfig `yaml:"connection-limits"`
}
Datastore struct {