-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc5c224
commit 644e179
Showing
1 changed file
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |