据说 cloudflare 基于 wireguard 的 warp 服务居然还有这种功效,这能不折腾配上么

一. cloudflare warp 注册,此步骤可跳过

  • 访问 https://warp.plus/EmoCb 可以下载注册安装获取LICENSE_KEY给之后VPS上使用
  • 如果你还需要warp+流量可以参考这个脚本,实际上免费版无限流量对于解锁NF和解除google验证码效果和warp+效果是一样的

二. ViRb3/wgcf 生成配置

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-profile.conf内有二行代码,如果需要IPv6就删除AllowedIPs = 0.0.0.0/0,需要IPv4就删除AllowedIPs = ::/0,解锁一般都是使用IPv6,即删除AllowedIPs = 0.0.0.0/0这一行
    sed -i "s/AllowedIPs = 0.0.0.0\/0//" wgcf-profile.conf

三. wireguard 安装

  • 可以参考安装cloud内核并开启bbr的脚本来安装较新的内核
    bash <(curl -s https://raw.githubusercontent.com/mixool/across/master/kvmbbr/bbr.sh) cloud
  • 内核支持,安装就很简单了
apt update
apt install wireguard resolvconf -y
  • 把上一步生成的配置内容导入到/etc/wireguard目录下
    cat wgcf-profile.conf >/etc/wireguard/wgcf.conf
  • 关闭 wg-quick down wgcf
  • 启动 wg-quick up wgcf
  • 状态 wg

四. 配置ray路由规则

  • 搭建可以参考通过caddy|xray|acme.sh配置vless(xtls) + vmess + trojan + ss+v2ray-plugin + naiveproxy共用443端口的这个脚本 https://github.com/mixool/across/tree/master/xray
  • 参考并编辑/usr/local/etc/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"]}
        ]
    }

标签: none

已有 3 条评论

  1. [](https://img.ovo.gs/uploads/2021/04/20210426201017.png)
    大佬,我按照你这教程做了之后,发现只有v6是走warp的,如果想v4也走,该要怎么改鸭

    1. OB OB

      都走的话 你就连不上你的机器了
      可以按照教程想办法把v6改成v4

  2. OB OB

    教程内容在debian 10 64的virmach和腾讯云通过测试,如果出错,多google错误内容~~!

添加新评论