config: drop multi-upstream-mode

This commit is contained in:
Simon Ser 2022-08-05 19:58:22 +02:00
parent 085f5c17a4
commit dde4ee9518
4 changed files with 0 additions and 19 deletions

View File

@ -90,7 +90,6 @@ func loadConfig() (*config.Server, *soju.Config, error) {
HTTPOrigins: raw.HTTPOrigins,
AcceptProxyIPs: raw.AcceptProxyIPs,
MaxUserNetworks: raw.MaxUserNetworks,
MultiUpstream: raw.MultiUpstream,
UpstreamUserIPs: raw.UpstreamUserIPs,
MOTD: motd,
}

View File

@ -58,7 +58,6 @@ type Server struct {
AcceptProxyIPs IPSet
MaxUserNetworks int
MultiUpstream bool
UpstreamUserIPs []*net.IPNet
}
@ -77,7 +76,6 @@ func Defaults() *Server {
Driver: "memory",
},
MaxUserNetworks: -1,
MultiUpstream: true,
}
}
@ -159,16 +157,6 @@ func parse(cfg scfg.Block) (*Server, error) {
if srv.MaxUserNetworks, err = strconv.Atoi(max); err != nil {
return nil, fmt.Errorf("directive %q: %v", d.Name, err)
}
case "multi-upstream-mode":
var str string
if err := d.ParseParams(&str); err != nil {
return nil, err
}
v, err := strconv.ParseBool(str)
if err != nil {
return nil, fmt.Errorf("directive %q: %v", d.Name, err)
}
srv.MultiUpstream = v
case "upstream-user-ip":
if len(srv.UpstreamUserIPs) > 0 {
return nil, fmt.Errorf("directive %q: can only be specified once", d.Name)

View File

@ -161,10 +161,6 @@ The following directives are supported:
Path to the MOTD file. The bouncer MOTD is sent to clients which aren't
bound to a specific network. By default, no MOTD is sent.
*multi-upstream-mode* true|false
Globally enable or disable multi-upstream mode. By default, multi-upstream
mode is enabled.
*upstream-user-ip* <cidr...>
Enable per-user IP addresses. One IPv4 range and/or one IPv6 range can be
specified in CIDR notation. One IP address per range will be assigned to

View File

@ -139,7 +139,6 @@ type Config struct {
HTTPOrigins []string
AcceptProxyIPs config.IPSet
MaxUserNetworks int
MultiUpstream bool
MOTD string
UpstreamUserIPs []*net.IPNet
}
@ -183,7 +182,6 @@ func NewServer(db database.Database) *Server {
srv.config.Store(&Config{
Hostname: "localhost",
MaxUserNetworks: -1,
MultiUpstream: true,
})
return srv
}