From ae2e6b3631d67a58e1fb92cb90dc3be3466fb406 Mon Sep 17 00:00:00 2001 From: tsosunchia <59512455+tsosunchia@users.noreply.github.com> Date: Wed, 4 Oct 2023 23:42:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9fasttrace=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=A1=8C=E4=B8=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fast_trace/fast_trace ipv6.go | 15 ++++++++++++--- fast_trace/fast_trace.go | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/fast_trace/fast_trace ipv6.go b/fast_trace/fast_trace ipv6.go index fb08fcf..60ec945 100644 --- a/fast_trace/fast_trace ipv6.go +++ b/fast_trace/fast_trace ipv6.go @@ -103,13 +103,20 @@ func (f *FastTracer) testEDU_v6() { f.tracert_v6(TestIPsCollection.Hangzhou.Location, TestIPsCollection.Hangzhou.EDU) } +func (f *FastTracer) testFast_v6() { + f.tracert_v6(TestIPsCollection.Beijing.Location, TestIPsCollection.Beijing.CT163) + f.tracert_v6(TestIPsCollection.Beijing.Location, TestIPsCollection.Beijing.CU169) + f.tracert_v6(TestIPsCollection.Beijing.Location, TestIPsCollection.Beijing.CM) + f.tracert_v6(TestIPsCollection.Beijing.Location, TestIPsCollection.Beijing.EDU) +} + func FastTestv6(tm bool, outEnable bool, paramsFastTrace ParamsFastTrace) { var c string oe = outEnable pFastTracer = paramsFastTrace - fmt.Println("您想测试哪些ISP的路由?\n1. 国内四网\n2. 电信\n3. 联通\n4. 移动\n5. 教育网") + fmt.Println("您想测试哪些ISP的路由?\n1. 国内四网\n2. 电信\n3. 联通\n4. 移动\n5. 教育网\n6. 全部") fmt.Print("请选择选项:") _, err := fmt.Scanln(&c) if err != nil { @@ -135,7 +142,7 @@ func FastTestv6(tm bool, outEnable bool, paramsFastTrace ParamsFastTrace) { switch c { case "1": - ft.testAll_v6() + ft.testFast_v6() case "2": ft.testCT_v6() case "3": @@ -144,7 +151,9 @@ func FastTestv6(tm bool, outEnable bool, paramsFastTrace ParamsFastTrace) { ft.testCM_v6() case "5": ft.testEDU_v6() - default: + case "6": ft.testAll_v6() + default: + ft.testFast_v6() } } diff --git a/fast_trace/fast_trace.go b/fast_trace/fast_trace.go index 729185c..e11afa0 100644 --- a/fast_trace/fast_trace.go +++ b/fast_trace/fast_trace.go @@ -112,7 +112,7 @@ func FastTest(tm bool, outEnable bool, paramsFastTrace ParamsFastTrace) { } } - fmt.Println("您想测试哪些ISP的路由?\n1. 国内四网\n2. 电信\n3. 联通\n4. 移动\n5. 教育网") + fmt.Println("您想测试哪些ISP的路由?\n1. 国内四网\n2. 电信\n3. 联通\n4. 移动\n5. 教育网\n6. 全部") fmt.Print("请选择选项:") _, err = fmt.Scanln(&c) if err != nil { @@ -140,7 +140,7 @@ func FastTest(tm bool, outEnable bool, paramsFastTrace ParamsFastTrace) { switch c { case "1": - ft.testAll() + ft.testFast() case "2": ft.testCT() case "3": @@ -149,8 +149,10 @@ func FastTest(tm bool, outEnable bool, paramsFastTrace ParamsFastTrace) { ft.testCM() case "5": ft.testEDU() - default: + case "6": ft.testAll() + default: + ft.testFast() } } @@ -197,3 +199,10 @@ func (f *FastTracer) testEDU() { // 科技网暂时算在EDU里面,等拿到了足够多的数据再分离出去,单独用于测试 f.tracert(TestIPsCollection.Hefei.Location, TestIPsCollection.Hefei.CST) } + +func (f *FastTracer) testFast() { + f.tracert(TestIPsCollection.Beijing.Location, TestIPsCollection.Beijing.CT163) + f.tracert(TestIPsCollection.Beijing.Location, TestIPsCollection.Beijing.CU169) + f.tracert(TestIPsCollection.Beijing.Location, TestIPsCollection.Beijing.CM) + f.tracert(TestIPsCollection.Beijing.Location, TestIPsCollection.Beijing.EDU) +}