diff --git a/cmd/cmd.go b/cmd/cmd.go index ab2e7997..f1af1f7d 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -114,6 +114,7 @@ func Excute() { Timeout: time.Duration(*timeout) * time.Millisecond, File: *file, DontFragment: *dontFragment, + Dot: *dot, } fastTrace.FastTest(*tcp, *output, paramsFastTrace) diff --git a/fast_trace/fast_trace ipv6.go b/fast_trace/fast_trace ipv6.go index dc633b30..68a0ad25 100644 --- a/fast_trace/fast_trace ipv6.go +++ b/fast_trace/fast_trace ipv6.go @@ -20,7 +20,8 @@ func (f *FastTracer) tracert_v6(location string, ispCollection ISPCollection) { fmt.Fprintf(color.Output, "%s\n", color.New(color.FgYellow, color.Bold).Sprintf("『%s %s 』", location, ispCollection.ISPName)) fmt.Printf("traceroute to %s, %d hops max, %d byte packets\n", ispCollection.IPv6, f.ParamsFastTrace.MaxHops, f.ParamsFastTrace.PktSize) - ip, err := util.DomainLookUp(ispCollection.IPv6, "6", "", true) + // ip, err := util.DomainLookUp(ispCollection.IPv6, "6", "", true) + ip, err := util.DomainLookUp(ispCollection.IPv6, "6", f.ParamsFastTrace.Dot, true) if err != nil { log.Fatal(err) } @@ -126,7 +127,7 @@ func FastTestv6(tm bool, outEnable bool, paramsFastTrace ParamsFastTrace) { oe = outEnable - fmt.Println("您想测试哪些ISP的路由?\n1. 国内四网\n2. 电信\n3. 联通\n4. 移动\n5. 教育网\n6. 全部") + fmt.Println("您想测试哪些ISP的路由?\n1. 北京三网快速测试\n2. 全国电信\n3. 全国联通\n4. 全国移动\n5. 全国教育网\n6. 全国五网") fmt.Print("请选择选项:") _, err := fmt.Scanln(&c) if err != nil { diff --git a/fast_trace/fast_trace.go b/fast_trace/fast_trace.go index 778b51c5..5824a468 100644 --- a/fast_trace/fast_trace.go +++ b/fast_trace/fast_trace.go @@ -35,6 +35,7 @@ type ParamsFastTrace struct { Timeout time.Duration File string DontFragment bool + Dot string } type IpListElement struct { @@ -49,7 +50,8 @@ func (f *FastTracer) tracert(location string, ispCollection ISPCollection) { fmt.Fprintf(color.Output, "%s\n", color.New(color.FgYellow, color.Bold).Sprintf("『%s %s 』", location, ispCollection.ISPName)) fmt.Printf("traceroute to %s, %d hops max, %d byte packets\n", ispCollection.IP, f.ParamsFastTrace.MaxHops, f.ParamsFastTrace.PktSize) - ip, err := util.DomainLookUp(ispCollection.IP, "4", "", true) + // ip, err := util.DomainLookUp(ispCollection.IP, "4", "", true) + ip, err := util.DomainLookUp(ispCollection.IP, "4", f.ParamsFastTrace.Dot, true) if err != nil { log.Fatal(err) }