This repository contains sample Docker Compose files to run upstream and bridge V2Ray servers.
- Upstream Server: A server that has free access to the Internet.
- Bridge Server: A server that is available to clients and has access to an upstream server.
- Client: A user-side application with access only to the bridge server.
[ Client ] <-> [ Bridge Server ] <-> [ Upstream Server ] <-> [ Internet ]
V2Ray uses the VMESS protocol as the primary protocol. The VMESS protocol requires UUIDs for security reasons (instead of passwords). We need two UUIDs for the two V2Ray servers (upstream and bridge servers). You can generate UUIDs using this online tool:
Sample UUIDs:
cfc3ac34-a70d-424e-b43c-33049cf4bf31
143d98d8-ac89-465a-acb5-d8d51e1f851f
To setup the upstream server:
- Copy the "upstream" directory into the upstream server.
- Replace
<UPSTREAM-UUID>
in theconfig.json
file with the generated UUID for the upstream server. - Run
docker-compose up -d
.
To setup the bridge server:
- Copy the "bridge" directory into bridge server.
- Replace the following variables in the
config.json
file with appropriate values.<HTTP-USERNAME>
: An HTTP proxy username likefreedom
.<HTTP-PASSWORD>
: An HTTP proxy password like!FR33DoM!
.<SHADOWSOCKS-PASSWORD>
: A ShadowSocks password like!FR33DoM!
.<BRIDGE-UUID>
: The generated UUID for the bridge server.<UPSTREAM-SERVER-IP>
: The upstream server IP address like13.13.13.13
.<UPSTREAM-UUID>
: The generated UUID for the upstream server.
- Run
docker-compose up -d
.
The bridge server exposes these proxy protocols:
- HTTP Proxy
- ShadowSocks
- VMESS
You can use any VPN client which supports one of the protocols above. The following list includes some of the recommended client applications.
- ShadowSocks for macOS
- ShadowSocks for Linux
- ShadowSocks for Windows
- ShadowSocks for iOS
- ShadowSocks for Android
- VMESS Clients
IP: <BRIDGE-SERVER-IP>
Port: 1012
Algorithm/Encryption: aes-128-gcm
Password: <SHADOWSOCKS-PASSWORD>
IP: <BRIDGE-SERVER-IP>
Port: 1013
User ID: <BRIDGE-UUID>
AlterID: 10
Level: 0
Security: None
Network: TCP
This repository is forked from v2ray-config-examples. Thanks to @xesina and other contributors to the original repository.