打开VPS目录 /etc/v2ray ,找到config.json

我们需要更改你的V2RAY配置,让奈飞(NetFlix)的流量经过已经解锁NetFlix服务的DNS,其他的流量和以前一样。

我这边为大家提供一个范例配置(这个配置是v2ray+ws+tls+nginx转发的一个配置)

{
  "dns": {
        "servers": [
            {
                "address": "xxx.xxx.xxx.xxx",     //此处为官方为你提供的DNS地址
                "port": 53,
                "domains": [
                    "domain:netflix.com",
                    "domain:netflix.net",
                    "domain:nflximg.net",
                    "domain:nflxvideo.net",
                    "domain:nflxso.net",
                    "domain:nflxext.com"
                ]
            },
            "localhost"
        ]
    },
  "inbounds": [{
    "port": 28745,           //此处为你V2ray的配置端口,Nginx会在本地监听这个端口进行转发
    "listen":"127.0.0.1",
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": "xxx-xxx-xxx-xxx", //此处为安装时生成的 id
          "level": 1,
          "alterId": xx      //此处为安装时生成的 alterId
        }
      ]
    },
    "streamSettings": {
      "network": "ws",       //你的网络方式
      "wsSettings": {
        "path": "/xxxxxx"   //此处为路径,不要落下/
      }
    }
  }],
  "outbounds": [
        {
            "protocol": "freedom",
            "settings": {
                "domainStrategy": "UseIP"
            },
            "tag": "direct"
        },
        {
            "protocol": "blackhole",
            "settings": {
                "response": {
                    "type": "http"
                }
            },
            "tag": "blocked"
        }
    ],
  "routing": {
    "rules": [
      {
        "type": "field",
        "ip": ["geoip:private"],
        "outboundTag": "blocked"
      }
    ]
  }
}

修改配置完成以后,请重启你的V2RAY服务,或是重启VPS

## 启动
systemctl start v2ray
## 停止
systemctl stop v2ray
## 重启
systemctl restart v2ray
## 开机自启
systemctl enable v2ray

其实第二种方法也可以做分流,让不同的视讯走不同的DNS,代码如下:

"dns": {
    "servers": [
        {
            "address": "美国DNS",
            "port": 53,
            "domains": [
                "domain:netflix.com",
                "domain:netflix.net",
                "domain:nflximg.net",
                "domain:nflxvideo.net",
                "domain:nflxso.net",
                "domain:nflxext.com"
            ]
        },
        {
            "address": "台湾DNS",
            "port": 53,
            "domains": [
                "domain:gamer2-cds.cdn.hinet.net",
                "domain:gamer-cds.cdn.hinet.net",
                "domain:gamer.com.tw",
                "domain:i2.bahamut.com.tw",
                "domain:app-measurement.com"
            ]
        },
        {
            "address": "香港DNS",
            "port": 53,
            "domains": [
                "domain:bilibili.com"
            ]
        },
        "localhost"
    ]
},
Last modification:July 14, 2020
如果觉得我的文章对你有用,请随意赞赏