V2ray+ws+Nginx+Cloudflare

Usage Instructions

Note

Before you start to access the system, please ensure the Status Checks of the instance in the AWS Console turns to 2/2 checks passed, or the initialization process might be interrupted and the software configuration fails. It takes about 5-10 mins.

Note

Please replace the instance ID with the actual instance ID of your running EC2 instance, and the Public IP your actual public DNS address.

Default Settings

  1. website background :

Username: admin, Password: <instance ID>

Access the System

  1. Visit your website frontend

<public DNS>:65432

Advance Setting

  1. set the DNS with Cloudflare

../_images/v2ray_1.png ../_images/v2ray_2.png
  1. set up your Domain Name in Cloudflare

../_images/v2ray_3.png
  1. set up your SSL in Cloudflare, you must save the file in your EC2: PRIVATE KEY -> privkey.pem , CERTIFICATE -> fullchain.pem

../_images/v2ray_4.png
  1. set the SSL mode

../_images/v2ray_5.png
  1. SSH to your EC2, then you need to install Nginx

Type the command:

sudo apt-get install nginx

then upload the privkey.pem and fullchain.pem to the /etc/nginx/ssl/

and then set up the nginx:

  vi /etc/nginx/conf.d/v2ray.conf

  server {
    listen       443 ssl;
    server_name  example.com;

    ssl_certificate    /etc/nginx/ssl/fullchain.pem;
    ssl_certificate_key    /etc/nginx/ssl/privkey.pem;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 10m;
    error_page 497  https://$host$request_uri;

  location /ray {
    proxy_pass       http://127.0.0.1:6868;
    proxy_redirect             off;
    proxy_http_version         1.1;
    proxy_set_header Upgrade   $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host      $http_host;
    }
}

You can add more more location that was your path in v2ray. In this exmaple the path is /ray, then port is 6868 Finally you must restart the nginx. Type the command:

sudo /etc/init.d/nginx restart
  1. set up the v2ray

../_images/v2ray_6.png
  1. set up the v2ray client, the address was your Domain Name

../_images/v2ray_7.png

Support

Contact Aurora

We will do our best to respond to your questions within 24 hours Monday through Friday. Please visit Aurora for details.