Skip to content

Commit

Permalink
Update V2RAY_NGINX_CDN.md
Browse files Browse the repository at this point in the history
  • Loading branch information
miladrahimi committed Jun 1, 2024
1 parent fc5c224 commit 644e179
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions docs/V2RAY_NGINX_CDN.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# Setup V2Ray Using NGINX and a CDN Service
# V2Ray Behind CDN and NGINX

Follow these steps:
This solution is similar to [V2Ray Behind CDN](https://github.com/miladrahimi/v2ray-docker-compose/blob/master/README.md#v2ray-behind-cdn),
which uses Caddy as the web server and is easier to set up.

1. In your CDN, create an `A` record pointing to your server IP with the proxy option turned off.
1. Install Docker and Docker-compose on your server.
1. Copy the `v2ray-nginx-cdn` directory into the server.
Follow these steps to set up V2Ray, NGINX (Web server) and CDN:

1. In the CDN panel, create an `A` record for the server IP with the proxy disabled.
1. Install Docker and Docker-compose ([Official Documanetation](https://docs.docker.com/engine/install/#supported-platforms)).
1. Run `git clone https://github.com/miladrahimi/v2ray-docker-compose.git` to download this repository.
1. Run `cd v2ray-docker-compose/v2ray-nginx-cdn` to change the directory.
1. Run `cat /proc/sys/kernel/random/uuid` to generate a UUID.
1. Replace `<UPSTREAM-UUID>` in `v2ray.json` with the generated UUID.
1. Replace `YOUR.DOMAIN.COM` in `docker-compose.yml` with your domain/subdoamin.
1. Replace `YOUR@EMAIL.COM` in `docker-compose.yml` with your email (For Let’s Encrypt).
1. Replace `YOUR@EMAIL.COM` in `docker-compose.yml` with your email (for Let’s Encrypt).
1. Run `docker-compose up -d`.
1. Visit your domain/subdomain in your web browser.
1. In your CDN, turn the proxy option on for the record.
1. In the CDN panel, enable the proxy option for the record created during the first step.
1. Run `./vmess.py` to generate client configuration (link).
1. (Optional) Run `./../utils/bbr.sh` to setup BBR and speed up the server network.

0 comments on commit 644e179

Please sign in to comment.