What is v2ray?
V2Ray is a tool under Project V. Project V is a project that includes a set of tools for building specific network environments, and V2Ray is the core one.
The Project V manual said Project V is a set of tools to help you build your own privacy network over the internet. The core of Project V, named V2Ray, is responsible for network protocols and communications. It can work standalone, as well as combine with other tools.
However, in terms of launching time, Project V is prior than V2Ray. If you still don’t understand, then we simply say, V2Ray is a similar proxy software to Shadowsocks. V2Ray can be used to access the internet (over the censorship) to learn advanced science and technology from the free internet.
V2Ray User manual::
V2Ray repository address:https://github.com/v2fly/v2ray-core
Installation
V2Ray Supported OS Platforms:
- Windows 7 and later(x86 / amd64 / arm32)
- macOS 10.10 Yosemite and later(amd64)
- Linux 2.6.23 and later(x86 / amd64 / arm / arm64 / mips64 / mips / ppc64 / s390x / riscv64)
- including but not limited to Debian 7 / 8, Ubuntu 12.04 / 14.04 and later, CentOS 6 / 7 and Arch Linux
- FreeBSD (x86 / amd64)
- OpenBSD (x86 / amd64)
- Dragonfly BSD (amd64)
Compiled binary packages can be found via the following links.
Github Release: github.com/v2fly/v2ray-core Arch Linux: packages/community/x86_64/v2ray/ All packages are in the .zip format. Look for the file matching your platform and unzip it to get started.
V2Ray is a command-line software that is the basis for all other GUI proxy software. For more information on the GUI of mainstream platforms, please refer to other articles on this site:
Novice Guide
Server configuration
You need a server outside the firewall to run V2Ray on the server side. The configuration is as follows:
{
"inbounds": [
{
"port": 10086, // server listening port
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811"
}
]
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}
To successfully connect, you need to make sure that the id
and port are consistent with the client in the server configuration.
Client configuration
In your PC (or mobile phone), you need to run V2Ray with the following configuration:
{
"inbounds": [
{
"port": 1080, // SOCKS proxy port, you need to configure the proxy in the browser and point to this port
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"udp": true
}
}
],
"outbounds": [
{
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "server", // server address, please modify it to your own server ip or domain name
"port": 10086, // server port
"users": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811"
}
]
}
]
}
},
{
"protocol": "freedom",
"tag": "direct"
}
],
"routing": {
"domainStrategy": "IPOnDemand",
"rules": [
{
"type": "field",
"ip": [
"geoip:private"
],
"outboundTag": "direct"
}
]
}
}
The only place to change the above configuration is your server IP, which is indicated in the configuration. The above configuration will forward all traffic except the local area network (such as access router) to your server.
Run v2ray
- In Windows and macOS, the configuration file is usually the
config.json
file in the same directory of V2Ray. Just runv2ray
orv2ray.exe
directly. - In Linux, the configuration file is usually located in the
/etc/v2ray/
or/usr/local/etc/v2ray/
directory. Runv2ray --config=/etc/v2ray/config.json
, or use tools such as systemd to run V2Ray as a service in the background.
You can use
v2ray help
to see the specific commands.Prior to the 5.* release, runv2ray --config=/etc/v2ray/config.json
.