1. 安装v2raya

1
2
3
4
5
6
7
8
9
10
11
# 添加公钥
wget -qO - https://apt.v2raya.org/key/public-key.asc | sudo tee /etc/apt/keyrings/v2raya.asc

# 添加软件源
echo "deb [signed-by=/etc/apt/keyrings/v2raya.asc] https://apt.v2raya.org/ v2raya main" | sudo tee /etc/apt/sources.list.d/v2raya.list

# 更新
sudo apt update

# 安装
sudo apt install v2raya v2ray

配置
v2raya服务配置

如果不需要做自定义调整,用默认配置启动v2raya,执行以下命令

2. 启动 & 设置开机自启

sudo systemctl enable --now v2raya.service
启动成功后,默认端口是2017
访问http://host_ip:2017。首次登录需要创建用户admin/admin123

v2raya服务配置文件路径:/etc/default/v2raya,可以调整web ui的默认端口、log目录、bin目录等各项内容。