找一台能解锁 ChatGPT 的 VPS,利用 XrayR 的出站规则和路由规则进行前置代理和分流
Cloudflare 的 WARP 可以免费用,参考官方教程
WARP 的 IP 会与落地机处于同一地区
本文以 Debian11 系统为例
1,安装存储库的 GPG 密钥BASH1
curl https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg
如果有提示无法安装和使用 GPG 的时候,请参考这个文章安装 GPG:
https://www.cyberciti.biz/faq/installing-gnupg2-on-debian-linux-to-fix-bash-gpg-command-not-found-error/
2,将存储库添加到计算机的 apt 源BASH1
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
3,更新 apt
sudo apt update
4,安装WARP
apt install cloudflare-warp
5,注册 WARP
warp-cli registration new
6,设置为代理模式(一定要先设置)
warp-cli mode proxy
7,连接 WARP
warp-cli connect
wget -N https://raw.githubusercontent.com/XrayR-project/XrayR-release/master/install.sh && bash install.sh
配置文件路径:
/etc/XrayR
a.修改 config.yml
:取消注释 RouteConfigPath
和 OutboundConfigPath
后的路径
b.修改custom_outbound.json
为:
[
{
"tag": "IPv4_out",
"protocol": "freedom",
"settings": {}
},
{
"tag": "IPv6_out",
"protocol": "freedom",
"settings": {
"domainStrategy": "UseIPv6"
}
},
{
"tag": "socks5-warp",
"protocol": "socks",
"settings": {
"servers": [
{
"address": "127.0.0.1",
"port": 40000
}
]
}
},
{
"protocol": "blackhole",
"tag": "block"
}
]
c.修改route.json
为:
{
"domainStrategy": "IPOnDemand",
"rules": [
{
"type": "field",
"outboundTag": "block",
"ip": [
"geoip:private"
]
},
{
"type": "field",
"outboundTag": "block",
"protocol": [
"bittorrent"
]
},
{
"type": "field",
"outboundTag": "socks5-warp",
"domain": [
"geosite:openai",
"geosite:netflix",
"domain:ip.sb"
]
},
{
"type": "field",
"outboundTag": "IPv4_out",
"network": "udp,tcp"
}
]
}
3,重启 XrayR:
xrayr restart
4,安装Warp分流插件
bash <(curl -sSL https://gitlab.com/fscarmen/warp_unlock/-/raw/main/unlock.sh)