Setting up v2ray with vmess on Debian/Ubuntu
If you are living in a country with a heavily censored internet connection or just want to protect your privacy, v2ray is a program which seems to work well in these circumstances. The problem with VPNs like OpenVPN is, that they are great to protect your traffic from your endpoint to the vpn server but are also easy to detect and block with deep packet inspection if your internet provider decided to do so. v2ray is a set of programs which support a variety of protocols. Vmess is a protocol which was created by the developers of v2ray to obfuscate traffic. That is the reason why we will use it in our example. With v2ray you can set up your own server to tunnel your connections through that server from any Linux, Windows, iOS or Android device.
The configuration of v2ray can be confusing but thanks to some people on the internet, there is a script which does all the magic. All you need is a linux box with root access and 512MB of RAM somewhere on the (unrestricted) internet.
There you can install and configure a v2ray server by running that script like this:
curl https://raw.githubusercontent.com/SonyaCore/V2RayGen/main/V2RayGen.py | sudo python3 - --vmess --tls --block
This will set up a v2ray server with a vmess+tls configuration. There are other configuration examples on their github page.
After successfully running the script, you should see something like this:
SERVER SIDE Information :
IP: xx.xx.xx.xx
ID: 0
LOGLEVEL: error
UUID: a66d453f-70de-4ef5-a002-f81c581a52a5
STREAM : WebSocket
WSPATH: /graphql
PORT: 443
SECURITY:
LINKNAME: xray
! Use below link for your xray or v2ray client
vmess://Mjk2ZmU4MTktOTIyYS00YzQ0LWJhYjUtNjUwOWFlZGE3NDhhCgMjk2ZmU4MTktOTIyYS00YzQ0LWJhYjUtNjUwl
ZGE3NDhhCgMjk2ZmU4MTktOTIyYS00YzQ0LWJhYjUtNjUwOWFlZGE3NDhhCgMjk2ZmU4MTktOTIyYS00YzQ0LWJhYjUtNjUwOWFlZGE3ND
hhCgMjk2ZmU4MTktOTIyYS00YzQ0LWJhYjUtNjUwOWFlZGE3NDhhCg
! Client-side VMess Config Generated.
! Use client-VMESSTLS-xray.json for using proxy with xray-core directly.
! Using self-signed key
! Make sure to add Allow Insecure to your client.
All you need to add your new server to your client is the line starting with vmess://. For that, download the client program for your platform: For windows you can find a download on the projects github. If you are using an android device, you can download the app v2rayng from the Play Store or an alternative app store.