Docker v2ray Client

1. Docker pull

1
docker pull v2fly/v2fly-core

2. Configuration file 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
"inbounds": [
{
"port": 1080,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"udp": true
}
}
],
"outbounds": [
{
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "server", // Server address
"port": 30982, // port
"users": [
{
"id": "id", // User ID
"alterId": 64
}
]
}
]
}
},
{
"protocol": "freedom",
"tag": "direct"
}
],
"routing": {
"domainStrategy": "IPOnDemand",
"rules": [
{
"type": "field",
"ip": [
"geoip:private"
],
"outboundTag": "direct"
}
]
}
}

3. Run

1
docker run -d --name v2ray --network host -v /home/cryven/v2ray/config.json:/etc/v2ray/config.json v2fly/v2fly-core

4. Command

1
2
3
4
5
6
7
8
# Start
docker start v2ray

# Stop
docker stop v2ray

# Restart
docker restart v2ray

Docker v2ray Client
https://www.hardyhu.cn/2022/02/25/Docker-v2ray-Client/
Author
John Doe
Posted on
February 25, 2022
Licensed under