V2Ray
What is V2Ray?
V2Ray is a very powerful and privacy-enhancing proxy tool. It supports multiple protocols, can bypass the censorship of many countries, and traffic is fully encrypted, securing your internet use without restrictions.
Note: V2Ray itself is only a protocol framework but is not a provider of servers. You may want to either set up your server or subscribe to one, often referred to as "机场" in Chinese .
Common Protocols:
- VLESS: Lightweight and generally better for servers.
- VMESS: can be configured with advanced features to bypass highly strict censorship.
The most popular config is: VLESS + CDN + WS + TLS
.
Terms Explanation
Term | Meaning |
---|---|
VLESS | A protocol used in V2Ray configurations. |
WS | WebSocket, an upgraded HTTP protocol supporting real-time data syncing. |
TLS | Encrypts data to not be visible to firewalls. |
CDN | Content Delivery Network; puts content closer to users for speed and makes blocking servers much more difficult. |
Setup: VLESS + CDN + WS + TLS
Requirements
- A domain name with cloudflare
- A Linux VPS with port forwarding for 443 and a random port (Other web hosting services like Render or Koyeb will also do; they provide a domain and CDN in most cases.)
- Basic command line skills
- Root
Install X-UI
- To install x-ui, execute the following in a terminal:
bash <(curl -Ls https://raw.githubusercontent.com/NidukaAkalanka/x-ui-english/master/install.sh)
To install, just follow on-screen instructions. Make sure you enable system startup.
Disable Firewall
If you're using a Debian-based distro:
- If
ufw
is not installed, install it:
sudo apt install ufw
- Disable the firewall:
sudo ufw disable
Access X-UI Panel
- Open your browser and access the:
http://<server-ip>:<port-you-set>
This will be shown to you after launching X-UI withsudo x-ui
- Log in with the credentials.
Configure VLESS Endpoint
- Tap "Inbounds".
- Click the "+" button to create a new inbound.
- Settings as below:
Remark: Name your server
Protocol: vless / vmess (encrypted)
Listening IP: blank (default)
Port: 443
Total Traffic (GB): blank (default)
Expiry Date: blank (default)
Disable Insecure Encryption: Disabled (default)
Transmission: ws
Accept Proxy Protocol: Disabled (default)
TLS: Enable
SNI: Your domain name
Sniffing: Enabled (default)
- Click "Add To" to save.
Forward Port 443
- Go to the control panel or router of your VPS.
- forward port 443.
Configure Cloudflare
- Activate your domain in Cloudflare if you don't already have it.
- Set an A Record pointing to your VPS public IP. Make sure to turn on proxy.
- Go to SSL/TLS on Cloudflare: Make sure it is on Full, not Full Strict.
You're Done!
Click Operate on your inbound on X-UI and click QR Code. You can use this QR code to import to your client or click the QR to copy share link to clipboard
Hint: Check the documentation of your client or online for configuration.