Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save likaci/602ee4505a7ec7060a09bd4847255a3b to your computer and use it in GitHub Desktop.
Save likaci/602ee4505a7ec7060a09bd4847255a3b to your computer and use it in GitHub Desktop.

安装 cloudflare warp 可以按照 https://developers.cloudflare.com/warp-client/get-started/linux/

以下为 Ubuntu amd64 安装流程, arm实例不可以

wget https://pkg.cloudflareclient.com/uploads/cloudflare_warp_2023_1_133_1_amd64_ba4cb58d64.deb
sudo dpkg -i cloudflare_warp_2023_1_133_1_amd64_ba4cb58d64.deb
sudo apt --fix-broken install -y
warp-cli register
warp-cli set-mode proxy
warp-cli enable-always-on
warp-cli connect

到这一步warp安装完成, vps 40000端口会开启一个socks5代理, 下面是验证warp是否生效

curl ip.fm 会显示vps ip
export ALL_PROXY=socks5://127.0.0.1:40000
curl ip.fm 会变成 cloudflare 美国ip

最后用clash relay模式把 vps原本的代理和cloudflare socks5串起来

流量就会这样转发 电脑 -> vps原本的ss/trojan -> cloudflare warp socks5 -> openai服务器

Clash 大概配置

proxies:
  - name: Shadowsocks
    type: ss
    ...省略...

  - name: "WarpLocal"
    type: socks5
    server: 127.0.0.1
    port: 40000


proxy-groups:
  - name: WARP
    type: relay
    proxies:
      - Shadowsocks
      - WarpLocal

rules:
  - DOMAIN-SUFFIX,openai.com,WARP
@chismo950
Copy link

@chismo950 我用127.0.0.1不行,改成localhost之后成功了。

我localhost也不行

@chismo950
Copy link

@chismo950 配置看起来没问题. 我的环境和你也一样, oracle+warp, 电脑通过vps的warp访问 openai/google 也正常 你电脑用clash relay访问 ip.fm 正常吗?

换用你这个版本可以了:cloudflare_warp_2023_1_133_1_amd64_ba4cb58d64.deb
不知道最新版那个为什么不行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment