Git Product home page Git Product logo

v2ray-docker-compose's Introduction

V2Ray Docker Compose

This repository contains sample Docker Compose files to run V2Ray upstream and bridge servers.

Documentation

Terminology

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

Setup

UUIDs

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:

Sample generated UUIDs:

  • cfc3ac34-a70d-424e-b43c-33049cf4bf31
  • 143d98d8-ac89-465a-acb5-d8d51e1f851f

Upstream Server

To setup the upstream server:

  1. Copy the "v2ray-upstream-server" directory into the upstream server.
  2. Replace <UPSTREAM-UUID> in the config.json file with one of the generated UUIDs.
  3. Run docker-compose up -d.

Bridge Server

To setup the bridge server:

  1. Copy the "v2ray-bridge-server" directory into the bridge server.
  2. Replace the following variables in the config.json file with appropriate values.
    • <SHADOWSOCKS-PASSWORD>: A password for Shadowsocks users like FR33DoM.
    • <BRIDGE-UUID>: The generated UUID for the bridge server.
    • <UPSTREAM-IP>: The upstream server IP address like 13.13.13.13.
    • <UPSTREAM-UUID>: The used UUID for the upstream server.
  3. Run docker-compose up -d.

Clients

The bridge server exposes these proxy protocols:

  • Shadowsocks
  • VMESS
  • HTTP
  • SOCKS
Shadowsocks Protocol

Shadowsocks is a popular proxy protocol. You can find many client apps to use the Shadowsocks proxy on your devices. These are recommended client apps:

Client configuration:

IP Address: <BRIDGE-IP>
Port: 1210
Encryption/Method/Algorithm: aes-128-gcm
Password: <SHADOWSOCKS-PASSWORD>
VMESS Protocol

The VMESS proxy protocol is the recommended one. It's the primary protocol that V2Ray provides. These are recommended client apps:

Client configuration:

IP Address: <BRIDGE-IP>
Port: 1310
ID/UUID/UserID: <BRIDGE-UUID>
Alter ID: 0
Level: 0
Security/Method/Encryption: aes-128-gcm
Network: TCP
HTTP & SOCKS Protocols

Moved here: HTTP_SOCKS_PROTOCOLS.md

Docker images

We cannot pull docker images from Docker Hub here in Iran. Therefore I've pushed the official V2Ray Docker image into the GitHub image registry. If you prefer pulling the image from the Docker Hub, update the docker-compose.yml files.

services:
  v2ray:
    image: ghcr.io/getimages/v2ray:latest
    # ...

P.S.

This repository is kind of forked from v2ray-config-examples. Thanks to @xesina and other contributors.

v2ray-docker-compose's People

Contributors

abzarak avatar fristhon avatar keikhosrow avatar miladrahimi avatar ohmydevops avatar raminfp avatar smf8 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.