Skip to content
This repository was archived by the owner on Apr 3, 2021. It is now read-only.

Commit 9a23373

Browse files
committed
improve compatibility of default arguments
The 240.0.0.0/24 subnet does not seem to work well on Windows
1 parent 8b3d04b commit 9a23373

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cmd/tun2socks/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ type CmdArgs struct {
5555
DnsFallback *bool
5656
LogLevel *string
5757
EnableFakeDns *bool
58-
FakeDnsMinIP *string
59-
FakeDnsMaxIP *string
58+
FakeDnsMinIP *string
59+
FakeDnsMaxIP *string
6060
}
6161

6262
type cmdFlag uint
@@ -108,10 +108,10 @@ const (
108108
func main() {
109109
args.Version = flag.Bool("version", false, "Print version")
110110
args.TunName = flag.String("tunName", "tun1", "TUN interface name")
111-
args.TunAddr = flag.String("tunAddr", "240.0.0.2", "TUN interface address")
112-
args.TunGw = flag.String("tunGw", "240.0.0.1", "TUN interface gateway")
111+
args.TunAddr = flag.String("tunAddr", "10.255.0.2", "TUN interface address")
112+
args.TunGw = flag.String("tunGw", "10.255.0.1", "TUN interface gateway")
113113
args.TunMask = flag.String("tunMask", "255.255.255.0", "TUN interface netmask, as for IPv6, it's the prefixlen")
114-
args.TunDns = flag.String("tunDns", "114.114.114.114,223.5.5.5", "DNS resolvers for TUN interface (only need on Windows)")
114+
args.TunDns = flag.String("tunDns", "8.8.8.8,8.8.4.4", "DNS resolvers for TUN interface (only need on Windows)")
115115
args.ProxyType = flag.String("proxyType", "socks", "Proxy handler type, e.g. socks, shadowsocks, v2ray")
116116
args.DelayICMP = flag.Int("delayICMP", 10, "Delay ICMP packets for a short period of time, in milliseconds")
117117
args.LogLevel = flag.String("loglevel", "info", "Logging level. (debug, info, warn, error, none)")

0 commit comments

Comments
 (0)