Huaiyao Jin

Huaiyao Jin

使用 Cloudflare WARP 解锁 ChatGPT

使用 Vultr VPS 科学上网以后,Chatgpt API 使用没有问题,但是网页访问 chat.openai.com 仍然是 Access denied。

简单使用的话也未必一定要访问网页版,可以用 Poe 或者 OpenCat。只是我想试用一下 ChatGPT Plus 才能用的 GPT-4,不得不访问网页版。

做了一番尝试:

于是实施一下方案二。 参考 https://pkg.cloudflareclient.com/install

Ubuntu 20.04 LTS 下

curl https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list

sudo apt update

参考 https://developers.cloudflare.com/warp-client/get-started/linux/

sudo apt install cloudflare-warp`

systemctl status warp-svc

warp-cli register

warp-cli set-mode proxy

warp-cli connect

warp-cli enable-always-on

warp-cli warp-stats
vi /usr/local/etc/v2ray/config.json

{
    "inbounds": [
        {
            "port": 10086, 
            "protocol": "vmess",
            "settings": {
                "clients": [
                    {
                        "id": "09096d21-dd57-48ee-9111-38421e6a6b90"
                    }
                ]
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "freedom"
        },
        {
            "tag": "warp",
            "protocol": "socks",
            "settings": {
                "servers": [
                    {
                        "address": "127.0.0.1",
                        "port": 40000,
                        "users": []
                    }
                ]
            }
        }
    ],
    "routing": {
    "rules": [
        {
        "type": "field",
        "domain": [
            "openai.com",
            "ai.com"
        ],
        "outboundTag": "warp"
    }
    ]
}
}


systemctl stop v2ray

systemctl start v2ray
rjin@vultr:~$ curl ipinfo.io
{
"ip": "xxx.xxx.xxx.xxx",
"hostname": "xxx.xxx.xxx.xxx.vultrusercontent.com",
"city": "Piscataway",
"region": "New Jersey",
"country": "US",
"loc": "40.4993,-74.3990",
"org": "AS20473 The Constant Company, LLC",
"postal": "08854",
"timezone": "America/New_York",
"readme": "https://ipinfo.io/missingauth"

rjin@vultr:~$ curl -x "socks5://127.0.0.1:40000" ipinfo.io
{
"ip": "104.28.215.142",
"city": "Willowbrook",
"region": "New York",
"country": "US",
"loc": "40.6032,-74.1385",
"org": "AS13335 Cloudflare, Inc.",
"postal": "10314",
"timezone": "America/New_York",
"readme": "https://ipinfo.io/missingauth"

在电脑上重启一下 V2rayU ,就可以正常访问 https://chat.openai.com/auth/login 了。