V2Ray

V2Ray is the core tool of Project V, which is mainly responsible for the realization of network protocols and functions, and communicates with other Project V.

Installation

Install the v2ray package. For the development version, install the v2ray-gitAUR package.

Configuration

V2Ray configuration is done with a JSON formatted file. See Configuration File Format and Configuration.

Usage

From the command line

V2Ray is started with the v2ray command. See Commandline.

Daemon management

Start/enable v2ray.service.

Multiple config

To use multiple config, you can edit /etc/systemd/system/v2ray.service, add the following:

/etc/systemd/system/v2ray.service
[Unit]
Description=V2Ray Service
After=network.target nss-lookup.target

[Service]
User=nobody
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
ExecStart=/usr/bin/v2ray -confdir /etc/v2ray/

[Install]
WantedBy=multi-user.target

Configuration Methods

V2Ray has several configuration methods, the more efficient one is WebSocket+TLS.

GUI Client

See Qv2ray.

Tips and tricks

Routing rules

See Routing and Routing of V2Ray .

The preset routing rule files are geosite.dat and in . They are provided by the and packages respectively. These two packages are installed by default as dependencies of v2ray.

Replacing the preset routing rule files

There are ready-made packages for some routing rule files. For example, you can install the v2ray-rules-dat-gitAUR package for @Loyalsoldier/v2ray-rules-dat.

For routing rule files without ready-made packages, you can create packages and install or remove and without removing the dependent package and put the routing rule files in the directory.

Troubleshooting

Failed with result 'exit-code'

If you see this error in the log: , it is because V2Ray does not have write permission to /var/log/v2ray/access.log. Use the following command to solve the problem.

chown -R nobody /var/log/v2ray
gollark: 🌵
gollark: Or that.
gollark: You must ask Hydronitrogen™™.
gollark: Use ===.
gollark: Also, I thought of a comparatively non-terrible way to handle your highly triangular demands for special per-server treatment. I can detect servers (via `switchcraft` existing and probably the ROM, but you could really use a genericized way to do that), and apply a bunch of default settings for the server in question.

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.