添加 Others/v2ray/服务端-容器启动v2ray.md
This commit is contained in:
parent
17efc2c9b4
commit
5b3131cd55
1 changed files with 32 additions and 0 deletions
32
Others/v2ray/服务端-容器启动v2ray.md
Normal file
32
Others/v2ray/服务端-容器启动v2ray.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
|
||||
## 配置文件
|
||||
```
|
||||
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
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue