一:恢复DNS64(重装系统者,可直接跳到第二步脚本安装)
echo -e "search blue.kundencontroller.de\noptions rotate\nnameserver 2a02:180:6:5::1c\nnameserver 2a02:180:6:5::4\nnameserver 2a02:180:6:5::1e\nnameserver 2a02:180:6:5::1d" > /etc/resolv.conf
二、重装系统能解决99%的问题!无须添加DNS64!一键到底!
仅支持Debian 10/Ubuntu 20.04系统,根据自己需求选择以下脚本1或者脚本2(有无成功可查看脚本末尾提示)
脚本1:IPV4是WARP分配的IP,IPV6是VPS本地IP
wget -qO- https://cdn.jsdelivr.net/gh/YG-tsj/EUserv-warp/warp4.sh|bash
脚本2:IPV4与IPV6都是WARP分配的IP
wget -qO- https://cdn.jsdelivr.net/gh/YG-tsj/EUserv-warp/warp64.sh|bash
MACK-A脚本:
wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh
mack-a项目地址:https://github.com/mack-a/v2ray-agent
mack-a脚本配置文件路径:/etc/v2ray-agent/xray/conf Xray
重启:systemctl restart xray Xray
状态:systemctl status xray
Netflix检测项目:https://github.com/YG-tsj/Netflix-Check
注意:域名解析所填写的IP必须是VPS本地IP,与WARP分配的IP没关系!
提示:配置文件wgcf.conf和注册文件wgcf-account.toml都已备份在/etc/wireguard目录下!
查看WARP当前统计状态:wg
IPV6 VPS专用分流配置文件(以下默认全局IPV4优先,IP、域名自定义,详情见视频教程)
{ "outbounds": [ { "tag":"IP6-out", "protocol": "freedom", "settings": {} }, { "tag":"IP4-out", "protocol": "freedom", "settings": { "domainStrategy": "UseIPv4" } } ], "routing": { "rules": [ { "type": "field", "outboundTag": "IP4-out", "domain": [""] }, { "type": "field", "outboundTag": "IP6-out", "network": "udp,tcp" } ] } }
相关WARP进程命令
手动临时关闭WARP网络接口
wg-quick down wgcf
手动开启WARP网络接口
wg-quick up wgcf
启动systemctl enable wg-quick@wgcf
开始systemctl start wg-quick@wgcf
重启systemctl restart wg-quick@wgcf
停止systemctl stop wg-quick@wgcf
关闭systemctl disable wg-quick@wgcf
未经允许不得转载:搬瓦工VPS_美国VPS » 国外VPS:使用Cloudflare WARP脚本搭建Xray 抛弃NAT64/DNS64,IPV4与IPV6分流自定义域名优先设置教程(搬瓦工、Vultr、RackNerd 、Hostdare、DMIT、CloudPowerall等)