v2ray 配置分享

这里分享几个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": "v2ray@lighti.me"
        }
      ]
    }
  },
  "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": "vmess@lighti.me"
          }
        ]
      }
    },
	{
      "port": 14182,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "76b15d1e-d36c-4368-b1e1-2c51dc96b0c6",
            "level": 1,
            "alterId": 64,
            "email": "kcp@lighti.me"
          }
        ]
      }
    }
  ],
  "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": "v2ray@lighti.me"
        }
      ]
    },
    "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": "vmess@lighti.me"
          }
        ]
      },
      "streamSettings": {
        "network": "kcp"
      }
    },
	{
      "port": 14182,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "76b15d1e-d36c-4368-b1e1-2c51dc96b0c6",
            "level": 1,
            "alterId": 64,
            "email": "kcp@lighti.me"
          }
        ]
      },
      "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": "v2ray@lighti.me"
        }
      ]
    }
  },
  "inboundDetour": [
    {
      "port": 13182,
      "listen": "1.1.1.2",
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "263dd26f-04b2-4b76-8e02-c2264e015178",
            "level": 1,
            "alterId": 64,
            "email": "vmess@lighti.me"
          }
        ]
      }
    },
	{
      "port": 14182,
      "listen": "1.1.1.3",
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "76b15d1e-d36c-4368-b1e1-2c51dc96b0c6",
            "level": 1,
            "alterId": 64,
            "email": "kcp@lighti.me"
          }
        ]
      }
    }
  ],
  "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": [
            "vmess@lighti.me"
          ],
          "outboundTag": "ip2"
        },
        {
          "type": "field",
          "user": [
            "kcp@lighti.me"
          ],
          "outboundTag": "ip3"
        }
      ]
    }
  }
}

 

相关几点:

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

相关页面:

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

评论 4

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

    这个怎么使用?

    大大2个月前 (08-10)回复
  2. #2

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

    布丁2个月前 (08-12)回复
    • 配置里面已经有kcp了

      hao2个月前 (08-14)回复

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

支付宝扫一扫打赏

微信扫一扫打赏