使用 systemd 多开 V2Ray 实例

Choose a name for your instance

The name which I choosen in this tutorial is v2cc, it SHOULD be changed to your own instance name. the name is the key to manage your V2Ray instance.
YOU ARE ABLE TO CREATE ANY AMOUNT OF INSTANCES YOU DESIRED BY REPEATING THESE STEPS
Config file name format is config-NAME.json in /etc/v2ray/ directory.

Config your v2ray

1
cp /etc/v2ray/config.json /etc/v2ray/config-v2cc.json
2
vim /etc/v2ray/config-v2cc.json
Copied!

Auto start after reboot

1
systemctl enable [email protected]
Copied!

Start

1
systemctl start [email protected]
Copied!

Stop

1
systemctl stop [email protected]
Copied!

Status

1
systemctl status [email protected]
Copied!

Logs

1
systemctl status -l [email protected]
Copied!

List all your instances

1
systemctl status '[email protected]*'
Copied!