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:
4
main.go
4
main.go
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user