What is V2Ray?
V2ray or vmess protocol to be precise, is a sophisticated version of the famous Shadowsocks. At the core, v2ray is also based on SOCKS5 proxy. Normally, proxies lack encryption, and that’s what differentiates a VPN and a proxy. Shadowsocks is a SOCKS5 proxy with encryption, and vmess is the next-gen Shadowsocks.
V2Ray includes two “protocols” vmess, v2ray’s own protocol, and Shadowsocks. In addition, you can choose several tunneling and obfuscation options with vmess.
- TCP – It is the default connection. “TCP (Transmission Control Protocol) is a type of protocol or standard to transfer information over the Internet, such as SSH, FTP, HTTP, etc.“
- Websocket – With WebSocket you can hide your VPS IP address behind a domain name, making it harder for the VPN-blocking firewall to blacklist the IP address.
- mKCP – An alternative to TCP, could be faster than TCP. Could be useful if you need a UDP-like protocol.
- QUIC – Google’s alternative to TCP and UDP. Based on UDP. Could be faster than TCP.
Choosing a VPS
I recommend renting a cheap Linux VPS. In case the IP address is blocked, you can open a new server. Find a less popular VPS provider because the firewalls could target the popular ones more often that the smaller ones.
Mainly, you can find two types of VPS, OpenVZ and KVM. Mostly KVM is preferable, because you can use the “Google BBR” command to increase the speed.
There is a way to check whether a VPS service has a working IP address before making a payment. Google “vps looking glass”, and you will find several looking glass pages of VPS services. If you can download the test files without using a VPN, then you can invest your money for the virtual server.
After renting a server, you can test the IP address before installing v2ray. Go to Putty (or an alternative) type in the IP address, if you do not encounter an error, then you are good to go. Alternatively you can ping their IP address using an app.
After ensuring that VPS IPs address is not blocked, you can use a VPN when connecting to your server via Putty or an alternative to prevent the IP address blocking.
Setting up V2Ray
Update:
1) If you are interested in an advanced v2ray configuration websocket(ws)+tls+cdn with a multi-user management panel, please click here to check out the new tutorial. Also, you can check the trojan GFW tutorial.
2) If this script does not work for you, and you only need simple v2ray TCP, you can install the script described on the v2ray +ws+tls+cdn tutorial. You only need to do Part-1 (install the script), skip Part-2 (SSL, domain, CDN), and choose TCP on the web panel.
Thanks to the one-command script by 233blog.com, you can install v2ray even if you are not familiar with Linux commands.
You need to have at least Ubuntu 16, Debian 8, or CentOS 7.
This guide will be for Ubuntu.
1. First make updates and upgrades
sudo apt-get update
sudo apt-get upgrade
2. Run the v2ray script
bash <(curl -s -L https://git.io/v2ray.sh)
If you run into the error “curl command not found” then run an apt-get update -y && apt-get install curl -y
3. The first question will ask you which version you choose. No major differences between 1 and 2. You can choose 1.
1
4. Next you choose the protocol. For the sake of simplicity let’s choose TCP.
1
5. Now you choose the port. You can choose the default value or change it. I choose port 23432.
23432
6. Then you choose to install an ad-blocker or not. It is noted that performance may be affected if ad-blocker is activated. I chose not to install it.
N
7. You will be asked whether you also want to install Shadowsocks. If you type Y, then you will have to choose a Shadowsocks port, a password, and an encryption method. I will keep it simple and choose not to install Shadowsocks.
N
Managing V2Ray
V2ray commands
v2ray info – View V2Ray configuration information
v2ray config – Modify V2Ray configuration
v2ray link – Generate V2Ray configuration file link
v2ray infolink – Generate V2Ray configuration information link
v2ray qr – Generate V2Ray configuration QR code link
v2ray ss – Modify Shadowsocks configuration
v2ray ssinfo – View Shadowsocks configuration information
v2ray ssqr – Generate Shadowsocks Configure QR code link
v2ray status – View V2Ray running status
v2ray start – Start V2Ray
v2ray stop – stop V2Ray
v2ray restart – restart V2Ray
v2ray log – View V2Ray Run log
v2ray update – Update V2Ray
v2ray update.sh – update V2Ray management script
v2ray uninstall – Uninstall V2Ray
Adding multiple users on v2ray (Bonus)
1. First, generate multiple UUIDs on the uuidgenerator.net
2. Next, SSH into your VPS and type nano /etc/v2ray/config.json to edit the config file
“users”: [
{
“id”: “b831381d-6324-4d53-ad4f-8cda48b30811”,
“alterId”: 233
}
]
4. You shoud edit the config as given below, note that I add a comma sign (,) and copy and paste the above user config in brackets and change the uuid:
“users”: [
{
“id”: “b831381d-6324-4d53-ad4f-8cda48b30811”,
“alterId”: 233
},
{
“id”: “z454362o-4324-8b12-gh1l-8zer71r59603”,
“alterId”: 233
}
]
Installing V2Ray to Your Devices
V2Ray apps for Android
You can use v2ray on several apps on Android, and all of them are available for free Google Play.
- v2RayNG
- Kitsunebi
- BifrostV
- V2Ray
- Clash for Android
V2Ray apps for iOS
You can use v2ray on several apps on your iPhone/iPad as well, most of the v2ray apps are paid apps, except for 91VPN.
- ShadowRocket
- Kitsunebi – supports UDP relay
- Quantumult
- i2Ray
- Pepi
- 91VPN
- Pharos Pro
V2Ray clients for Windows
For your Windows PC, you can choose one of these three v2ray Windows clients. And here is a download link.
- V2RayW
- V2RayN
- V2RayS
- Clash