The diagram can be found at github, the reason to serve through port 20000 to 30000 is to give end user flexibility to change port if one they are using is blocked.
v2ray config:
{ "log": { "loglevel": "warning" }, "inbounds": [ { "port": 20000, "protocol": "vmess", "settings": { "clients": [ { "id": "UUIDv4", "alterId": 64 } ] }, "streamSettings": { "network": "kcp", "kcpSettings": { "uplinkCapacity": 5, "downlinkCapacity": 100, "congestion": true, "header": { "type": "none" } } } } ], "outbounds": [ { "protocol": "freedom", "settings": {} } ] }
and to start v2ray server:
docker run -d --rm \ --name v2ray \ --network host \ -v /path/to/v2ray/config.json:/etc/v2ray/config.json \ v2fly/v2fly-core run -config /etc/v2ray/config.json
Note that the service is running at non-privileged port so it does not need to be run as root, you can also do port forwarding if you cannot run host networking for a reason.
There are a couple of TODO though I’m not sure if I have time to get them done:
- Packaging latest v2ray, the priority is container (amd64 and arm), deb, rpm
- set it up on Raspberry Pi with Cloudflare tunnel, this is for T-Mobile Home Internet which does not provide port forwarding feature.