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).
In this solution, you need these two servers:
- Upstream Server: A server that has access to the free Internet.
- Relay Server: A server with access to the upstream server and available to clients.
(Client) <-> [ Relay Server ] <-> [ Upstream Server ] <-> (Internet)
This solution consists of two steps and provides VMESS and Shadowsocks (AEAD) protocols.
Step 1: Setup Upstream Server
- Install Docker and Docker-compose.
- Copy the
v2ray-upstream-server
and theutils
directories into the upstream server. - Run
./utils/bbr.sh
to speed up server network. - Run
cat /proc/sys/kernel/random/uuid
in your terminal to generate a UUID. - Replace
<UPSTREAM-UUID>
inv2ray/config/config.json
with the generated UUID. - Run
docker-compose up -d
.
Step 2: Setup Relay Server
- Install Docker and Docker-compose.
- Copy the
v2ray-relay-server
and theutils
directories into the relay server. - Run
./utils/bbr.sh
to speed up server network. - Replace the following variables in
v2ray/config/config.json
with appropriate values.<SHADOWSOCKS-PASSWORD>
: A password for Shadowsocks users likeFR33DoM
.<BRIDGE-UUID>
: A new UUID for relay server (Runcat /proc/sys/kernel/random/uuid
).<UPSTREAM-IP>
: The upstream server IP address (like13.13.13.13
).<UPSTREAM-UUID>
: The upstream server UUID from the previous step.
- Run
docker-compose up -d
. - Run
./clients.py
to generate client configurations and links.
In this solution, you need one server (upstream) and a domain/subdomain added to a CDN service.
- Upstream Server: A server that has free access to the Internet.
- CDN Service: A Content delivery network like Cloudflare, ArvanCloud or DerakCloud.
(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:
- On your CDN, create an
A
record pointing to your server IP with the proxy option turned off. - Install Docker and Docker-compose on your server.
- Copy the
v2ray-caddy-cdn
and theutils
directories into the server. - Run
./utils/bbr.sh
to speed up server network. - Run
cat /proc/sys/kernel/random/uuid
to generate a UUID. - Replace
<UPSTREAM-UUID>
inv2ray/config/config.json
with the generated UUID. - Replace
<EXAMPLE.COM>
incaddy/Caddyfile
with your domain/subdomain. - Run
docker-compose up -d
. - Visit your domain/subdomain in your web browser. Wait until the homepage is loaded.
- (Optional) In your CDN, turn the proxy option on for the record.
- Run
./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.
Moved here: Outline Bridge Server
This is the list of recommended applications to use the Shadowsocks protocol:
- Outline for all platforms
- ShadowsocksX-NG for macOS
- shadowsocks-libev for Linux
- shadowsocks-windows
- shadowsocks-android
- ShadowLink for iOS
This is the list of recommended applications to use the VMess and other protocols:
- Nekoray for macOS, Windows, and Linux
- FoXray for macOS, iOS, and Android
- V2Box for macOS and iOS
- V2Box for Android
- ShadowLink for iOS
- v2rayNG for Android
- v2rayN for Windows
Moved here: HTTP_SOCKS
- Outline Bridge Server
- V2Ray Config Examples
- NekoRay Installer (for Linux)
- V2Ray Ansible
- V2Fly (V2Ray)
- V2Fly (V2Ray) configurations
国外服务器 <-> 国内服务器 <-> [本地 v2ray | 本地 clash]
原理说明:
使用国内服务器桥接国外服务器与本地客户端。
说明:
- 10150 端口用于国内代理
- 29002 端口用于订阅
- 11310 端口用于国外服务器访问国内服务器
- 运行步骤中的 为运行
./scripts/relay-server.sh
时输出的结果UUID: xx
- 运行步骤中的 为国内服务器的公网 IP
前置条件:
- 国内服务器需要有公网
- 国内服务器与国外服务器需要提前安装好 docker
- 国内机器需要开放 10150、29002、11310 三个端口
运行步骤:
- 在国内服务器运行
./scripts/relay-server.sh
- 在国外服务器运行
./scripts/upstream.sh <uid> <ip>
- v2ray 客户端订阅链接
http://<国内IP>:29002/subscribe
. clash 客户端订阅链接http://<国内IP>:29002/subscribe/clash