Skip to content

Instantly share code, notes, and snippets.

@jimmylu2333
Last active February 6, 2022 06:21
Show Gist options
  • Save jimmylu2333/bf8d881d8930812c0ca4a3a6ed74777d to your computer and use it in GitHub Desktop.
Save jimmylu2333/bf8d881d8930812c0ca4a3a6ed74777d to your computer and use it in GitHub Desktop.
v2ray配置文件 - v2ray服务器端配置文件 - v2ray server configuration - v2ray configuration
{
"inbound": {
"port": 40006,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "3cfb2db1-7161-44d5-998c-e20d5b30544c",
"level": 1,
"alterId": 64
}
],
"detour": {
"to": "dynamicPort"
}
},
"streamSettings": {
"network": "kcp",
"kcpSettings": {
"mtu": 1350,
"tti": 20,
"uplinkCapacity": 10,
"downlinkCapacity": 100,
"congestion": false,
"readBufferSize": 1,
"writeBufferSize": 1,
"header": {
"type": "none"
}
}
}
},
"inboundDetour": [
{
"protocol": "vmess",
"port": "10000-10500",
"tag": "dynamicPort",
"settings": {
"default": {
"level": 1,
"alterId": 32
}
},
"allocate": {
"strategy": "random",
"concurrency": 2,
"refresh": 5
},
"streamSettings": {
"network": "kcp"
}
},
{
"protocol": "shadowsocks",
"port": 40006,
"settings": {
"method": "aes-256-gcm",
"password": "00000000",
"udp": false
}
}
],
"outbound": {
"protocol": "freedom",
"settings": {}
},
"transport": {},
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"policy": {
"levels": {
"0": {
"handshake": 4,
"connIdle": 300,
"uplinkOnly": 300,
"downlinkOnly": 300
}
}
}
}
@jimmylu2333
Copy link
Author

jimmylu2333 commented Mar 12, 2018

说明文件

这是v2ray Linux 服务器端配置文件。是我当前正在用的。使用方法是将这个配置文件替换/etc/v2ray/config.json 里面的内容即可。当然,在这之前有两项需要改。

  1. uuid,在inbound里面,uuid 在 v2ray 里面是用于验证的,所以要确保客户端和服务端uuid一致。
  2. shadowsocks 密码,在inboundDetour里面。

该配置文件可以使用的功能有。

  1. mkcp支持。这里面我限制了最高上传10MBytes每秒。保证够用就好。
  2. 请参考我的客户端配置文件。确保服务器端和客户端配置一致。传送门
  3. 服务器vmess 和 shadowsocks 使用端口40006,请确保40006端口的udp和tcp包可以通过防火墙。
  4. 动态端口,请确保10000-105000 端口的 udp 包可以通过防火墙。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment