参考
- https://telegra.ph/v2rayA%E6%94%AF%E6%8C%81%E5%85%A8%E5%B1%80%E9%80%8F%E6%98%8E%E4%BB%A3%E7%90%86%E7%9A%84V2Ray-Linux%E5%AE%A2%E6%88%B7%E7%AB%AF—%E8%8D%92%E5%B2%9B-04-16-3
- https://github.com/v2rayA/v2rayA/wiki/Usage
Problem
如果在国内机器上设置好透明代理,既可以方便机器本身的翻墙上网;又能够提供给其他机器的翻墙代理。
Solution
Shell
x
10
10
1
mkdir -p /data/v2raya && cd /data/v2raya
2
docker run -d \
3
--restart=always \
4
--privileged \
5
--network=host \
6
--name v2raya \
7
-v /etc/resolv.conf:/etc/resolv.conf \
8
-v /data/v2raya:/etc/v2raya \
9
mzz2017/v2raya
10
docker logs -f v2raya
服务器端通过Web配置
客户端

Annex:Mac上的服务器配置
If you’re using MacOSX or other environment does not support host mode, you can not use “transparent proxy” in this case, docker command will be slightly different: With V2RayA service running, visit the port 2017 to enjoy it (such as http://localhost:2017).
Shell
xxxxxxxxxx
1
9
1
# run v2raya
2
mkdir -p ~/data/v2raya && cd ~/data/v2raya
3
docker run -d \
4
-p 2017:2017 \
5
-p 20170-20172:20170-20172 \
6
--restart=always \
7
--name v2raya \
8
-v $(pwd):/etc/v2raya \
9
mzz2017/v2raya