docker 运行
1
| docker run -d --restart=always --name v2ray -v /path/v2ray:/etc/v2ray -p 7777:1080 v2ray/official v2ray -config=/etc/v2ray/config.json
|
config.json
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| { "inbound": { "port": 1080, "protocol": "socks", "settings": { "auth": "noauth" } }, "outbound": { "protocol": "vmess", "settings": { "vnext": [ { "address": "your.server.com", "port": 2000, "users": [ { "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "alterId": 64 } ] } ] } } }
|
后面的 7777 可以换成自己的本地端口,如果只限本地使用可以换成127.0.0.1:7777