v2ray 配置分享

本文最后更新于 2018年10月21日 19:42 可能会因为没有更新而失效。如已失效或需要修正,请留言

这里分享几个v2ray的配置。其中mkcp的配置非常适合当前的环境。因为mkcp走的是UDP。


vmess+shadowsocks+多用户

{
  "log": {
    "access": "/var/log/v2ray/access.log",
    "error": "/var/log/v2ray/error.log",
    "loglevel": "warning"
  },
  "inbound": {
    "port": 11001,
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": "20f302cb-1b50-4e57-bb72-599f4c3dc6c6",
          "level": 1,
          "alterId": 64,
          "email": "[email protected]"
        }
      ]
    }
  },
  "inboundDetour": [
    {
      "protocol": "shadowsocks",
      "port": 12001,
      "settings": {
        "method": "aes-128-gcm",
        "password": "lighti.me",
        "udp": true
      }
    },
    {
      "port": 13182,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "263dd26f-04b2-4b76-8e02-c2264e015178",
            "level": 1,
            "alterId": 64,
            "email": "[email protected]"
          }
        ]
      }
    },
	{
      "port": 14182,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "76b15d1e-d36c-4368-b1e1-2c51dc96b0c6",
            "level": 1,
            "alterId": 64,
            "email": "[email protected]"
          }
        ]
      }
    }
  ],
  "outbound": {
    "protocol": "freedom",
    "settings": {}
  },
  "outboundDetour": [
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    }
  ],
  "routing": {
    "strategy": "rules",
    "settings": {
      "rules": [
        {
          "type": "field",
          "ip": [
            "0.0.0.0/8",
            "10.0.0.0/8",
            "100.64.0.0/10",
            "127.0.0.0/8",
            "169.254.0.0/16",
            "172.16.0.0/12",
            "192.0.0.0/24",
            "192.0.2.0/24",
            "192.168.0.0/16",
            "198.18.0.0/15",
            "198.51.100.0/24",
            "203.0.113.0/24",
            "::1/128",
            "fc00::/7",
            "fe80::/10"
          ],
          "outboundTag": "blocked"
        }
      ]
    }
  }
}

vmess+mkcp+多用户

{
  "log": {
    "access": "/var/log/v2ray/access.log",
    "error": "/var/log/v2ray/error.log",
    "loglevel": "warning"
  },
  "inbound": {
    "port": 11001,
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": "20f302cb-1b50-4e57-bb72-599f4c3dc6c6",
          "level": 1,
          "alterId": 64,
          "email": "[email protected]"
        }
      ]
    },
    "streamSettings": {
      "network": "kcp"
    }
  },
  "inboundDetour": [
    {
      "protocol": "shadowsocks",
      "port": 12001,
      "settings": {
        "method": "aes-128-gcm",
        "password": "lighti.me",
        "udp": true
      }
    },
    {
      "port": 13182,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "263dd26f-04b2-4b76-8e02-c2264e015178",
            "level": 1,
            "alterId": 64,
            "email": "[email protected]"
          }
        ]
      },
      "streamSettings": {
        "network": "kcp"
      }
    },
	{
      "port": 14182,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "76b15d1e-d36c-4368-b1e1-2c51dc96b0c6",
            "level": 1,
            "alterId": 64,
            "email": "[email protected]"
          }
        ]
      },
      "streamSettings": {
        "network": "kcp"
      }
    }
  ],
  "outbound": {
    "protocol": "freedom",
    "settings": {}
  },
  "outboundDetour": [
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    }
  ],
  "routing": {
    "strategy": "rules",
    "settings": {
      "rules": [
        {
          "type": "field",
          "ip": [
            "0.0.0.0/8",
            "10.0.0.0/8",
            "100.64.0.0/10",
            "127.0.0.0/8",
            "169.254.0.0/16",
            "172.16.0.0/12",
            "192.0.0.0/24",
            "192.0.2.0/24",
            "192.168.0.0/16",
            "198.18.0.0/15",
            "198.51.100.0/24",
            "203.0.113.0/24",
            "::1/128",
            "fc00::/7",
            "fe80::/10"
          ],
          "outboundTag": "blocked"
        }
      ]
    }
  }
}

vmess+多用户+多IP出口

{
  "log": {
    "access": "/var/log/v2ray/access.log",
    "error": "/var/log/v2ray/error.log",
    "loglevel": "warning"
  },
  "inbound": {
    "port": 11001,
    "listen": "1.1.1.1",
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": "20f302cb-1b50-4e57-bb72-599f4c3dc6c6",
          "level": 1,
          "alterId": 64,
          "email": "[email protected]"
        }
      ]
    }
  },
  "inboundDetour": [
    {
      "port": 13182,
      "listen": "1.1.1.2",
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "263dd26f-04b2-4b76-8e02-c2264e015178",
            "level": 1,
            "alterId": 64,
            "email": "[email protected]"
          }
        ]
      }
    },
	{
      "port": 14182,
      "listen": "1.1.1.3",
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "76b15d1e-d36c-4368-b1e1-2c51dc96b0c6",
            "level": 1,
            "alterId": 64,
            "email": "[email protected]"
          }
        ]
      }
    }
  ],
  "outbound": {
    "protocol": "freedom",
    "settings": {}
  },
  "outboundDetour": [
    {
      "protocol": "freedom",
      "sendThrough": "1.1.1.2",
      "settings": {},
      "tag": "ip2"
    },
    {
      "protocol": "freedom",
      "sendThrough": "1.1.1.3",
      "settings": {},
      "tag": "ip3"
    },
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    }
  ],
  "routing": {
    "strategy": "rules",
    "settings": {
      "rules": [
        {
          "type": "field",
          "ip": [
            "0.0.0.0/8",
            "10.0.0.0/8",
            "100.64.0.0/10",
            "127.0.0.0/8",
            "169.254.0.0/16",
            "172.16.0.0/12",
            "192.0.0.0/24",
            "192.0.2.0/24",
            "192.168.0.0/16",
            "198.18.0.0/15",
            "198.51.100.0/24",
            "203.0.113.0/24",
            "::1/128",
            "fc00::/7",
            "fe80::/10"
          ],
          "outboundTag": "blocked"
        },
        {
          "type": "field",
          "user": [
            "[email protected]"
          ],
          "outboundTag": "ip2"
        },
        {
          "type": "field",
          "user": [
            "[email protected]"
          ],
          "outboundTag": "ip3"
        }
      ]
    }
  }
}

 

相关几点:

截至当前(2018.8.4),v2ray无法实现:限速、限制用户数、限制流量。

相关页面:

打赏
欢迎转载,请注明出处:轻时代 » v2ray 配置分享

评论 4

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    这个怎么使用?

    大大6年前 (2018-08-10)回复
  2. #2

    大佬 这个速度怎么样 可以配上kcptun么

    布丁6年前 (2018-08-12)回复
    • 配置里面已经有kcp了

      hao6年前 (2018-08-14)回复

打赏一下作者,鼓励他发表更多的精彩文章

支付宝扫一扫打赏

微信扫一扫打赏