Docs/Others/v2ray/服务端-容器启动v2ray.md

557 B

配置文件

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

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