From 0f8a646d718a10da5c2ea124b179894a75f1a9bc Mon Sep 17 00:00:00 2001 From: tsosunchia <59512455+tsosunchia@users.noreply.github.com> Date: Tue, 15 Apr 2025 16:08:11 +0800 Subject: [PATCH] =?UTF-8?q?fasttrace=20=E5=A2=9E=E5=8A=A0=E4=B8=8A?= =?UTF-8?q?=E6=B5=B7/=E5=B9=BF=E5=B7=9E=E5=8D=95=E7=8B=AC=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fast_trace/fast_trace ipv6.go | 32 ++++++++++++++++++++++++-------- fast_trace/fast_trace.go | 32 ++++++++++++++++++++++++-------- 2 files changed, 48 insertions(+), 16 deletions(-) diff --git a/fast_trace/fast_trace ipv6.go b/fast_trace/fast_trace ipv6.go index 0ec77bd..15c9a71 100644 --- a/fast_trace/fast_trace ipv6.go +++ b/fast_trace/fast_trace ipv6.go @@ -116,7 +116,7 @@ func (f *FastTracer) testEDU_v6() { f.tracert_v6(TestIPsCollection.Beijing.Location, TestIPsCollection.Beijing.CST) } -func (f *FastTracer) testFast_v6() { +func (f *FastTracer) testFastBJ_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) @@ -124,12 +124,24 @@ func (f *FastTracer) testFast_v6() { //f.tracert_v6(TestIPsCollection.Beijing.Location, TestIPsCollection.Beijing.CST) } +func (f *FastTracer) testFastSH_v6() { + f.tracert_v6(TestIPsCollection.Shanghai.Location, TestIPsCollection.Beijing.CT163) + f.tracert_v6(TestIPsCollection.Shanghai.Location, TestIPsCollection.Beijing.CU169) + f.tracert_v6(TestIPsCollection.Shanghai.Location, TestIPsCollection.Beijing.CM) +} + +func (f *FastTracer) testFastGZ_v6() { + f.tracert_v6(TestIPsCollection.Guangzhou.Location, TestIPsCollection.Beijing.CT163) + f.tracert_v6(TestIPsCollection.Guangzhou.Location, TestIPsCollection.Beijing.CU169) + f.tracert_v6(TestIPsCollection.Guangzhou.Location, TestIPsCollection.Beijing.CM) +} + func FastTestv6(traceMode trace.Method, outEnable bool, paramsFastTrace ParamsFastTrace) { var c string oe = outEnable - fmt.Println("您想测试哪些ISP的路由?\n1. 北京三网快速测试\n2. 全国电信\n3. 全国联通\n4. 全国移动\n5. 全国教育网\n6. 全国五网") + fmt.Println("您想测试哪些ISP的路由?\n1. 北京三网快速测试\n2. 上海三网快速测试\n3. 广州三网快速测试\n4. 全国电信\n5. 全国联通\n6. 全国移动\n7. 全国教育网\n8. 全国五网") fmt.Print("请选择选项:") _, err := fmt.Scanln(&c) if err != nil { @@ -159,18 +171,22 @@ func FastTestv6(traceMode trace.Method, outEnable bool, paramsFastTrace ParamsFa switch c { case "1": - ft.testFast_v6() + ft.testFastBJ_v6() case "2": - ft.testCT_v6() + ft.testFastSH_v6() case "3": - ft.testCU_v6() + ft.testFastGZ_v6() case "4": - ft.testCM_v6() + ft.testCT_v6() case "5": - ft.testEDU_v6() + ft.testCU_v6() case "6": + ft.testCM_v6() + case "7": + ft.testEDU_v6() + case "8": ft.testAll_v6() default: - ft.testFast_v6() + ft.testFastBJ_v6() } } diff --git a/fast_trace/fast_trace.go b/fast_trace/fast_trace.go index 3e9f134..f9e8cd9 100644 --- a/fast_trace/fast_trace.go +++ b/fast_trace/fast_trace.go @@ -162,7 +162,7 @@ func FastTest(traceMode trace.Method, outEnable bool, paramsFastTrace ParamsFast } } - fmt.Println("您想测试哪些ISP的路由?\n1. 北京三网快速测试\n2. 全国电信\n3. 全国联通\n4. 全国移动\n5. 全国教育网\n6. 全国五网") + fmt.Println("您想测试哪些ISP的路由?\n1. 北京三网快速测试\n2. 上海三网快速测试\n3. 广州三网快速测试\n4. 全国电信\n5. 全国联通\n6. 全国移动\n7. 全国教育网\n8. 全国五网") fmt.Print("请选择选项:") _, err = fmt.Scanln(&c) if err != nil { @@ -192,19 +192,23 @@ func FastTest(traceMode trace.Method, outEnable bool, paramsFastTrace ParamsFast switch c { case "1": - ft.testFast() + ft.testFastBJ() case "2": - ft.testCT() + ft.testFastSH() case "3": - ft.testCU() + ft.testFastGZ() case "4": - ft.testCM() + ft.testCT() case "5": - ft.testEDU() + ft.testCU() case "6": + ft.testCM() + case "7": + ft.testEDU() + case "8": ft.testAll() default: - ft.testFast() + ft.testFastBJ() } } @@ -430,10 +434,22 @@ func (f *FastTracer) testEDU() { f.tracert(TestIPsCollection.Hefei.Location, TestIPsCollection.Hefei.CST) } -func (f *FastTracer) testFast() { +func (f *FastTracer) testFastBJ() { 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) //f.tracert(TestIPsCollection.Beijing.Location, TestIPsCollection.Beijing.CST) } + +func (f *FastTracer) testFastSH() { + f.tracert(TestIPsCollection.Shanghai.Location, TestIPsCollection.Beijing.CT163) + f.tracert(TestIPsCollection.Shanghai.Location, TestIPsCollection.Beijing.CU169) + f.tracert(TestIPsCollection.Shanghai.Location, TestIPsCollection.Beijing.CM) +} + +func (f *FastTracer) testFastGZ() { + f.tracert(TestIPsCollection.Guangzhou.Location, TestIPsCollection.Beijing.CT163) + f.tracert(TestIPsCollection.Guangzhou.Location, TestIPsCollection.Beijing.CU169) + f.tracert(TestIPsCollection.Guangzhou.Location, TestIPsCollection.Beijing.CM) +}