Code Monkey home page Code Monkey logo

v2ray-docker-compose's Introduction

V2Ray Docker Compose

This repository introduces two V2Ray-based solutions to bypass censorship in highly restricted networks without direct access to an upstream server (a server with access to free Internet). These solutions are 1. Using a bridge server, and 2. Using a CDN service.

Documentation

Setup V2Ray Using a Bridge Server

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.

Setup Upstream Server

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

Setup Bridge Server

  1. Install Docker and Docker-compose.
  2. Copy the v2ray-bridge-server directory into the bridge server.
  3. 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.
  4. Run docker-compose up -d.
  5. Run ./clients.py to generate client configurations and links.

Setup V2Ray Using 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 + 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 directory into the server.
  4. Run cat /proc/sys/kernel/random/uuid to generate a UUID.
  5. Replace <UPSTREAM-UUID> in v2ray/config/config.json with the generated UUID.
  6. Replace <EXAMPLE.COM> in caddy/Caddyfile with your domain/subdoamin.
  7. Run docker-compose up -d.
  8. Visit your domain/subdomain in your web browser. Wait until the homepage is loaded.
  9. In your CDN, turn the proxy option on for the record.
  10. Run ./vmess.py to generate client configuration (link).

If you prefer NGINX instead of the Caddy web server, read V2RAY_NGINX_CDN instead.

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/HTTPS & SOCKS Protocols

Moved here: HTTP_SOCKS

Tips

  • Some hostings might ban your proxy traffic. Use an appropriate hosting.
  • Some Internet providers might ban your proxy traffic. Changin 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

Star History

Star History Chart

v2ray-docker-compose's People

Contributors

miladrahimi avatar ohmydevops avatar fristhon avatar keikhosrow avatar mfathi91 avatar abzarak avatar borghei avatar smf8 avatar itismoej avatar raminfp avatar

Stargazers

samira abdi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.