MrSheep

v2ray进阶操作—中轉
國內到我HE的小機線路峰值ping偏高,但是ip很清真,剛好我的HK小機接入了HE的線路。用HK中轉方案如下1.使...
扫描右侧二维码阅读全文
10
2019/05

v2ray进阶操作—中轉

國內到我HE的小機線路峰值ping偏高,但是ip很清真,剛好我的HK小機接入了HE的線路。用HK中轉
方案如下
1.使用UUID1鏈接中轉服務器,將流量路由到#1服務器
2.使用UUID2鏈接中轉服務器,將流量路由到#2服務器
3.使用UUID3鏈接中轉服務器,直接使用當前服務器訪問

服務器配置

末端服務器配置

參考V2Ray websocket(ws)+tls+Nginx分流+BBR(锐速)+cdn+网站(如typecho)

中轉服務器

  "log": {
    "access": "/var/log/v2ray/access.log",
    "error": "/var/log/v2ray/error.log",
    "loglevel": "warnings"
  },
   "inbounds": [
    {
      "port": 端口,
      "protocol": "vmess",
      "settings":{
        "clients": [
        {
          "id": "UUID1",
          "alterId": 16,
          "email": "Email1(隨意寫)"
        },
        {
          "id": "UUID2",
          "alterId": 16,
          "email": "Email2(隨意)"
        },
        {
          "id": "UUID3",
          "alterId": 16,
          "email": "Email3(隨意)"
        }
      ]
    },
    //鏈接中轉服務器的協議爲wss
      "streamSettings": {
        "network": "ws",
        "security": "auto",
        "wsSettings": {
          "path": "/你的path/",
          "connectionReuse":true,
          "headers":{
            "Host":"域名",
          }
        },
      "disableInsecureEncryption": true
    }
  }
],
  "outbound":{
  //使用UUID3,不進行中轉
      "protocol": "freedom",
      "settings": {}
    },
  "outboundDetour": [
    {
    //使用UUID1,路由至下一節點,下一節點使用普通tcp
      "protocol": "vmess",
      "settings": {
        "vnext": [
          {
            "address": "你的ip",
            "port": 端口,
            "users": [
              {
                "id": "和下一節點一致",
                "alterId": 16,
                "security": "auto"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "tcp",
        "security": "none"
      },
      "tag": "tag1之後會用到"
    },
    //使用UUID2,路由至下一節點,採用wss
    {
      "protocol": "vmess",
      "settings": {
        "vnext": [
          {
            "address": "域名",
            "port": 443,
            "users": [
              {
                "id": "和下一節點一致",
                "alterId": 16,
                "security": "auto"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "security": "tls",
        "wsSettings": {
          "connectionReuse":true,
          "path": "/你的path/",
          "headers":{
            "Host":"域名"
          }
        }
      },
      "tag": "tag2之後會用到,和上面的不一樣"
    }],
  "routing": {
  //路由策略
    "strategy": "rules",
    "settings": {
      "rules": [
        {
          "type": "field",
          "user": "和上面的Email1一致",
          "outboundTag": "上面寫的tag1"
        },
        {
          "type": "field",
          "user": "和上面的Email2一致",
          "outboundTag": "上面寫的tag2"
        }
      ]
    }
  }
}

Client

配置不同的uuid即可

吐槽

英文單詞需要加s。。。

contribute

V2Ray 白话文教程
Project V

客官们支持一下啦,建站维护开销不少

搬瓦工,建站、代理稳如狗,最低19.99刀一年,更有CN2线路等着你>>[传送门]

DigitalOcean大法好,Xeon Gold豪上天,最低5刀一个月,注册充值得10刀,还不快去???[传送门]

Vultr,最低5刀一个月,全球15节点,注册充值得10刀,全SSD Kvm机器[传送门]

Cloudcone价格低,直连线路大法好,随时随地放优惠[传送门]

Last modification:May 10th, 2019 at 03:31 pm

Leave a Comment

召唤看板娘