1
0
mirror of https://github.com/fumiama/dnskip.git synced 2026-06-24 06:40:23 +08:00

feat: add -to option

This commit is contained in:
源文雨
2025-10-06 12:22:02 +08:00
parent a4d153f094
commit 3dc141a443
3 changed files with 6 additions and 3 deletions

View File

@@ -38,6 +38,7 @@ func main() {
iphost := flag.String("l", "127.0.0.1:5345", "listen DNS UDP port")
fbsrv := flag.String("fb", "127.0.0.1:53", "fallback to DNS UDP port")
debug := flag.Bool("d", false, "show debug log")
timeout := flag.Uint("to", 4, "dial timeout in sec")
flag.BoolVar(&forcefb, "ffb", false, "force using fallback")
flag.BoolVar(&ip.IsIPv6Available, "6", false, "use ipv6 servers")
frag := flag.Uint("frag", 3, "TLS first fragemt size (0 to disable)")
@@ -60,6 +61,8 @@ func main() {
logrus.Infoln("Set fallback server to", fallback)
}
dns.SetTimeout(time.Second * time.Duration(*timeout))
logrus.Infoln("Use ipv6 servers:", ip.IsIPv6Available)
addrport, err := netip.ParseAddrPort(*iphost)