mirror of
https://github.com/wweir/sower.git
synced 2024-04-21 12:42:15 +00:00
FIx #18, support ipv6
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ password="12345678"
|
||||
server_port="5533"
|
||||
# server_addr="remote-server" # replce it to remote server
|
||||
http_proxy=":8080" # eg: 192.168.0.2:8080
|
||||
dns_server="" # eg: 113.5.5.5:53, Keep empty for dynamic setting from net env
|
||||
dns_server="" # eg: 223.5.5.5:53, Keep empty for dynamic setting from net env
|
||||
client_ip="127.0.0.1" # listen the IP, dns target is the IP
|
||||
# clear_dns_cache="pkill mDNSResponder || true" # Windows: "ipconfig /flushdnss"
|
||||
suggest_level="SPEEDUP" # DISABLE, BLOCK, SPEEDUP
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ func StartDNS(dnsServer, listenIP string, suggestCh chan<- string, level string)
|
||||
|
||||
dhcpCh := make(chan struct{})
|
||||
if dnsServer != "" {
|
||||
if !strings.ContainsRune(dnsServer, ':') {
|
||||
if _, _, err := net.SplitHostPort(dnsServer); err != nil {
|
||||
dnsServer = net.JoinHostPort(dnsServer, "53")
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user