🤔 什么是 ProxyIP ?
📖 ProxyIP 概念
在 Cloudflare Workers 环境中,ProxyIP 特指那些能够成功代理连接到 Cloudflare 服务的第三方 IP 地址。
🔧 技术原理
根据 Cloudflare Workers 的 TCP Sockets 官方文档 说明,存在以下技术限制:
⚠️ Outbound TCP sockets to Cloudflare IP ranges ↗ are temporarily blocked, but will be re-enabled shortly.
这意味着 Cloudflare Workers 无法直接连接到 Cloudflare 自有的 IP 地址段。为了解决这个限制,需要借助第三方云服务商的服务器作为”跳板”:
1 2
| Cloudflare Workers → ProxyIP 服务器 → Cloudflare 服务 (发起请求) (第三方代理) (目标服务)
|
通过第三方服务器反向代理 Cloudflare 的 443 端口,实现 Workers 对 Cloudflare 服务的访问。
以上内容摘自GitHub - cmliu/CF-Workers-CheckProxyIP: 部署在 Cloudflare Workers 上的轻量级 ProxyIP 验证工具。它能够快速、准确地检测代理IP的可用性,帮助用户筛选出有效的代理服务器。。
简单来说,就是基于CF的代理,无法访问套了CF CDN的网站,通过配置ProxyIP作为跳板,从而达到可以访问这些网站。
不要觉得这个不重要,现在托管在CF的网站非常多,如果不配置ProxyIP,网站的大门都进不去。
方法一:自选(稍麻烦)
访问:ipdb.api.030101.xyz/?type=proxy获取IP。
逐个 CTRL+C CTRL+V 在Check ProxyIP - 代理IP检测服务上面测试。
IP来源:GitHub - ymyuuu/IPDB: Cloudflare反代优选IP库
使用Python批量测试
建议在Linux虚拟机上测试。
1.IP地址文件
将上述IP保存为 ip.txt,每行一个 IP 地址,可以带有端口(例如 1.2.3.4:8080)或没有端口(默认为 443)。
2.创建Python脚本
例如 batch_check_async.py。将以下代码保存到该文件中:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
| import asyncio, aiohttp, csv
INPUT = 'ip.txt' OUTPUT = 'results_async.csv' CONCURRENCY = 200 TIMEOUT = 10 URL = 'https://check.proxyip.cmliussss.net/check?proxyip={}'
async def fetch(session, ipraw, sem): if ':' not in ipraw: ipraw = ipraw + ':443' async with sem: try: async with session.get(URL.format(ipraw), timeout=TIMEOUT) as r: text = await r.text() try: data = await r.json() except: data = {"raw": text} return ipraw, data except Exception as e: return ipraw, {"error": str(e)} async def main(): ips = [line.strip() for line in open(INPUT) if line.strip()] sem = asyncio.Semaphore(CONCURRENCY) timeout = aiohttp.ClientTimeout(total=TIMEOUT) async with aiohttp.ClientSession(timeout=timeout) as sess: tasks = [fetch(sess, ip, sem) for ip in ips] results = await asyncio.gather(*tasks) with open(OUTPUT, 'w', newline='', encoding='utf-8') as f: writer = csv.writer(f) writer.writerow(['input', 'proxyIP', 'portRemote', 'success', 'colo', 'responseTime', 'message', 'timestamp', 'error', 'raw']) for ipraw, data in results: if isinstance(data, dict): writer.writerow([ ipraw, data.get('proxyIP', ''), data.get('portRemote', ''), data.get('success', ''), data.get('colo', ''), data.get('responseTime', ''), data.get('message', ''), data.get('timestamp', ''), data.get('error', ''), str(data.get('raw', data)) ]) else: writer.writerow([ipraw, '', '', '', '', '', '', '', 'unexpected', '']) print("done ->", OUTPUT) if __name__ == "__main__": asyncio.run(main())
|
3.运行
执行以下命令即可:
1 2 3 4 5 6 7 8 9 10 11
| python3 -m venv myenv
source myenv/bin/activate
pip install aiohttp
python3 batch_check_async.py
|
4.输出结果

方法二:简单粗暴
打开 Check ProxyIP - 代理IP检测服务 ,直接输入 proxyip.cmliussss.net 进行检测:

感觉是一个集中转发的地址,总共有209个地址,208个可以直接使用。
任选一个有效IP或者直接使用 proxyip.cmliussss.net 即可。
方法三:自建
自建就算了,本来也没什么敏感信息。
最后
ProxyIP其实还是挺重要的,虽然Youtube、ChatGPT等都不影响,但还是架不住CF体量大,如果不用ProxyIP,很多网站莫名其妙就无法访问了。