fix: ipv6 enable logic
This commit is contained in:
parent
0a99fc4d74
commit
bd3c493c9f
2 changed files with 4 additions and 3 deletions
|
@ -94,6 +94,7 @@ func (pp *proxySetProvider) setProxies(proxies []C.Proxy) {
|
|||
if pp.healthCheck.auto() {
|
||||
go pp.healthCheck.check()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func stopProxyProvider(pd *ProxySetProvider) {
|
||||
|
|
|
@ -139,7 +139,7 @@ func updateDNS(c *config.DNS, t *config.Tun) {
|
|||
ProxyServer: c.ProxyServerNameserver,
|
||||
}
|
||||
|
||||
resolver.DisableIPv6 = cfg.IPv6
|
||||
resolver.DisableIPv6 = !cfg.IPv6
|
||||
|
||||
r := dns.NewResolver(cfg)
|
||||
pr := dns.NewProxyServerHostResolver(r)
|
||||
|
@ -246,9 +246,9 @@ func updateSniffer(sniffer *config.Sniffer) {
|
|||
func updateGeneral(general *config.General, force bool) {
|
||||
log.SetLevel(general.LogLevel)
|
||||
tunnel.SetMode(general.Mode)
|
||||
dialer.DisableIPv6 = general.IPv6
|
||||
dialer.DisableIPv6 = !general.IPv6
|
||||
if !dialer.DisableIPv6 {
|
||||
resolver.DisableIPv6 = dialer.DisableIPv6
|
||||
resolver.DisableIPv6 = false
|
||||
} else {
|
||||
log.Infoln("Use IPv6")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue