All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How to sell V2Ray on whmcs, a VPN using TLS technology, bypassing censorship (Second Part)
In the previous part, we have made it possible for WHMCS to sell V2Ray, we added some extension files to WHMCS, and created a database for recording customer usage records (traffic) and connected it to whmcs
If you did not read the previous tutorial, please read it first
Next, we will begin to deploy the v2ray node and proceed to the next step
Also, I realized that the necessary pictures are missing in the tutorial, I will use more pictures to explain how to do it
Deploy V2Ray node
Here, I will only explain how to deploy two types of nodes, tcp+tls and ws+tls, because I think only these two types of encryption can protect data from being decrypted by censorship
Before deployment, we need to prepare something
- domain name
- tls certificate
domain name
There are many ways to obtain a domain name. It can be paid or free. For this, I don't have any recommendations. However, if you want to deploy ws+tls type nodes and use cloudflare to pass traffic, you should choose a paid domain name, because cloudflare's free plan does not seem to support free domain names anymore
tls certificate
In order to implement tls, we must use ssl certificate. Please note that please do not use the certificate issued by yourself. I will explain the specific reason in the following text
I recommend that you apply for a certificate for each node, you can use Let's Encrypt to issue
If you want to simplify the deployment steps, I recommend you to use a wildcard certificate, which can be used on all nodes and is issued by Let's Encrypt
Issue a certificate
Before issuing the certificate, please resolve a subdomain name to the node where you need to deploy the v2ray server
When you are sure that the domain name resolution has taken effect, please use the following command to issue the certificate
This code can be used in ubuntu and debian, if you use centos, please replace apt with yum
sudo apt update
sudo apt -y install openssl cron socat curl unzip
curl https://get.acme.sh | sh
sudo ~/.acme.sh/acme.sh --issue -d node1.example.com --standalone --keylength ec-256
mkdir V2Ray
sudo ~/.acme.sh/acme.sh --installcert -d node1.example.com --ecc \
--fullchain-file /root/V2Ray/v2ray.crt \
--key-file /root/V2Ray/v2ray.key
You may notice that this piece of code creates a V2Ray folder and places the certificate in this folder
Install v2ray
Therefore, what we need to do next is to upload the three files in the backend folder in the current file to the V2Ray folder
After completing this step, we can see the following files in the V2Ray folder
Next, we need to install v2ray, which is very simple, please use the following command directly to install
apt update && apt install curl
curl -O https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh
chmod +x install-release.sh
bash install-release.sh
Modify the configuration file
config.json
The config.json file contains the database connection information, please modify the relevant data in the file to the information of the database established above
v2ray.json
The v2ray.json file defines the operating mode of v2ray, which is a relatively complex file, please refer to the picture
You can block some websites and services in the v2ray backend, such as child pornography or bt downloads
Test run
Please give v2raym running permission first, and then test whether it can run normally
Below is the code
cd /root/V2Ray
chmod +x v2raym
./v2ray
When the situation in the picture appears and there is no red prompt, it indicates that v2ray is running normally
Comments
In the actual situation, we need the v2ray program to run uninterruptedly and be able to automatically start after the server restarts unexpectedly. I recommend using supervisor
Below is the code