Vless Version of Wulabing V2Ray Script

Vless is a simplified protocol for V2Ray that can result in improved performance. Vless does not depend on the system time being correct. Its authentication method continues to be Universally Unique Id (UUID), but the alterId is not required. The core version of V2Ray needs to be 4.27 or higher to support Vless.

Here’s how to install V2Ray with Vless using the Wulabing script.

At the time of writing (August 2020), the Vless version of the Wulabing V2Ray script is in the dev branch on GitHub. You will see dev in the address from which we download the script.

1. Server

1.1. Obtain VPS and Domain Name

First, you’ll need to rent a virtual private server (VPS). In the rest of this article, we’ll write its IP address as zz.zz.zz.zz.

Also obtain a domain name. We will give yyyyy.xyz as our example domain name, and www.yyyyy.xyz as our example host name for the V2Ray server.

Create a DNS A record pointing from hostname www.yyyyy.xyz to the server IP address zz.zz.zz.zz.

1.2. Update Server

Update your server. On CentOS 8:

yum update -y

On Debian 10:

apt update && apt upgrade -y

1.3. Open Firewall

If you have implemented a firewall on your server, you must open port 80 and port 443. On CentOS 8:

firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload

Debian 10:

nft add rule inet filter input tcp dport {http, https} counter accept
nft list ruleset > /etc/nftables.conf

1.4. Download and Run Wulabing Script

Download and run the wulabing script. On CentOS, you may need to do yum install wget before this will work.

wget -N --no-check-certificate -q -O install.sh "https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/dev/install.sh"
chmod +x install.sh
bash install.sh

The script displays a menu offering the following options. This posts adds English translations to the prompts:

------------ 安装向导 Setup wizard ------------
0. 升级 脚本 Upgrade script
1. 安装 Install V2Ray (VLESS+Nginx+ws+tls)
2. 安装 Install V2Ray (VLESS+http/2+Fallback)
3. 升级 Upgrade V2Ray core
----------- 配置变更 Config changes -----------
4. 变更 Change UUID
5. 变更 Change alterid
6. 变更 Change port
7. 变更 Change TLS 版本 version (仅ws+tls有效 only for WS+TLS)
---------- 查看信息 View information ----------
8. 查看 实时访问日志 View real-time access log
9. 查看 实时错误日志 View real-time error log
10. 查看 View V2Ray 配置信息 config information
----------- 其他选项 Other options ------------
11. 安装 Install 4合1 bbr 锐速安装脚本 BBR
12. 安装 Install MTproxy(支持TLS混淆)
13. 证书 有效期更新 Certificate validity update
14. 卸载 Uninstall V2Ray
15. 更新 Update 证书crontab计划任务 scheduled task
16. 清空 证书遗留文件 Clear certificate legacy files
17. 退出 Exit

请输入数字: Please enter the number:

Choose option 1 to install V2Ray with Vless + Nginx + WebSocket (WS) + TLS.

After doing some checks and installing some packages, the script asks you some more questions.

请输入你的域名信息(eg:www.wulabing.com):
Please enter your domain information (e.g. www.wulabing.com):

Put your accurate domain name for the server, which in our example is www.yyyyy.xyz.

The script then checks that the domain name resolves to this server’s IP address.

请输入连接端口(default:443):
Please enter the connection port (default 443):

Recommend you use the default port 443.

The script downloads the latest source for Nginx, OpenSSL, and V2Ray. It then compiles everything directly from the source. This takes 10–20 minutes.

请选择生成的链接种类
Please select the generated link type
1: V2RayNG/V2RayN
2: quantumult

Recommend you choose according to which V2Ray client you will use. We will choose 1.

请选择支持的 TLS 版本(default:3):
请注意,如果你使用 Quantumult X / 路由器 / 旧版 Shadowrocket / 低于 4.18.1 版本的 V2ray core 请选择 兼容模式
Please select a supported TLS version (default 3):
Please note that if you use Quantumult X / Router / Legacy Shadowrocket / V2ray core lower than 4.18.1 please select compatibility mode
1: TLS1.1 TLS1.2 and TLS1.3(兼容模式)
2: TLS1.2 and TLS1.3 (兼容模式)
3: TLS1.3 only

Recommend you choose option 2, TLS 1.2 and TLS 1.3.

At the end of the script’s run, it displays the parameters for the client:

V2ray 配置信息
地址(address): www.yyyyy.xyz
端口(port): 443
用户id(UUID): c67cf713-7727-4684-9329-58480d705d40
加密(encryption): none
传输协议(network): ws
伪装类型(type): none
路径(不要落下/): /6f9ed9e/
底层传输安全: tls

If you lose the details, you can redisplay them like this:

cat ~/v2ray_info.inf

At this point, you can already visit your web server https://www.yyyyy.xyz in a browser to see your camouflage website (3D-Periodic Table of Elements).

1.5. Optionally Add Site to CDN

To protect your IP address, you can optionally add your site to a Content Delivery Network (CDN) such as Cloudflare. If your site is already on Cloudflare, you can enable proxying and SSL at this stage.

2. Client

2.1. Windows

We will use V2RayN, the graphical user interface for V2Ray on the Windows platform.

Open a browser and visit GitHub. Download v2rayN-Core.zip for the latest release. Version 3.21 and up support Vless. After you’ve downloaded v2rayN-Core.zip, unzip the zip file.

Double-click v2rayN.exe to launch V2RayN. The first time you run the program, you may get a warning from Windows Defender SmartScreen to say Windows protected your PC. Click More info, then click Run anyway.

The V2RayN icon appears in the system tray toward the bottom right of your Windows desktop. Click the V2RayN icon in the system tray to bring up the V2RayN interface.

Under the Help button (the question mark icon), select 语言-[中文简体] for simplified Chinese, or Language-[English] for English.

Restart V2RayN to see the interface in the new language.

Click Servers > Add [VLESS] Server. Using the values from our example:

Click OK. Select your chosen server, and press Enter to connect to it. After the connection is made, close the V2RayN panel. V2RayN continues to run and is accessible via its icon in the system tray.

Now that your V2Ray client is connected to the server, configure your browser to send traffic to the V2Ray client.

In Firefox, click the hamburger menu, then select Options. Select the General tab. Scroll down to the bottom to the heading Network Settings. Click the Settings button.

In Chrome, you can do the same thing by installing the SwitchyOmega extension and configuring it to use the SOCKS5 proxy on 127.0.0.1 port 10808.

Your browser is now configured to use the V2Ray client and the client is in turn connected to your V2Ray server. Your browsing requests and responses are being passed, totally encrypted, via the remote V2Ray server.

Check the end-to-end functionality to confirm that V2RayN and Firefox/Chrome are configured correctly. With V2RayN still running, and Firefox/Chrome proxied, visit IP Chicken. You should see the IP address of the server, not your local client.

2.2. Linux

Open Firefox. Download the latest V2Ray for 64-bit Linux from GitHub. Version 4.27.0 and up support Vless. The file to download for a 64-bit PC running Linux is v2ray-linux-64.zip. Unzip v2ray-linux-64.zip.

In the terminal or in a text editor, edit the V2Ray configuration file:

vi ~/Downloads/v2ray-linux-64/config.json

Delete the existing lines. Insert the template below, substituting in your actual values for our examples.

{
  "inbounds": [
    {
      "port": 1080,
      "listen": "127.0.0.1",
      "protocol": "socks",
      "sniffing": {
        "enabled": true,
        "destOverride": ["http", "tls"]
      },
      "settings": {
        "auth": "noauth",
        "udp": false
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "vless",
      "settings": {
        "vnext": [
          {
            "address": "www.yyyyy.xyz",
            "port": 443,
            "users": [
              {
                "id": "c67cf713-7727-4684-9329-58480d705d40",
                "alterId": 0,
                "encryption": "none"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "security": "tls",
        "tlsSettings": {
          "serverName": "www.yyyyy.xyz",
          "allowInsecure": true
        },
        "wsSettings": {
          "path": "/6f9ed9e/",
          "headers" : {
            "host": "www.yyyyy.xyz"
          }
        }
      }
    }
  ]
}

Save the file. In your terminal emulator, start the V2Ray client running:

cd ~/Downloads/v2ray-linux-64
./v2ray -config=config.json

Leave the terminal open, with V2Ray running in it.

Open Firefox. From the hamburger menu, select Preferences. In the Network Settings section, click Settings. Set the network settings as follows:

Click OK. Firefox now sends requests to the V2Ray client, which sends them to the V2Ray server. Do an end-to end test by visiting a site such as IP Chicken.

2.3. macOS

Download the latest release of Qv2ray from GitHub. The file to download is named Qv2ray-v2.6.3.macOS-x64.dmg.

2.4. Android

Install V2RayNG from either Google Play or GitHub. On Android, V2Ray clients act more like VPNs, so there is no need to proxy the browser.

2.5. iOS

There are no free clients for iOS. Look in the iOS App Store for Shadowrocket.

3. Get Help and Report Issues

Expect an outage every Sunday at 3 a.m. Nginx will automatically restart to coordinate with the renewal of the SSL certificate. During this period, the node cannot be connected to normally. The estimated duration is several seconds to two minutes.

If you have any other problems, SSH into your server to take a look at the logs. To view the V2Ray error log, enter the command:

tail /var/log/v2ray/error.log

To view the Nginx error log, enter the command:

tail /etc/nginx/logs/error.log

For the Wulabing script:

If you discover an issue with V2Ray, report it on the official GitHub issues page for the software you are using: