1
0
mirror of https://github.com/fumiama/dnskip.git synced 2026-06-22 13:30:29 +08:00

feat: add -6 option

This commit is contained in:
源文雨
2025-10-06 02:04:56 +08:00
parent 9a0f9442c0
commit a4d153f094
3 changed files with 7 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ import (
"github.com/fumiama/orbyte/pbuf"
"github.com/fumiama/terasu"
"github.com/fumiama/terasu/dns"
"github.com/fumiama/terasu/ip"
"github.com/sirupsen/logrus"
)
@@ -38,6 +39,7 @@ func main() {
fbsrv := flag.String("fb", "127.0.0.1:53", "fallback to DNS UDP port")
debug := flag.Bool("d", false, "show debug log")
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)")
flag.Parse()
@@ -58,6 +60,8 @@ func main() {
logrus.Infoln("Set fallback server to", fallback)
}
logrus.Infoln("Use ipv6 servers:", ip.IsIPv6Available)
addrport, err := netip.ParseAddrPort(*iphost)
if err != nil {
logrus.Fatal("ParseAddrPort err:", err)