- 一种方式是走 Cloudflare WARP,WARP 可以运行在 proxy mode 而不是接管全局流量
warp-cli register
# warp 监听本地的11111端口
warp-cli set-proxy-port 11111
# warp proxy mode
warp-cli set-mode proxy
# 永久开启
warp-cli enable-always-on
https_proxy=socks5://127.0.0.1:11111 http_proxy=socks5://127.0.0.1:11111 go run main.go
- 还有一种方式是使用 Cloudflare Workers,请求由 Workers 转发
export default {
async fetch(request: Request): Promise {
/**
* Replace `remote` with the host you wish to send requests to
*/
const remote = "https://example.com";
return await fetch(remote, request);
},
};