mirror of
https://github.com/XIU2/CloudflareSpeedTest.git
synced 2026-03-08 07:35:52 +08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2cfc1e6b69 | ||
|
|
a4b39ecc23 | ||
|
|
49992a763e | ||
|
|
ffc0dafbae | ||
|
|
4621c56370 | ||
|
|
2d400783c9 | ||
|
|
133924d169 | ||
|
|
bef4476b25 | ||
|
|
6c698a815d |
68
README.md
68
README.md
@@ -12,7 +12,8 @@
|
||||
**「自选优选 IP」测试 Cloudflare CDN 延迟和速度,获取最快 IP (IPv4+IPv6)**!好用的话**点个`⭐`鼓励一下叭~**
|
||||
|
||||
> _分享我其他开源项目:[**TrackersList.com** - 全网热门 BT Tracker 列表!有效提高 BT 下载速度~](https://github.com/XIU2/TrackersListCollection) <img src="https://img.shields.io/github/stars/XIU2/TrackersListCollection.svg?style=flat-square&label=Star&color=4285dd&logo=github" height="16px" />_
|
||||
> _[**UserScript** - 🐵 Github 高速下载、知乎增强、自动无缝翻页、护眼模式 等十几个**油猴脚本**!](https://github.com/XIU2/UserScript)<img src="https://img.shields.io/github/stars/XIU2/UserScript.svg?style=flat-square&label=Star&color=4285dd&logo=github" height="16px" />_
|
||||
> _[**UserScript** - 🐵 Github 高速下载、知乎增强、自动无缝翻页、护眼模式 等十几个**油猴脚本**~](https://github.com/XIU2/UserScript) <img src="https://img.shields.io/github/stars/XIU2/UserScript.svg?style=flat-square&label=Star&color=4285dd&logo=github" height="16px" />_
|
||||
> _[**SNIProxy** - 🧷 自用的简单 SNI Proxy(支持全平台、全系统、前置代理、配置简单等~](https://github.com/XIU2/SNIProxy) <img src="https://img.shields.io/github/stars/XIU2/SNIProxy.svg?style=flat-square&label=Star&color=4285dd&logo=github" height="16px" />_
|
||||
|
||||
> 本项目也支持对**其他 CDN / 网站 IP** 延迟测速(如:[CloudFront](https://github.com/XIU2/CloudflareSpeedTest/discussions/304)、[Gcore](https://github.com/XIU2/CloudflareSpeedTest/discussions/303) CDN),但下载测速需自行寻找地址
|
||||
|
||||
@@ -23,7 +24,7 @@
|
||||
|
||||
### 下载运行
|
||||
|
||||
1. 下载编译好的可执行文件( [Github Releases](https://github.com/XIU2/CloudflareSpeedTest/releases) / [蓝奏云](https://pan.lanzouf.com/b0742hkxe) )并解压。
|
||||
1. 下载编译好的可执行文件( [Github Releases](https://github.com/XIU2/CloudflareSpeedTest/releases) / [蓝奏云](https://pan.lanzouj.com/b0742hkxe) )并解压。
|
||||
2. 双击运行 `CloudflareST.exe` 文件(Windows 系统),等待测速完成...
|
||||
|
||||
<details>
|
||||
@@ -43,7 +44,8 @@ cd CloudflareST
|
||||
# 下载 CloudflareST 压缩包(自行根据需求替换 URL 中 [版本号] 和 [文件名])
|
||||
wget -N https://github.com/XIU2/CloudflareSpeedTest/releases/download/v2.2.4/CloudflareST_linux_amd64.tar.gz
|
||||
# 如果你是在国内服务器上下载,那么请使用下面这几个镜像加速:
|
||||
# wget -N https://download.fastgit.org/XIU2/CloudflareSpeedTest/releases/download/v2.2.4/CloudflareST_linux_amd64.tar.gz
|
||||
# wget -N https://download.fgit.ml/XIU2/CloudflareSpeedTest/releases/download/v2.2.4/CloudflareST_linux_amd64.tar.gz
|
||||
# wget -N https://download.fgit.gq/XIU2/CloudflareSpeedTest/releases/download/v2.2.4/CloudflareST_linux_amd64.tar.gz
|
||||
# wget -N https://ghproxy.com/https://github.com/XIU2/CloudflareSpeedTest/releases/download/v2.2.4/CloudflareST_linux_amd64.tar.gz
|
||||
# 如果下载失败的话,尝试删除 -N 参数(如果是为了更新,则记得提前删除旧压缩包 rm CloudflareST_linux_amd64.tar.gz )
|
||||
|
||||
@@ -69,6 +71,8 @@ chmod +x CloudflareST
|
||||
|
||||
> _在**手机**上独立运行 CloudflareST 测速的简单教程:**[Android](https://github.com/XIU2/CloudflareSpeedTest/discussions/61)、[Android APP](https://github.com/xianshenglu/cloudflare-ip-tester-app)、[IOS](https://github.com/XIU2/CloudflareSpeedTest/discussions/321)**_
|
||||
|
||||
> 注意!本软件仅适用于网站,**不支持给 Cloudflare WARP 优选 IP**,具体见:[#392](https://github.com/XIU2/CloudflareSpeedTest/discussions/392)
|
||||
|
||||
### 结果示例
|
||||
|
||||
测速完毕后,默认会显示**最快的 10 个 IP**,示例:
|
||||
@@ -97,7 +101,7 @@ IP 地址 已发送 已接收 丢包率 平均延迟 下载速度
|
||||
|
||||
# 软件在 默认参数 下的整个流程大概步骤:
|
||||
# 1. 延迟测速(默认 TCPing 模式,HTTPing 模式需要手动加上参数)
|
||||
# 2. 延迟排序(延迟从低到高排序,不同丢包率的会分开独立排序,因此可能会有一些延迟低但丢包的 IP 被排到后面)
|
||||
# 2. 延迟排序(延迟从低到高排序并按条件过滤,不同丢包率的会分开独立排序,因此可能会有一些延迟低但丢包的 IP 被排到后面)
|
||||
# 3. 下载测速(从延迟最低的 IP 开始依次下载测速,默认测够 10 个就会停止)
|
||||
# 4. 速度排序(速度从高到低排序)
|
||||
# 5. 输出结果(通过参数控制是否输出到命令行(-p 0)或输出到文件(-o ""))
|
||||
@@ -119,7 +123,7 @@ IP 地址, 已发送, 已接收, 丢包率, 平均延迟, 下载速度 (MB/s)
|
||||
|
||||
直接运行使用的是默认参数,如果想要测速结果更全面、更符合自己的要求,可以自定义参数。
|
||||
|
||||
``` cmd
|
||||
```css
|
||||
C:\>CloudflareST.exe -h
|
||||
|
||||
CloudflareSpeedTest vX.X.X
|
||||
@@ -178,6 +182,58 @@ https://github.com/XIU2/CloudflareSpeedTest
|
||||
打印帮助说明
|
||||
```
|
||||
|
||||
### 界面解释
|
||||
|
||||
为了避免大家对 CloudflareST 测速过程中的界面内容有所误解(可用、队列等数字),我特意做个示例解释下。
|
||||
|
||||
<details>
|
||||
<summary><code><strong>「 点击展开 查看内容 」</strong></code></summary>
|
||||
|
||||
****
|
||||
|
||||
> 该实例把常用参数都给加上了,即为:`-ttl 40 -tl 150 -sl 1 -dn 5`,最后输出结果如下:
|
||||
|
||||
``` bash
|
||||
# XIU2/CloudflareSpeedTest vX.X.X
|
||||
|
||||
开始延迟测速(模式:TCP, 端口:443, 范围:40 ~ 150 ms, 丢包:1.00)
|
||||
321 / 321 [----------------------------------------------------------------------------------] 可用: 30
|
||||
开始下载测速(下限:1.00 MB/s, 数量:5, 队列:10)
|
||||
3 / 5 [---------------------------------------------------------↗---------------------------]
|
||||
IP 地址 已发送 已接收 丢包率 平均延迟 下载速度 (MB/s)
|
||||
XXX.XXX.XXX.XXX 4 4 0.00 83.32 3.66
|
||||
XXX.XXX.XXX.XXX 4 4 0.00 107.81 2.49
|
||||
XXX.XXX.XXX.XXX 4 3 0.25 149.59 1.04
|
||||
|
||||
完整测速结果已写入 result.csv 文件,可使用记事本/表格软件查看。
|
||||
按下 回车键 或 Ctrl+C 退出。
|
||||
```
|
||||
|
||||
> 刚接触 CloudflareST 的人,可能会迷惑明明延迟测速可用 IP 有 30 个,怎么最后只剩下 3 个了呢?
|
||||
> 下载测速里的队列又是什么意思?难道我下载测速还要排队?
|
||||
|
||||
CloudflareST 会先延迟测速,在这过程中进度条右侧会实时显示可用 IP 数量(`可用: 30`),但注意该可用数量指的是**测试通过没有超时的 IP 数量**,和延迟上下限、丢包条件无关。当延迟测速完成后,因为还指定了**延迟上下限、丢包**的条件,所以按照条件过滤后只剩下 `10` 个了(也就是等待下载测速的 `队列:10`)。
|
||||
|
||||
即以上示例中,`321` 个 IP 延迟测速完成后,只有 `30` 个 IP 测试通过没有超时,然后根据延迟上下限范围:`40 ~ 150 ms` 及丢包上限条件过滤后,只剩下 `10` 个满足要求的 IP 了。如果你 `-dd` 禁用了下载测速,那么就会直接输出这 `10` 个 IP 了。当然该示例并未禁用,因此接下来软件会继续对这 `10` 个 IP 进行下载测速(`队列:10`)。
|
||||
|
||||
> 因为下载测速是单线程一个个 IP 挨着排队测速的,因此等待下载测速的 IP 数量才会叫做 `队列`。
|
||||
|
||||
****
|
||||
|
||||
> 你可能注意到了,明明指定了要找到 5 个满足下载速度条件的 IP,怎么才 3 个就 “中断” 了呢?
|
||||
|
||||
下载测速进度条中的 `3 / 5`,前者指的是找到了 `3` 个满足下载速度下限条件的 IP(即下载速度高于 `1 MB/s` ),后者 `5` 指的是你要求找到 `5` 个满足下载速度下限条件的 IP(`-dn 5`)。
|
||||
|
||||
> 另外,提醒一下,如果你指定的 `-dn` 大于下载测速队列,比如你延迟测速后只剩下 `4` 个 IP 了,那么下载测速进度条中后面的数字就会和下载测速队列一样都是 `4` 个,而非你 `-dn` 指定的 `5` 个了。
|
||||
|
||||
软件在测速完这 `10` 个 IP 后,只找到了 `3` 个下载速度高于 `1 MB/s` 的 IP,剩下的 `7` 个 IP 都是 “不及格” 的。
|
||||
|
||||
因此,这不是 `“每次测速都不到 5 就中断了”`,而是所有 IP 都下载测速完了,但却只找到了 `3` 个满足条件的。
|
||||
|
||||
</details>
|
||||
|
||||
****
|
||||
|
||||
### 使用示例
|
||||
|
||||
Windows 要指定参数需要在 CMD 中运行,或者把参数添加到快捷方式目标中。
|
||||
@@ -567,7 +623,7 @@ CloudflareST.exe -f 1.txt
|
||||
|
||||
## 赞赏支持
|
||||
|
||||

|
||||

|
||||
|
||||
****
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ func TestDownloadSpeed(ipSet utils.PingDelaySet) (speedSet utils.DownloadSpeedSe
|
||||
TestCount = testNum
|
||||
}
|
||||
|
||||
fmt.Printf("开始下载测速(下载速度下限:%.2f MB/s,下载测速数量:%d,下载测速队列:%d):\n", MinSpeed, TestCount, testNum)
|
||||
fmt.Printf("开始下载测速(下限:%.2f MB/s, 数量:%d, 队列:%d)\n", MinSpeed, TestCount, testNum)
|
||||
// 控制 下载测速进度条 与 延迟测速进度条 长度一致(强迫症)
|
||||
bar_a := len(strconv.Itoa(len(ipSet)))
|
||||
bar_b := " "
|
||||
|
||||
@@ -64,9 +64,9 @@ func (p *Ping) Run() utils.PingDelaySet {
|
||||
return p.csv
|
||||
}
|
||||
if Httping {
|
||||
fmt.Printf("开始延迟测速(模式:HTTP,端口:%d,平均延迟上限:%v ms,平均延迟下限:%v ms,丢包几率上限:%.2f )\n", TCPPort, utils.InputMaxDelay.Milliseconds(), utils.InputMinDelay.Milliseconds(), utils.InputMaxLossRate)
|
||||
fmt.Printf("开始延迟测速(模式:HTTP, 端口:%d, 范围:%v ~ %v ms, 丢包:%.2f)\n", TCPPort, utils.InputMinDelay.Milliseconds(), utils.InputMaxDelay.Milliseconds(), utils.InputMaxLossRate)
|
||||
} else {
|
||||
fmt.Printf("开始延迟测速(模式:TCP,端口:%d,平均延迟上限:%v ms,平均延迟下限:%v ms,丢包几率上限:%.2f )\n", TCPPort, utils.InputMaxDelay.Milliseconds(), utils.InputMinDelay.Milliseconds(), utils.InputMaxLossRate)
|
||||
fmt.Printf("开始延迟测速(模式:TCP, 端口:%d, 范围:%v ~ %v ms, 丢包:%.2f)\n", TCPPort, utils.InputMinDelay.Milliseconds(), utils.InputMaxDelay.Milliseconds(), utils.InputMaxLossRate)
|
||||
}
|
||||
for _, ip := range p.ips {
|
||||
p.wg.Add(1)
|
||||
|
||||
Reference in New Issue
Block a user