Giter Site home page Giter Site logo

xray-docker-compose's Introduction

Xray-Docker-Compose

Xray Server Docker Compose ( Vmess + Websockets + TLS + CDN )

In this solution, you need to buy a vps and a domain/subdomain added to a CDN service.

VPS : A server that has free access to the Internet.

CDN Service: A Content delivery network like Cloudflare, ArvanCloud or DerakCloud.

(Client) <-> [ CDN Service ] <-> [ Server ] <-> (Internet)

This solution provides VMESS over Websockets + TLS + CDN.

Follow these steps to setup Xray + 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. Git clone this repo into the server. (git clone https://github.com/old-joker/Xray-Docker-Compose.git)
  4. Run cat /proc/sys/kernel/random/uuid to generate a UUID.
  5. Replace in xray/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. (Optional) In your CDN, turn the proxy option on for the record.
  10. Run ./export.py to generate client configuration (link).

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

xray-docker-compose's People

Contributors

old-joker avatar

Stargazers

 avatar

Watchers

 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.