A lightweight Dockerized transparent proxy that forwards all in network traffic
in associated network through a VLESS + Reality server. Designed for simplicity:
paste your VLESS link into vless.conf, run Docker, and you're done. It is used in
a cluster with other containers that need to proxy all their traffic.
- VLESS + Reality client (Xray-core)
- Supports
tcpandxhttptransports - Auto-generated and printed
config.json(easy debugging) - Minimal footprint, no host dependencies besides Docker
VLESS-to-HTTP/
├── compose.yaml # docker compose service
├── Dockerfile # image build (Xray installation)
├── entrypoint.sh # parses vless.conf → generates config.json
└── vless.conf # your VLESS Reality URL (single line)
- Docker & Docker Compose
docker --version docker compose version
Add vless.conf and paste your full VLESS URL in one line:
TCP example:
vless://UUID@HOST:PORT?security=reality&encryption=none&pbk=PUBLIC_KEY&fp=fingerprint&sni=servername&sid=shortid&spx=/&flow=xtls-rprx-visionXHTTP example:
vless://UUID@HOST:PORT?security=reality&encryption=none&type=xhttp&path=%2Fmy-path&host=example.com&sni=example.com&pbk=PUBLIC_KEY&sid=SHORT_ID&fp=chrome&mode=autoSupported transport query parameters:
type=tcportype=xhttp(tcpis the default if omitted)- For
xhttp,pathis required - For
xhttp,hostandmodeare optional
Example:
vless://49b4b82b-73f0-4772-86ca-ca5059375c63@45.127.127.127:443?security=reality&encryption=none&pbk=6ECfTRNxRBiv7GLIIwOhwlkDs9NyYoZ7lHZrWeU1Q&fp=firefox&sni=github.com&sid=c8aa6a68a476c885&spx=/&flow=xtls-rprx-vision
Tip: keep it on a single line; comments after
#are ignored.
docker compose up --buildLogs (shows the generated config and Xray output):
docker logs -f xray-proxyTo test you need to start your app container with this proxy container together.
For example, you can add compose.override-proxy.yaml to your project with such layout:
include:
- path: xray-tproxy/compose.yaml
project_directory: xray-tproxy
services:
builder:
network_mode: "container:xray-tproxy"
depends_on:
- xray-tproxy
After that your builder service will become member of xray-tproxy container net and as a result, all its traffic will go through a proxy.
You can find example of such layout here.
- Edit
vless.confwith your new VLESS URL - Restart:
docker compose down
docker compose up --build- Container restarts with code 23
vless.confmissing or has empty/invalid mandatory parameters.
- Container exits with
ERR: empty PATH for xhttp transport- Add
path=...to the VLESS URL whentype=xhttp.
- Add
- TLS errors during CONNECT
- Verify
flow,fp(fingerprint),sni,pbk,sidmatch your server.
- Verify
- View the generated config section in logs between:
===== GENERATED CONFIG =====…============================
MIT