V2Ray Docker Compose (Bridge/Relay and Upstream Servers, Websockets + TLS + CDN) [VMESS & Shadowsocks]
This repository introduces V2Ray-based solutions to bypass limitations in highly restricted networks without direct/safe/stable access to upstream servers (servers with access to free Internet).
This stable solution supports Shadowsocks and VMess by default and can be configured to provide other V2Ray protocols.
In this solution, you need these two servers:
(Client) <-> [ Relay Server ] <-> [ Upstream Server ] <-> (Internet)
This solution consists of two steps and provides VMESS and Shadowsocks (AEAD) protocols.
Step 1: Setup Upstream Server
v2ray-upstream-server
and the utils
directories into the upstream server../utils/bbr.sh
to speed up server network.cat /proc/sys/kernel/random/uuid
in your terminal to generate a UUID.<UPSTREAM-UUID>
in v2ray/config/config.json
with the generated UUID.docker-compose up -d
.Step 2: Setup Relay Server
v2ray-relay-server
and the utils
directories into the relay server../utils/bbr.sh
to speed up server network.v2ray/config/config.json
with appropriate values.
<SHADOWSOCKS-PASSWORD>
: A password for Shadowsocks users like FR33DoM
.<BRIDGE-UUID>
: A new UUID for relay server (Run cat /proc/sys/kernel/random/uuid
).<UPSTREAM-IP>
: The upstream server IP address (like 13.13.13.13
).<UPSTREAM-UUID>
: The upstream server UUID from the previous step.docker-compose up -d
../clients.py
to generate client configurations and links.This solution is recommended only if you don't have relay server.
In this solution, you need one server (upstream) and a domain/subdomain added to a CDN service.
(Client) <-> [ CDN Service ] <-> [ Upstream Server ] <-> (Internet)
This solution provides VMESS over Websockets + TLS + CDN. Read more...
Follow these steps to set up V2Ray + Caddy (Web server) + CDN:
A
record pointing to your server IP with the proxy option turned off.v2ray-caddy-cdn
and the utils
directories into the server../utils/bbr.sh
to speed up server network.cat /proc/sys/kernel/random/uuid
to generate a UUID.<UPSTREAM-UUID>
in v2ray/config/config.json
with the generated UUID.<EXAMPLE.COM>
in caddy/Caddyfile
with your domain/subdomain.docker-compose up -d
../vmess.py
to generate client configuration (link).If you prefer NGINX as the web server, read V2RAY_NGINX_CDN instead.
Some CDN services don't offer unlimited traffic for free plans. Please check CDN Free Plans.
You don't need to turn the cloud (proxy) on in your CDN (step 10) when the Internet is not blocked. When it's off, clients connect to the server directly and CDN services also don't charge you any fee.
This highly recommended solution is stable and easy to set up. Using the Outline Manager app, you can create and manage multiple users and track their traffic. It supports Shadowsocks protocol and offers the easy-to-use Outline client app.
Read more: Outline Bridge Server
This is the list of recommended applications to use the Shadowsocks protocol:
This is the list of recommended applications to use the VMess and other protocols:
Moved here: HTTP_SOCKS