• Stars
    star
    631
  • Rank 70,743 (Top 2 %)
  • Language
    Python
  • Created almost 2 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

V2Ray Docker Compose Configurations (Single Server, Relay and Upstream Servers, Websockets + TLS + CDN) with Shadowsocks, VMess, SOCKS, and HTTP Protocols

V2Ray Docker Compose

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).

Table of contents

Server Solutions

V2Ray Upsream and Bridge Servers

In this solution, you need these two servers:

  • Upstream Server: A server that has access to the free Internet.
  • Bridge Server: A server that is available to clients and has access to the upstream server.
(Client) <-> [ Bridge Server ] <-> [ Upstream Server ] <-> (Internet)

This solution consists of two steps and provides VMESS and Shadowsocks (AEAD) protocols.

Step 1: Setup Upstream Server

  1. Install Docker and Docker-compose.
  2. Copy the v2ray-upstream-server and the utils directories into the upstream server.
  3. Run ./utils/bbr.sh to speed up server network.
  4. Run cat /proc/sys/kernel/random/uuid in your terminal to generate a UUID.
  5. Replace <UPSTREAM-UUID> in v2ray/config/config.json with the generated UUID.
  6. Run docker-compose up -d.

Step 2: Setup Bridge Server

  1. Install Docker and Docker-compose.
  2. Copy the v2ray-bridge-server and the utils directories into the bridge server.
  3. Run ./utils/bbr.sh to speed up server network.
  4. Replace the following variables in v2ray/config/config.json with appropriate values.
    • <SHADOWSOCKS-PASSWORD>: A password for Shadowsocks users like FR33DoM.
    • <BRIDGE-UUID>: A new UUID for bridge 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 previous step.
  5. Run docker-compose up -d.
  6. Run ./clients.py to generate client configurations and links.

V2Ray Behind a CDN Service

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 setup V2Ray + Caddy (Web server) + CDN:

  1. In your CDN, create an A record pointing to your server IP with the proxy option turned off.
  2. Install Docker and Docker-compose on your server.
  3. Copy the v2ray-caddy-cdn and the utils directories into the server.
  4. Run ./utils/bbr.sh to speed up server network.
  5. Run cat /proc/sys/kernel/random/uuid to generate a UUID.
  6. Replace <UPSTREAM-UUID> in v2ray/config/config.json with the generated UUID.
  7. Replace <EXAMPLE.COM> in caddy/Caddyfile with your domain/subdoamin.
  8. Run docker-compose up -d.
  9. Visit your domain/subdomain in your web browser. Wait until the homepage is loaded.
  10. (Optional) In your CDN, turn the proxy option on for the record.
  11. Run ./vmess.py to generate client configuration (link).

If you prefer NGINX as 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.

V2Ray as Outline Bridge Server (Recommended)

Moved here: Outline Bridge Server

Client Applications

VMESS Protocol

This is the list of recommended applications to use the VMESS protocol:

Shadowsocks Protocol

This is the list of recommended applications to use the Shadowsocks protocol:

HTTP and SOCKS Protocols

Moved here: HTTP_SOCKS

Subscription Link

Moved here: SUBSCRIPTION_LINK

Tips

  • Some hostings might ban your proxy traffic. Use an appropriate hosting.
  • Some Internet providers might ban your proxy traffic. Changing AlterID could be helpful. See #57.

Docker Images

By default, this repository uses the GitHub registry. You can modify the Docker-compose file to use Docker Hub.

More

More Repositories

1

phprouter

PhpRouter is a full-featured yet very fast HTTP URL router for PHP projects
PHP
189
star
2

outline-bridge-server

A Docker Compose for running V2Ray as bridge (relay) server for Outline shadowsocks servers
Python
110
star
3

laravel-docker-compose

Run Laravel projects (FPM/NGINX & Octane/Swoole) using Docker and Docker-compose (+ MySQL 8, Redis 7, Horizon, Crontab)
Dockerfile
62
star
4

php-jwt

A PHP implementation of JWT (JSON Web Token) generator, parser, verifier, and validator.
PHP
61
star
5

phpcrypt

Encryption, decryption, and password hashing tools for PHP projects
PHP
30
star
6

laravel-jwt-auth

JWT authentication guard and tools for your Laravel REST APIs
PHP
16
star
7

go-street

A Very Simple CLI Game Written in Go
Go
15
star
8

phpcontainer

PSR-11 compliant dependency injection container (IoC) for PHP projects.
PHP
12
star
9

php-mellat-bank

Iranian Mellat Bank Gateway for PHP Projects
PHP
12
star
10

php-enum

A PHP abstract enum class
PHP
11
star
11

subfix

Persian Subtitle Fixer written in PHP
PHP
9
star
12

phpconfig

A configuration service for your PHP projects!
PHP
9
star
13

ping-monitor

A simple tool to monitor server pings
JavaScript
9
star
14

singet

A simple web proxy that can fetch (get, download or stream) a single URL.
Go
9
star
15

twitter-bot

A lightweight PHP package for calling Twitter Bot APIs
PHP
9
star
16

phptemplate

A PHP template engine!
PHP
8
star
17

phpsession

PHP session tools
PHP
7
star
18

phplogger

A simple logger for php projects
PHP
6
star
19

health-monitor

A simple tool to monitor server health
JavaScript
6
star
20

airfile

An online clipboard to share files!
PHP
6
star
21

phpcookie

PHP cookie tools
PHP
6
star
22

laracaptcha

Laravel simple captcha
PHP
5
star
23

miladrahimi.github.io

Milad Rahimi | A Software Engineer, Backend Developer & Web Designer
HTML
5
star
24

netnevis

It's my old blog hosting source code that had written in 2013.
PHP
4
star
25

shadowsocks

Shadowsocks
Go
3
star
26

p-manager

P-Manager!
Go
3
star
27

gorelay

TCP and UDP relay package for Go (Golang) projects
Go
3
star
28

airnote

An online clipboard to share notes!
PHP
3
star
29

holoo

Holoo!
PHP
2
star
30

miladrahimi

Milad Rahimi GitHub Profile.
2
star
31

p-node

P-Node!
Go
2
star
32

xray-manager

Xray Manager
Go
2
star
33

sportat

SS!
PHP
2
star
34

heroku-php

Sample Heroku PHP App!
Twig
1
star
35

gifstream

GifStream!
Go
1
star