前面写过一篇关于v2ray的文章本次只是更新一下

2ray配置 WebSocket+TLS+Nginx

环境配置

v2ray 4.10.0
bt 6.8.8

v2ray配置

{
  "inbounds": [{
    "port": 39005, //自行修改
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": "e4836bef-487b-8e56-91c106e74870", //自行修改
          "level": 1,
          "alterId": 64
        }
      ]
    },
  "streamSettings": {
      "network": "ws", 
      "security": "auto", 
      "wsSettings": {
        "path": "/PATH/", 
        "headers": {
          "Host": "klxzl.cn"   //自行修改
        }
      }
    }
  }],
  "outbounds": [{
    "protocol": "freedom",
    "settings": {}
  },{
    "protocol": "blackhole",
    "settings": {},
    "tag": "blocked"
  }],
  "routing": {
    "rules": [
      {
        "type": "field",
        "ip": ["geoip:private"],
        "outboundTag": "blocked"
      }
    ]
  }
}

宝塔配置

直接新建网站
然后开启ssl并强制https
在创建反向代理如图
20190109213712.jpg
然后编辑反向代理配置文件
去掉配置的#号如图

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

20190109213938.jpg
然后就可以用v2rayN连接了

如果觉得我的文章对你有用,请随意赞赏