feat(publicip): PUBLICIP_ENABLED replaces PUBLICIP_PERIOD
- No point periodically fetch the public IP address. Could not find anything mentioning why this was added. - Simplification of the publicip loop code - `PUBLICIP_ENABLED` (on, off) can be set to enable or not public ip data fetching on VPN connection - `PUBLICIP_PERIOD=0` still works to indicate to disable public ip fetching - `PUBLICIP_PERIOD` != 0 means to enable public ip fetching - Warnings logged when using `PUBLICIP_PERIOD`
This commit is contained in:
@@ -197,14 +197,16 @@ func (s *Settings) Read(r *reader.Reader, warner Warner) (err error) {
|
||||
"health": s.Health.Read,
|
||||
"http proxy": s.HTTPProxy.read,
|
||||
"log": s.Log.read,
|
||||
"public ip": s.PublicIP.read,
|
||||
"shadowsocks": s.Shadowsocks.read,
|
||||
"storage": s.Storage.read,
|
||||
"system": s.System.read,
|
||||
"updater": s.Updater.read,
|
||||
"version": s.Version.read,
|
||||
"VPN": s.VPN.read,
|
||||
"profiling": s.Pprof.Read,
|
||||
"public ip": func(r *reader.Reader) error {
|
||||
return s.PublicIP.read(r, warner)
|
||||
},
|
||||
"shadowsocks": s.Shadowsocks.read,
|
||||
"storage": s.Storage.read,
|
||||
"system": s.System.read,
|
||||
"updater": s.Updater.read,
|
||||
"version": s.Version.read,
|
||||
"VPN": s.VPN.read,
|
||||
"profiling": s.Pprof.Read,
|
||||
}
|
||||
|
||||
for name, read := range readFunctions {
|
||||
|
||||
Reference in New Issue
Block a user