仅作技术交流,请勿违反所在地法律或从事非法活动。
很多便宜VPS,一个母鸡上不知道有多少小鸡,这些小鸡对外都是同一个IP (或同一个IP段),不排除有小鸡跑着自动程序去访问Google。Google认为源自这个IP (IP段) 的访问有问题,于是我们就会遇到Google要求人机身份验证,或者youtube不能评论。
- 一键安装Cloudflare WARP 并添加 IPv6 能力
bash <(curl -fsSL https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh) 6一路默认选项,直到返回以下内容
创建快捷 warp 指令成功
运行 WARP
后台获取 WARP IP 中,最大尝试5次……
第1次尝试
已成功获取 WARP Free 网络, 工作模式: 全局
-分界线—
IPv4: 37.*******.24 德国 AS44486 synlinq.de
IPv6: 2a8********1b 美国 AS13335 Cloudflare, Inc.
恭喜!WARP Free 已开启
总耗时: 42秒,脚本当天运行次数: 10380,累计运行次数: 74042308
IPv6 优先 , 工作模式: 全局 跑完检验一下
ifconfig # 也可以用 ip a 命令查看网络端口可以看到新添加的 wgcf 端口
- 修改飞机配置文件
具体看你安装的是v2还是x,这里以x为例
修改/etc/xray/config.json,在outbounds里增加一段
{
"protocol": "freedom",
"settings": {
"domainStrategy": "UseIPv6"
},
"tag": "wgcf-ipv6"
},在routing里增加一段
{
"type": "field",
"outboundTag": "wgcf-ipv6", // 这个tag和"outbounds"判断的tag名字一样
"domain": ["geosite:google"] // google 走 IPv6
},配置参考
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"inboundTag": [
"api"
],
"outboundTag": "api"
},
{
"type": "field",
"protocol": [
"bittorrent"
],
"marktag": "ban_bt",
"outboundTag": "block"
},
{
"type": "field",
"ip": [
"geoip:cn"
],
"marktag": "ban_geoip_cn",
"outboundTag": "block"
},
{ //
"type": "field",
"outboundTag": "wgcf-ipv6", //
"domain": ["geosite:google"] //
}, //
{
"type": "field",
"domain": [
"geosite:openai"
],
"marktag": "fix_openai",
"outboundTag": "direct"
},
{
"type": "field",
"ip": [
"geoip:private"
],
"outboundTag": "block"
}
]
},
"inbounds": [
{
"tag": "api",
"port": 14688,
"listen": "127.0.0.1",
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1"
}
}
],
"outbounds": [
{
"tag": "direct",
"protocol": "freedom"
},
{ //
"protocol": "freedom",
"settings": {
"domainStrategy": "UseIPv6"
},
"tag": "wgcf-ipv6"
}, //
{
"tag": "block",
"protocol": "blackhole"
}
]
}- 检查配置文件是否正确
root@a:~# /etc/xray/bin/xray --test --config /etc/xray/config.json
Xray 26.2.6 (Xray, Penetrates Everything.) 12ee51e (go1.25.7 linux/amd64)
A unified platform for anti-censorship.
2025/12/04 11:50:21.856198 [Info] infra/conf/serial: Reading config: &{Name:/etc/xray/config.json Format:json}
Configuration OK.
root@a:~# 说明配置成功,访问查看,此时已无需登录。
参考文章:
文章名称不宜显示
评论区: