From 8c0e8732cc490e4de106fefaf9c5f43cb395e303 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 10 Nov 2020 15:55:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 18 +++++------------- version.txt | 1 - 2 files changed, 5 insertions(+), 14 deletions(-) delete mode 100644 version.txt diff --git a/main.go b/main.go index b7a7c0c..ded9eb7 100644 --- a/main.go +++ b/main.go @@ -22,8 +22,8 @@ var printResult int func init() { var downloadSecond int64 var printVersion bool - const help = ` -CloudflareSpeedTest + var help = ` +CloudflareSpeedTest ` + version + ` 测试 Cloudflare CDN 所有 IP 的延迟和速度,获取最快 IP! https://github.com/XIU2/CloudflareSpeedTest @@ -51,16 +51,7 @@ https://github.com/XIU2/CloudflareSpeedTest -v 打印程序版本 -h - 打印帮助说明 - -示例: - 注意:不需要加上所有参数(以下仅为示例),按需选择,参数前后顺序随意 - CloudflareST -n 500 -t 4 -dn 20 -dt 5 - CloudflareST -n 500 -t 4 -dn 20 -dt 5 -p 0 -f "ip.txt" -dd - CloudflareST -n 500 -t 4 -dn 20 -dt 5 -p 20 -f "ip.txt" -o " " -dd - CloudflareST -n 500 -t 4 -dn 20 -dt 5 -f "ip.txt" -o "result.csv" -dd - CloudflareST -n 500 -t 4 -dn 20 -dt 5 -f "C:\abc\ip.txt" -o "C:\abc\result.csv" -dd - CloudflareST -n 500 -t 4 -dn 20 -dt 5 -url https://cf.xiu2.xyz/Github/CloudflareSpeedTest.png` + 打印帮助说明` flag.IntVar(&pingRoutine, "n", 500, "测速线程数量") flag.IntVar(&pingTime, "t", 4, "延迟测速次数") @@ -116,11 +107,12 @@ func main() { failTime = pingTime // 设置接收次数 ips := loadFirstIPOfRangeFromFile(ipFile) // 读入IP pingCount := len(ips) * pingTime // 计算进度条总数(IP*测试次数) - bar := pb.Full.Start(pingCount) // 进度条总数 + bar := pb.Simple.Start(pingCount) // 进度条总数 var wg sync.WaitGroup var mu sync.Mutex var data = make([]CloudflareIPData, 0) + fmt.Println("# XIU2/CloudflareSpeedTest " + version + "\n") fmt.Println("开始延迟测速(模式:TCP,端口:" + strconv.Itoa(tcpPort) + "):") control := make(chan bool, pingRoutine) for _, ip := range ips { diff --git a/version.txt b/version.txt deleted file mode 100644 index 23c38c2..0000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -v1.3.1 \ No newline at end of file