| 转自: https://obvps.com/2021/03/12/warpnf.html 
 
 据说 cloudflare warp 服务居然还有这种功效,这能不折腾配上么
 
 
 访问 https://warp.plus/EmoCb 可以下载注册安装获取LICENSE_KEY给之后VPS上使用
 如果你还需要warp+流量可以参考[这个脚本](https://github.com/mixool/across/tree/master/wireguard),实际上免费版无限流量对于解锁NF和解除google验证码效果和warp+效果是一样的
 
 https://github.com/ViRb3/wgcf 生成配置
 会用到上一步的LICENSE_KEY来生成配置文件wgcf-profile.conf
 wget -O /usr/bin/wgcf https://github.com/ViRb3/wgcf/releases/download/v2.2.2/wgcf_2.2.2_linux_amd64
 chmod +x /usr/bin/wgcf
 wgcf register
 wgcf generate
 WGCF_LICENSE_KEY="123412341234" wgcf update
 
 文件wgcf-profile.conf内有二行代码,解锁一般都是使用IPv6,即删除AllowedIPs = 0.0.0.0/0这一行
 sed -i "s/AllowedIPs = 0.0.0.0\/0//" wgcf-profile.conf
 
 wg 安装可以参考安装cloud内核并开启bbr的脚本来安装较新的内核
 bash <(curl -s https://raw.githubusercontent.com/mixool/across/master/kvmbbr/bbr.sh) cloud
 内核支持,安装就很简单了
 apt update
 apt install wireguard -y
 
 把上一步生成的配置内容导入到/etc/wireguard目录下
 cat  wgcf-profile.conf >/etc/wireguard/wgcf.conf
 关闭 wg-quick down wgcf
 启动 wg-quick up wgcf
 状态 wg
 
 配置ray路由规则
 搭建可以参这个脚本 https://github.com/mixool/across/tree/master/xray
 参考并编辑config.json配置文件部分内容如下,主要是二条directv6,之后重启服务即可
 
 复制代码"outbounds": 
        [
                {"protocol": "freedom","tag": "direct","settings": {}},
                {"protocol": "freedom","tag": "directv6","settings": {"domainStrategy": "UseIPv6"}},
                {"protocol": "blackhole","tag": "blocked","settings": {}},
                {"protocol": "freedom","tag": "twotag","streamSettings": {"network": "domainsocket","dsSettings": {"path": "/usr/local/etc/xray/ss","abstract": true}}}
        ],
        "routing": 
        {
                "rules": 
                [
                        {"type": "field","outboundTag": "directv6","domain": ["geosite:netflix","geosite:google"]},
                        {"type": "field","inboundTag": ["onetag"],"outboundTag": "twotag"},
                        {"type": "field","outboundTag": "blocked","ip": ["geoip:private"]},
                        {"type": "field","outboundTag": "blocked","domain": ["geosite:private","geosite:category-ads-all"]}
                ]
        }
 |