mirror of
https://github.com/XIU2/CloudflareSpeedTest.git
synced 2026-03-08 07:35:52 +08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2de42f8d30 | ||
|
|
bcbf7f0e2a | ||
|
|
f735c0f5b3 | ||
|
|
7fbe1d1b56 | ||
|
|
6eaacd6b2c | ||
|
|
b955387787 | ||
|
|
e57e9d3897 | ||
|
|
801dd53774 | ||
|
|
e03a371e19 |
49
README.md
49
README.md
@@ -25,7 +25,7 @@
|
||||
|
||||
### 下载运行
|
||||
|
||||
1. 下载编译好的可执行文件( [Github Releases](https://github.com/XIU2/CloudflareSpeedTest/releases) / [蓝奏云](https://pan.lanpw.com/b0742hkxe) )并解压。
|
||||
1. 下载编译好的可执行文件( [Github Releases](https://github.com/XIU2/CloudflareSpeedTest/releases) / [蓝奏云](https://xiu.lanzoub.com/b0742hkxe) )并解压。
|
||||
2. 双击运行 `cfst.exe` 文件(Windows 系统),等待测速完成...
|
||||
|
||||
<details>
|
||||
@@ -33,7 +33,8 @@
|
||||
|
||||
****
|
||||
|
||||
通过scoop安装:
|
||||
如果你有 scoop(Windows 下的命令行安装程序),则可以这样安装:
|
||||
|
||||
```sh
|
||||
# 添加最多人使用的中文软件包仓库:dorado
|
||||
scoop bucket add dorado https://github.com/chawyehsu/dorado
|
||||
@@ -60,11 +61,11 @@ cd cfst
|
||||
# 下载 CFST 压缩包(自行根据需求替换 URL 中 [版本号] 和 [文件名])
|
||||
wget -N https://github.com/XIU2/CloudflareSpeedTest/releases/download/v2.3.4/cfst_linux_amd64.tar.gz
|
||||
# 如果你是在国内网络环境中下载,那么请使用下面这几个镜像加速之一:
|
||||
# wget -N https://ghfast.top/https://github.com/XIU2/CloudflareSpeedTest/releases/download/v2.3.4/cfst_linux_arm64.tar.gz
|
||||
# wget -N https://wget.la/https://github.com/XIU2/CloudflareSpeedTest/releases/download/v2.3.4/cfst_linux_arm64.tar.gz
|
||||
# wget -N https://ghproxy.net/https://github.com/XIU2/CloudflareSpeedTest/releases/download/v2.3.4/cfst_linux_arm64.tar.gz
|
||||
# wget -N https://gh-proxy.com/https://github.com/XIU2/CloudflareSpeedTest/releases/download/v2.3.4/cfst_linux_arm64.tar.gz
|
||||
# wget -N https://hk.gh-proxy.com/https://github.com/XIU2/CloudflareSpeedTest/releases/download/v2.3.4/cfst_linux_arm64.tar.gz
|
||||
# wget -N https://wget.la/https://github.com/XIU2/CloudflareSpeedTest/releases/download/v2.3.4/cfst_linux_amd64.tar.gz
|
||||
# wget -N https://ghfast.top/https://github.com/XIU2/CloudflareSpeedTest/releases/download/v2.3.4/cfst_linux_amd64.tar.gz
|
||||
# wget -N https://ghproxy.it/https://github.com/XIU2/CloudflareSpeedTest/releases/download/v2.3.4/cfst_linux_amd64.tar.gz
|
||||
# wget -N https://gh-proxy.org/https://github.com/XIU2/CloudflareSpeedTest/releases/download/v2.3.4/cfst_linux_amd64.tar.gz
|
||||
# wget -N https://cdn.gh-proxy.org/https://github.com/XIU2/CloudflareSpeedTest/releases/download/v2.3.4/cfst_linux_amd64.tar.gz
|
||||
# 如果下载失败的话,尝试删除 -N 参数(如果是为了更新,则记得提前删除旧压缩包 rm cfst_linux_amd64.tar.gz )
|
||||
|
||||
# 解压(不需要删除旧文件,会直接覆盖,自行根据需求替换 文件名)
|
||||
@@ -77,7 +78,7 @@ chmod +x cfst
|
||||
./cfst
|
||||
|
||||
# 运行(带参数示例)
|
||||
./cfst -dd -tll 90
|
||||
./cfst -tl 200 -dn 20
|
||||
```
|
||||
|
||||
> 如果平**均延迟非常低**(如 0.xx),则说明 CFST **测速时走了代理**,请先关闭代理软件后再测速。
|
||||
@@ -201,6 +202,7 @@ https://github.com/XIU2/CloudflareSpeedTest
|
||||
指定IP段数据;直接通过参数指定要测速的 IP 段数据,英文逗号分隔;(默认 空)
|
||||
-o result.csv
|
||||
写入结果文件;如路径含有空格请加上引号;值为空时不写入文件 [-o ""];(默认 result.csv)
|
||||
注意:在一些环境下使用 -o "" 可能会被忽略掉这个空参数导致报错,可加个空格 -o " " 解决
|
||||
|
||||
-dd
|
||||
禁用下载测速;禁用后测速结果会按延迟排序 (默认按下载速度排序);(默认 启用)
|
||||
@@ -300,9 +302,9 @@ CFST 会先延迟测速,在这过程中进度条右侧会实时显示可用 IP
|
||||
Windows 要指定参数需要在 CMD 中运行,或者把参数添加到快捷方式目标中。
|
||||
|
||||
> [!TIP]
|
||||
> - 各参数均有**默认值**,使用默认值的参数是可以省略的(**按需选择**),参数**不分前后顺序**。
|
||||
> - 各参数均有**默认值**,当使用默认值时参数可以省略(**按需选择**),参数**不分前后顺序**。
|
||||
> - Windows **PowerShell** 只需把下面命令中的 `cfst.exe` 改为 `.\cfst.exe` 即可。
|
||||
> - Linux 系统只需要把下面命令中的 `cfst.exe` 改为 `./cfst` 即可。
|
||||
> - Linux / macOS 系统只需要把下面命令中的 `cfst.exe` 改为 `./cfst` 即可。
|
||||
|
||||
****
|
||||
|
||||
@@ -315,22 +317,23 @@ Windows 要指定参数需要在 CMD 中运行,或者把参数添加到快捷
|
||||
|
||||
****
|
||||
|
||||
很多人打开 CMD 以**绝对路径**运行 CFST 会报错,这是因为默认的 `-f ip.txt` 参数是相对路径,需要指定绝对路径的 ip.txt 才行,但这样毕竟太麻烦了,因此还是建议进入 CFST 程序目录下,以**相对路径**方式运行:
|
||||
很多人打开 CMD 直接就以**绝对路径**运行 CFST 会报错,这是因为默认的 `-f ip.txt` 参数是相对路径,需要指定绝对路径的 ip.txt 才行,但这样毕竟太麻烦了,因此还是建议进入 CFST 程序目录下,以**相对路径**方式运行:
|
||||
|
||||
**方式 一**:
|
||||
1. 打开 CFST 程序所在目录
|
||||
2. 空白处按下 <kbd>Shift + 鼠标右键</kbd> 显示右键菜单
|
||||
3. 选择 **\[在此处打开命令窗口\]** 来打开 CMD 窗口,此时默认就位于当前目录下
|
||||
4. 输入带参数的命令,如:`cfst.exe -tll 50 -tl 200`即可运行
|
||||
4. 输入带参数的命令,如:`cfst.exe -tl 200 -dn 20` 即可运行
|
||||
|
||||
**方式 二**:
|
||||
1. 打开 CFST 程序所在目录
|
||||
2. 直接在文件夹地址栏中全选并输入 `cmd` 回车来打开 CMD 窗口,此时默认就位于当前目录下
|
||||
4. 输入带参数的命令,如:`cfst.exe -tll 50 -tl 200`即可运行
|
||||
2. 直接在文件夹地址栏中全选(或清空)并输入 `cmd` 回车就能打开 CMD 窗口,此时默认就位于当前目录下
|
||||
4. 输入带参数的命令,如:`cfst.exe -tl 200 -dn 20` 即可运行
|
||||
|
||||
> 当然你也可以随便打开一个 CMD 窗口,然后输入如 `cd /d "D:\Program Files\cfst"` 来进入程序目录
|
||||
|
||||
> **提示**:如果用的是 **PowerShell** 只需把命令中的 `cfst.exe` 改为 `.\cfst.exe` 即可。
|
||||
> **提示**:如果用的是 **PowerShell** 只需把命令中的 `cfst.exe` 改为 `.\cfst.exe` 即可。
|
||||
> **注意**:在 **PowerShell** 下使用 `-o ""` 会被忽略掉空参数导致报错,可加个空格 `-o " "` 解决
|
||||
|
||||
</details>
|
||||
|
||||
@@ -348,11 +351,11 @@ Windows 要指定参数需要在 CMD 中运行,或者把参数添加到快捷
|
||||
右键 `cfst.exe` 文件 - **\[创建快捷方式\]**,然后右键该快捷方式 - **\[属性\]**,修改其**目标**:
|
||||
|
||||
``` bash
|
||||
# 如果要不输出结果文件,那么请加上 -o " ",引号里的是空格(没有空格会导致该参数被省略)。
|
||||
D:\ABC\cfst\cfst.exe -n 500 -t 4 -dn 20 -dt 5 -o " "
|
||||
# 如果要不输出结果文件,那么请加上 -o " ",引号里的是空格(不加空格会导致该空参数被忽略从而报错)。
|
||||
D:\ABC\cfst\cfst.exe -tl 200 -dn 20 -o " "
|
||||
|
||||
# 如果文件路径包含引号,则需要把启动参数放在引号外面,记得引号和 - 之间有空格。
|
||||
"D:\Program Files\cfst\cfst.exe" -n 500 -t 4 -dn 20 -dt 5 -o " "
|
||||
"D:\Program Files\cfst\cfst.exe" -tl 200 -dn 20 -o " "
|
||||
|
||||
# 注意!快捷方式 - 起始位置 不能是空的,否则就会因为绝对路径而找不到 ip.txt 文件
|
||||
```
|
||||
@@ -828,6 +831,12 @@ _**CFST OpenWrt 路由器插件版 [#174](https://github.com/XIU2/CloudflareSpee
|
||||
- _https://github.com/immortalwrt-collections/openwrt-cdnspeedtest_
|
||||
_**CFST OpenWrt 原生编译版本 [#64](https://github.com/XIU2/CloudflareSpeedTest/discussions/64)**_
|
||||
|
||||
- _https://github.com/GuangYu-yu/CloudflareST-Rust_
|
||||
_**CFST Rust 版本**_
|
||||
|
||||
- _https://github.com/masgzy/CloudflareST_
|
||||
_**CFST 的分支衍生版本(依然是 Go)**_
|
||||
|
||||
- _https://github.com/hoseinnikkhah/CloudflareSpeedTest-English_
|
||||
_**English language version of CFST (Text language differences only) [#64](https://github.com/XIU2/CloudflareSpeedTest/issues/68)**_
|
||||
|
||||
@@ -839,8 +848,8 @@ _**English language version of CFST (Text language differences only) [#64](https
|
||||
|
||||
- _https://github.com/Spedoske/CloudflareScanner_
|
||||
|
||||
> _因为该项目已经很长时间没更新了,而我又产生了很多功能需求,所以我临时学了下 Go 语言就上手了(菜)..._
|
||||
> _本软件基于该项目制作,但**已添加大量功能及修复 BUG**,并根据大家的使用反馈积极添加、优化功能(闲)..._
|
||||
> _因为该项目已经很长时间没更新了,而我又产生了很多功能需求,所以我临时学了下 Go 语言就上手了 (菜)..._
|
||||
> _本软件基于该项目,但**已彻底重构并添加大量功能/修复BUG**,根据大家的使用反馈积极添加/优化功能 (闲)..._
|
||||
|
||||
****
|
||||
|
||||
|
||||
@@ -29,7 +29,10 @@
|
||||
|
||||
****
|
||||
|
||||
#### 2021年12月17日,版本 v1.0.6
|
||||
#### 2025年12月15日,版本 v1.0.5 (cfst_hosts.bat)
|
||||
- **1. 修复** CFST新版本下获取不到第一行 IP 的问题
|
||||
|
||||
#### 2021年12月17日,版本 v1.0.4
|
||||
- **1. 优化** [找不到满足条件的 IP 就一直循环测速] 功能,在指定下载测速下限时没有重新测速的问题(默认注释)
|
||||
|
||||
#### 2021年12月17日,版本 v1.0.3
|
||||
@@ -62,6 +65,9 @@
|
||||
|
||||
****
|
||||
|
||||
#### 2025年12月15日,版本 v1.0.6
|
||||
- **1. 修复** CFST新版本下获取不到第一行 IP 的问题
|
||||
|
||||
#### 2021年12月17日,版本 v1.0.5
|
||||
- **1. 优化** [找不到满足条件的 IP 就一直循环测速] 功能,在指定下载测速下限时没有重新测速的问题(默认注释)
|
||||
|
||||
@@ -118,6 +124,9 @@
|
||||
|
||||
****
|
||||
|
||||
#### 2025年12月15日,版本 v1.0.6 (cfst_ddns.bat)
|
||||
- **1. 修复** CFST新版本下获取不到第一行 IP 的问题
|
||||
|
||||
#### 2024年10月06日,版本 v1.0.5
|
||||
- **1. 新增** 支持 API 令牌方式(相比 API 密钥这种全局权限的,API 令牌可以自由控制权限)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
:: --------------------------------------------------------------
|
||||
:: <09><>Ŀ: CloudflareSpeedTest <20>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD> 3Proxy
|
||||
:: <09>汾: 1.0.5
|
||||
:: <09>汾: 1.0.6
|
||||
:: <09><><EFBFBD><EFBFBD>: XIU2
|
||||
:: <09><>Ŀ: https://github.com/XIU2/CloudflareSpeedTest
|
||||
:: --------------------------------------------------------------
|
||||
@@ -67,13 +67,11 @@ if not exist result_3proxy.txt (
|
||||
)
|
||||
|
||||
:: <20><>ȡ<EFBFBD><C8A1>һ<EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD> IP
|
||||
for /f "tokens=1 delims=," %%i in (result_3proxy.txt) do (
|
||||
set /a n+=1
|
||||
If !n!==2 (
|
||||
set bestip=%%i
|
||||
goto :END
|
||||
)
|
||||
for /f "skip=1 tokens=1 delims=," %%i in ('more result_3proxy.txt') do (
|
||||
SET bestip=%%i
|
||||
goto :END
|
||||
)
|
||||
|
||||
:END
|
||||
|
||||
:: <20>жϸոջ<D5B8>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IP <20>Ƿ<EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3>Լ<EFBFBD><D4BC>Ƿ<EFBFBD><C7B7>;<EFBFBD> IP һ<><D2BB>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
:: --------------------------------------------------------------
|
||||
:: 项目: CloudflareSpeedTest 自动更新域名解析记录
|
||||
:: 版本: 1.0.5
|
||||
:: 版本: 1.0.6
|
||||
:: 作者: XIU2
|
||||
:: 项目: https://github.com/XIU2/CloudflareSpeedTest
|
||||
:: --------------------------------------------------------------
|
||||
@@ -17,29 +17,26 @@ if not exist result_ddns.txt (
|
||||
goto :END
|
||||
)
|
||||
|
||||
for /f "tokens=1 delims=," %%i in (result_ddns.txt) do (
|
||||
Set /a n+=1
|
||||
If !n!==2 (
|
||||
Echo %%i
|
||||
if "%%i"=="" (
|
||||
echo.
|
||||
echo CFST 测速结果 IP 数量为 0,跳过下面步骤...
|
||||
goto :END
|
||||
)
|
||||
:: API 密钥方式(全局权限)
|
||||
curl -X PUT "https://api.cloudflare.com/client/v4/zones/域名ID/dns_records/域名解析记录ID" ^
|
||||
-H "X-Auth-Email: 账号邮箱" ^
|
||||
-H "X-Auth-Key: 前面获取的 API 密钥" ^
|
||||
-H "Content-Type: application/json" ^
|
||||
--data "{\"type\":\"A\",\"name\":\"完整域名\",\"content\":\"%%i\",\"ttl\":1,\"proxied\":true}"
|
||||
:: API 令牌方式(自定义权限),如果要使用这种方式,可以把上面的删除或注释,然后把下面的行首 "::" 注释符删除即可。
|
||||
:: curl -X PUT "https://api.cloudflare.com/client/v4/zones/域名ID/dns_records/域名解析记录ID" ^
|
||||
:: -H "Authorization: Bearer 前面获取的 API 令牌" ^
|
||||
:: -H "Content-Type: application/json" ^
|
||||
:: --data "{\"type\":\"A\",\"name\":\"完整域名\",\"content\":\"%%i\",\"ttl\":1,\"proxied\":true}"
|
||||
|
||||
for /f "skip=1 tokens=1 delims=," %%i in (result_ddns.txt) do (
|
||||
Echo %%i
|
||||
if "%%i"=="" (
|
||||
echo.
|
||||
echo CFST 测速结果 IP 数量为 0,跳过下面步骤...
|
||||
goto :END
|
||||
)
|
||||
:: API 密钥方式(全局权限)
|
||||
curl -X PUT "https://api.cloudflare.com/client/v4/zones/域名ID/dns_records/域名解析记录ID" ^
|
||||
-H "X-Auth-Email: 账号邮箱" ^
|
||||
-H "X-Auth-Key: 前面获取的 API 密钥" ^
|
||||
-H "Content-Type: application/json" ^
|
||||
--data "{\"type\":\"A\",\"name\":\"完整域名\",\"content\":\"%%i\",\"ttl\":1,\"proxied\":true}"
|
||||
:: API 令牌方式(自定义权限),如果要使用这种方式,可以把上面的删除或注释,然后把下面的行首 "::" 注释符删除即可。
|
||||
:: curl -X PUT "https://api.cloudflare.com/client/v4/zones/域名ID/dns_records/域名解析记录ID" ^
|
||||
:: -H "Authorization: Bearer 前面获取的 API 令牌" ^
|
||||
:: -H "Content-Type: application/json" ^
|
||||
:: --data "{\"type\":\"A\",\"name\":\"完整域名\",\"content\":\"%%i\",\"ttl\":1,\"proxied\":true}"
|
||||
|
||||
goto :END
|
||||
)
|
||||
:END
|
||||
pause
|
||||
@@ -1,6 +1,6 @@
|
||||
:: --------------------------------------------------------------
|
||||
:: <09><>Ŀ: CloudflareSpeedTest <20>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD> Hosts
|
||||
:: <09>汾: 1.0.4
|
||||
:: <09>汾: 1.0.5
|
||||
:: <09><><EFBFBD><EFBFBD>: XIU2
|
||||
:: <09><>Ŀ: https://github.com/XIU2/CloudflareSpeedTest
|
||||
:: --------------------------------------------------------------
|
||||
@@ -67,13 +67,11 @@ if not exist result_hosts.txt (
|
||||
)
|
||||
|
||||
:: <20><>ȡ<EFBFBD><C8A1>һ<EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD> IP
|
||||
for /f "tokens=1 delims=," %%i in (result_hosts.txt) do (
|
||||
SET /a n+=1
|
||||
If !n!==2 (
|
||||
SET bestip=%%i
|
||||
goto :END
|
||||
)
|
||||
for /f "skip=1 tokens=1 delims=," %%i in ('more result_hosts.txt') do (
|
||||
SET bestip=%%i
|
||||
goto :END
|
||||
)
|
||||
|
||||
:END
|
||||
|
||||
:: <20>жϸոջ<D5B8>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IP <20>Ƿ<EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3>Լ<EFBFBD><D4BC>Ƿ<EFBFBD><C7B7>;<EFBFBD> IP һ<><D2BB>
|
||||
|
||||
Reference in New Issue
Block a user