32 lines
No EOL
557 B
Markdown
32 lines
No EOL
557 B
Markdown
|
|
## 配置文件
|
|
```
|
|
mkdir /etc/v2ray
|
|
cat > /etc/v2ray/config.json<<EOF
|
|
{
|
|
"inbounds": [
|
|
{
|
|
"port": 9087,
|
|
"protocol": "vmess",
|
|
"settings": {
|
|
"clients": [
|
|
{
|
|
"id": "8859540f-2613-4c6a-b91d-bb4a1396073b"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"outbounds": [
|
|
{
|
|
"protocol": "freedom"
|
|
}
|
|
]
|
|
}
|
|
EOF
|
|
```
|
|
## 启动v2ray
|
|
```shell
|
|
docker pull v2fly/v2fly-core
|
|
docker run -d --name v2ray -v /etc/v2ray/config.json:/etc/v2ray/config.json -p 9087:9087 v2fly/v2fly-core run -c /etc/v2ray/config.json
|
|
``` |