分类:运维 发布时间:2022-04-05 13:34:00
### 中转V2ray服务器配置 ##### /etc/v2ray/config.json ``` { "inbound": { "port": 8122, // docker 内部 v2ray 的端口 "protocol": "vmess", // 我这里使用的 vmess 协议,也可以使用其他协议 "settings": { "clients": [ { "id": "uid-xxxxxxxxxxxxx", // vmess 协议需要配置的 uid "alterId": 100 } ] } }, "outbound" : { "mux" : { "concurrency" : 8, "enabled" : true }, "protocol" : "vmess", // 目标 v2ray 服务器的协议 "settings" : { "vnext" : [ { "users" : [ { "id" : "uid-yyyyyyyyyyyyy", // 目标 v2ray 服务器的 vmess 协议需要配置的 uid "alterId" : 64 // 和目标服务器保持一致 } ], "address" : "xxx.com", // 目前 v2ray 服务器的ip 地址或域名 "port" : xxx_1 // 目标 v2ray 服务器的开放的对外端口 } ] }, "streamSettings": { "network": "tcp", // 记得配置 tcp "security": "none", "tlsSettings": {}, "tcpSettings": {}, "httpSettings": {}, "kcpSettings": { "mtu": 1350, "tti": 50, "uplinkCapacity": 100, "downlinkCapacity": 100, "congestion": false, "readBufferSize": 2, "writeBufferSize": 2, "header": { "type": "none" } }, "wsSettings": {}, "quicSettings": {} } }, "inboundDetour": [], "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" } ] } } } ``` ### 一键部署中转服务器 ``` sudo docker run -it -d -v /etc/v2ray:/etc/v2ray -p 8122:8122 v2ray/official v2ray -config=/etc/v2ray/config.json ```
搜索
文章分类
最新文章