From 14dfc2c60cfc50e25a87244526644db45f99ebed Mon Sep 17 00:00:00 2001 From: Qetesh <4559341+Qetesh@users.noreply.github.com> Date: Sun, 7 Jul 2024 23:23:09 +0800 Subject: [PATCH] fix url test error --- CloudflareSpeedTest | 2 +- README.md | 4 ++-- main.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CloudflareSpeedTest b/CloudflareSpeedTest index d96281a..23b4f26 160000 --- a/CloudflareSpeedTest +++ b/CloudflareSpeedTest @@ -1 +1 @@ -Subproject commit d96281af1ff66267151c39631ad38f9f045e439f +Subproject commit 23b4f260e78902f88d74cc9638cbccec443ce062 diff --git a/README.md b/README.md index fe3c0b0..53a50c4 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,9 @@ CDN_bestIP 是一个使用 Python 编写的项目,自动获取 CDN 平台最 - **可使用自建服务器,指定测速链接,`stURL` 变量设置自定义 url 测速** 设置系统环境变量 -> stUrl(可选,可通过`dd if=/dev/zero of=100MB.test bs=1M count=100`在网站根目录生成测试文件) +> stUrl(可选,可通过`dd if=/dev/zero of=output.zip bs=1M count=210`在网站根目录生成测试文件) > -> 测试Url连接为:`https://xx.xx.net/100MB.test` +> 测试Url连接为:`https://xx.xx.net/output.zip` > > 如服务测速信息与cloudflare配置如下: > diff --git a/main.py b/main.py index 87ddd5f..9577a09 100644 --- a/main.py +++ b/main.py @@ -76,7 +76,7 @@ def get_fastest_ip(): # 执行文件添加执行权限 os.chmod(CloudflareSTDir + '/CloudflareST', 0o755) # 执行CloudflareST,进行测速优选 - # ./CloudflareST -httping -f ip.txt -tl 150 -p 0 -url https://d20c1iz4b4gn9p.cloudfront.net/100m.test -o result.csv + # ./CloudflareST -httping -f ip.txt -tl 150 -p 0 -url https://speed.cloudflare.com/__down?bytes=200000000 -o result.csv print(time.strftime("%Y/%m/%d %H:%M:%S", time.localtime()), '进行', cdnProvider, ' IP优选') sturl_none_shell = shlex.split('./CloudflareST -f ip.txt -tl 150 -p 0 -dd -o result.csv')