Skip to content

old-joker/Xray-Docker-Compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published