Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

征集可用的 Cloudflare [下载测速地址] ! #6

Closed
XIU2 opened this issue Nov 7, 2020 · 28 comments
Closed

征集可用的 Cloudflare [下载测速地址] ! #6

XIU2 opened this issue Nov 7, 2020 · 28 comments
Labels
功能建议 功能与建议

Comments

@XIU2
Copy link
Owner

XIU2 commented Nov 7, 2020


该问题下只能交流 [下载测速地址] 相关内容,其他内容请新开问题,否则会被隐藏。


因为 Cloudflare 官方的下载测速地址存在上限,用的人多了就容易出现超出资源上限而导致下载测速失败的问题。
我一再调低测速文件大小也无法彻底解决该问题(因为不止我一个项目在使用该测速地址,似乎是共用一个上限),所以特开此问题来征集可用于 [下载测速] 的地址!大家可以各取所需!

在 v1.2.9 版本后,大家可以使用 -url "https://xxxx" 参数来指定下载测速地址!
在 v1.3.0 版本后,已经将默认下载测速地址改为我自建的下载测速地址了!


最低要求:

  1. 访问地址可以直接下载文件。
  2. 文件大小不能低于 200 MB(太小测速不准确)。
  3. 网站用的是 Cloudflare CDN(这是最起码的)。

提交示例:

当然如果你不会 Markdown 排版,那么直接写就行了,这只是个大概示例。

@XIU2
Copy link
Owner Author

XIU2 commented Nov 7, 2020

我先带头来个。
目前我想到那就是前段时间我写的 Github 增强 - 高速下载 油猴脚本中用到的 Github 文件反代网站。

这些网站大都是基于 Cloudflare Workers 搭建的 gh-proxy 文件反代服务,而 Cloudflare Workers 免费版每天最多 10万次请求(每分钟最多 1000次请求),并不限制流量(或者说足够大),所以这个次数应该够用了,为了保险我还多找了几个,大家自己选(有需求的也可以自己搭建自用)。


只有 Github 文件反向代理网站还不够,还需要找个 Github 里足够大的文件来组成完整的地址,于是我就在书签里随便找了个文件大小合适的项目,所以下面测速地址后面的 Github 文件地址也可以更换为其他更大的文件!


  • 简单说明: 基于 Cloudflare Workers 的 Github 文件反代地址
  • 文件大小: 207 MB
  • 测速地址:
  1. https://gh.con.sh/https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/download/v2.21.12/Waifu2x-Extension-GUI-v2.21.12-Portable.7z
  2. https://gh.api.99988866.xyz/https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/download/v2.21.12/Waifu2x-Extension-GUI-v2.21.12-Portable.7z
  3. http:https://gh.msx.workers.dev/https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/download/v2.21.12/Waifu2x-Extension-GUI-v2.21.12-Portable.7z
  4. https://github.91chifun.workers.dev/https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/download/v2.21.12/Waifu2x-Extension-GUI-v2.21.12-Portable.7z
  5. https://gh-proxy.henryjiu.workers.dev/https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/download/v2.21.12/Waifu2x-Extension-GUI-v2.21.12-Portable.7z

@XIU2 XIU2 pinned this issue Nov 7, 2020
@XIU2 XIU2 added the 功能建议 功能与建议 label Nov 7, 2020
@XIU2 XIU2 changed the title 征集可用于 [下载测速] 的地址! 征集可用的 Cloudflare [下载测速地址] ! Nov 7, 2020
@XIU2
Copy link
Owner Author

XIU2 commented Nov 7, 2020

另外, 如果大家自己的网站用的就是 Cloudflare CDN 且启用了 CDN 代理( DNS 解析处的橙色云朵),那么在你网站里放个文件也可以拿来下载测速,但是不知道像这种文件 Cloudflare 是否会完全缓存,否则如果老是前往网站服务器获取该文件,可能会比较消耗服务器流量

@eightsheep67
Copy link

我是想给HEROKU的小鸡自选CF IP,那测速目标直接是小鸡上的一个文件,这样的结果最准确呢?还是会有什么其他方面的影响?

@XIU2
Copy link
Owner Author

XIU2 commented Nov 7, 2020

@eightsheep67

你这种情况,不管是直接用别人网站的文件下载测速,还是用你自己网站的文件下载测速,测速效果都是一样的
这是因为无论是哪个网站,决定速度的都是 Cloudflare CDN IP,而且无论指向哪个 IP 也都能访问你的网站。

不过问题是,你只能测试对于你本地运营商来说最好的 IP,而这个 IP 不代表其他运营商也最好。

最起码你要在电信、联通、移动环境下各测试一遍(不论是一个地区的还是不同地区的),才足够准确。

@eightsheep67
Copy link

eightsheep67 commented Nov 7, 2020

@XIU2

因为我用过了很多CF自选的脚本测的速选出来的IP,我放到V2rayN里测速效果表现就不一致,然后实际上代理上网起来的感觉也不一样(比如油管),有什么办法能够一条龙就能选出实际上我家里这个电信宽带看油管最快的IP呢

@XIU2
Copy link
Owner Author

XIU2 commented Nov 7, 2020

@eightsheep67

除非 YouTube 抛弃谷歌云,并改为使用 Cloudflare CDN 服务(这样下载测速地址直接指向 YouTube 即可),否则没办法直接测试出你通过 Cloudflare CDN 访问 YouTube 的速度

目前只能测试出你链接 Cloudflare CDN 最快的 IP,无法同时测试出哪个 Cloudflare CDN IP 连接 YouTube 的速度最快。

@eightsheep67
Copy link

eightsheep67 commented Nov 7, 2020

@XIU2

我是想,heroku美区app反正它访问油管应该是不太会波动的,我就想测试出访问heroku app的最快的IP用来worker反代,这样应该的IP实际效果应该会和测试结果比较相符,所以想说是不是能够直接把测速文件放在heroku app上最好了(但是这一步我也不知道怎么做),或者说,我现在已经测出来我的heroku app的ip实际上属于AWS的弗吉尼亚机房,那我如果能够找到相同区域的测速文件,是否也有同样的效果呢。

@XIU2
Copy link
Owner Author

XIU2 commented Nov 7, 2020

@eightsheep67

AWS CDN 和 Cloudflare CDN 不一样,指向任意 Cloudflare IP 都能访问你的网站,但是 AWS CDN 却不一定可以这样做

所以你的需求,就需要你找到 heroku 使用了哪些 IP 段,然后把 IP 段放到 xxx.txt 内,用我的软件指定该文件去测速,但是这样只能测试延迟,无法测试下载速度(要先确定 IP 指向你的网站后是否可用)。

@eightsheep67
Copy link

eightsheep67 commented Nov 7, 2020

@XIU2

cloudflare worker可以套AWS的IP吗?有点没明白……

@XIU2
Copy link
Owner Author

XIU2 commented Nov 7, 2020

@eightsheep67

Cloudflare 是 Cloudflare,AWS 是亚马逊云,这是两个完全不同的网络 CDN 公司,肯定不能通用啊。

@felixding
Copy link

可不可以这样:

提供一个公开的网页显示大家的测速结果,包括速度、城市、ISP和Cloudflare IP,这样当积累到一定程度后,就不需要每个人都再次测试,既能节省服务器流量,又方便大家。

在收集测速结果时,为了保护隐私,可以让用户选择是否上报,或者默认上报但提前告知用户。

如果需要API和网页,我可以帮忙提供。

@eightsheep67
Copy link

可不可以这样:

提供一个公开的网页显示大家的测速结果,包括速度、城市、ISP和Cloudflare IP,这样当积累到一定程度后,就不需要每个人都再次测试,既能节省服务器流量,又方便大家。

在收集测速结果时,为了保护隐私,可以让用户选择是否上报,或者默认上报但提前告知用户。

如果需要API和网页,我可以帮忙提供。

但是这玩意儿变化很快啊,感觉这样并没有什么参考作用。有时候我宽带重拨号了一下公网IP一换,选好的IP全废又要重新找。

@eightsheep67
Copy link

eightsheep67 commented Nov 7, 2020

谁能教教我怎么在已有的heroku的app里放一个文件,并且可以直接访问用来测速的,然后生成一个cloudflare反代链接来测速,有这样的教程大家就可以自行测速而且我觉得效果应该也比较好

@XIU2
Copy link
Owner Author

XIU2 commented Nov 7, 2020

@felixding

因为 Cloudflare 使用了任播技术,导致 CDN IP 实际位置并不是固定的,而是会根据需要而变动(官方控制),所以你会发现用软件扫出来的最快 IP 并不能用一辈子,往往需要定期更换。

@XIU2
Copy link
Owner Author

XIU2 commented Nov 7, 2020

@eightsheep67

没用过 heroku ,所以我也不清楚怎么把文件放到 heroku 里面。


至于用 Cloudflare 反代 heroku 的网站,

  1. 可以在自己的服务器上面建立一个网站,
  2. 然后 Nginx 反向代理 heroku 的网站,
  3. 然后再把该网站的域名添加到 Cloudflare 中,
  4. 并开启 CDN 代理(Cloudflare 的 域名 DNS 解析页面添加/修改解析时,有个云朵,橙色代表开启),
  5. 这时候就是通过 Cloudflare 反向代理 heroku 网站了。

当然这种套娃行为我没实际测试过是否可行,应该是可以的。


至于不用自己的服务器,而是用 Cloudflare Workers 来反向代理 heroku 的话,这个我就不了解了,可能根据这个项目 gh-proxy 改一改或许可以。


我只提供思路,不提供具体步骤(我个人只会在实际操作验证过后,才会提供具体步骤,否则只提供思路)。

@eightsheep67
Copy link

有一个疑问,我看result里的IP尾数虽然每次都不同,但是每一批测速的时候都是一样的,意思是其实同一个IP段,比如104.20.14.1-104.20.14.254其实速度都是差不多的吗?

@XIU2
Copy link
Owner Author

XIU2 commented Nov 7, 2020

@eightsheep67
不一定,但是一般是差不多的,毕竟不可能所有 IP 都测试一遍(近两百万个 IP)。
所以软件是取个随机数,然后将每个 IP 的 C 段都测试一遍。

@eightsheep67
Copy link

http:https://speedtest-sgp1.digitalocean.com/10mb.test
这个有办法作为测速地址吗?这个是V2rayN里测速用的,我觉得和实际情况比较相符。但我填进-url好像不能用。

@XIU2
Copy link
Owner Author

XIU2 commented Nov 7, 2020

@eightsheep67

这个不行,因为这个测速地址是 DigitalOcean IDC 的,所以也只能指向 DigitalOcean 服务器的 IP。


只有下载测速地址使用的是 Cloudflare CDN IP 才能放到我软件里测速。

当然其他的 CDN 也是可行的,但是需要自己收集对应的 IP 段+下载测速地址。

@XIU2
Copy link
Owner Author

XIU2 commented Nov 8, 2020

我把 1楼示例中的 Cloudflare 官方下载测速地址改为了我自建的:

另外,软件内默认下载测速地址也改成了这个。

就是在网站里放个大文件,然后套上 Cloudflare CDN 就完事了。

@zhangsean
Copy link
Contributor

https://github.com/badafans/better-cloudflare-ip 这个项目的README.md里面发现一个 Cloudflare Worker 代理:
https://proxy.freecdn.workers.dev/?url=,在后面跟上任意较大文件的URL即可作为下载测速地址。
如果经常要用来看 Youtube ,最好跟上 Youtube 视频地址,即可测试得出通过 Cloudflare CDN 转发 Heroku 看 Youtube 效果最好的IP。
如果经常要用来下载Github附件,就跟上github地址,即可测试经由 Cloudflare CDN 下载 Github 最快的IP,比如我用来下载自编译的 openwrt固件:

https://proxy.freecdn.workers.dev/?url=https://github.com/zhangsean/OpenWrt-Actions/releases/download/2020.11.20-1200/openwrt-x86-64-generic-squashfs-combined.vmdk

当然,只要找到任意一个 Cloudflare 速度较快的IP,代理访问其他网站的速度也都不慢。

@eightsheep67
Copy link

eightsheep67 commented Nov 30, 2020

https://github.com/badafans/better-cloudflare-ip 这个项目的README.md里面发现一个 Cloudflare Worker 代理:
https://proxy.freecdn.workers.dev/?url=,在后面跟上任意较大文件的URL即可作为下载测速地址。
如果经常要用来看 Youtube ,最好跟上 Youtube 视频地址,即可测试得出通过 Cloudflare CDN 转发 Heroku 看 Youtube 效果最好的IP。
如果经常要用来下载Github附件,就跟上github地址,即可测试经由 Cloudflare CDN 下载 Github 最快的IP,比如我用来下载自编译的 openwrt固件:

https://proxy.freecdn.workers.dev/?url=https://github.com/zhangsean/OpenWrt-Actions/releases/download/2020.11.20-1200/openwrt-x86-64-generic-squashfs-combined.vmdk

当然,只要找到任意一个 Cloudflare 速度较快的IP,代理访问其他网站的速度也都不慢。

有YOUTUBE的地址给一个吗,还是说任意视频地址都可以?试了下视频地址不能测速。但是不知道怎么获取视频文件的源地址。

@XIU2
Copy link
Owner Author

XIU2 commented Nov 30, 2020

@eightsheep67
不是有很多下载 YouTube 视频的网站、脚本、扩展、软件吗?
你可以去看看能不能获取到视频下载地址。

@OPPO9008
Copy link

OPPO9008 commented Feb 7, 2022

https://speedtest.galg
amer.eu.org/200m.png
分享一个200m 测速链接

@XIU2
Copy link
Owner Author

XIU2 commented Feb 7, 2022

@OPPO9008 虽然你应该发到隔壁那个 Issues 中,不过这不重要,总之,感谢分享~

@TheresaQWQ
Copy link

cloudflare官方的speedtest上的下载地址:https://speed.cloudflare.com/__down?measId=1361084997055349&bytes=<bytes>

@nankaine
Copy link

wget https://speed.cloudflare.com/__down?bytes=200000000
--2024-2-- https://speed.cloudflare.com/__down?bytes=200000000
Resolving speed.cloudflare.com (speed.cloudflare.com)... 104.16.61.8, 104.16.60.8, 2606:4700::6810:3d08, ...
Connecting to speed.cloudflare.com (speed.cloudflare.com)|104.16.61.8|:443... connected.
Unable to establish SSL connection.

直接没法用了

@charSLee013
Copy link
Contributor

wget https://speed.cloudflare.com/__down?bytes=200000000 --2024-2-- https://speed.cloudflare.com/__down?bytes=200000000 Resolving speed.cloudflare.com (speed.cloudflare.com)... 104.16.61.8, 104.16.60.8, 2606:4700::6810:3d08, ... Connecting to speed.cloudflare.com (speed.cloudflare.com)|104.16.61.8|:443... connected. Unable to establish SSL connection.

直接没法用了

我这边测试下来发现是被掐断TLS握手了

❯ curl -vvvv 'https://speed.cloudflare.com/__down\?bytes\=200000000'
*   Trying 104.16.60.8:443...
* Connected to speed.cloudflare.com (104.16.60.8) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* OpenSSL SSL_connect: Connection reset by peer in connection to speed.cloudflare.com:443
* Closing connection 0
curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to speed.cloudflare.com:443

可以尝试下指定IP地址来进行访问来绕过这个问题

curl --resolve speed.cloudflare.com:443:<替换成IP地址> 'https://speed.cloudflare.com/__down?bytes=200000000'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
功能建议 功能与建议
Projects
None yet
Development

No branches or pull requests

8 participants