1.安装
最新安装方法参考:https://github.com/v2fly/fhs-install-v2ray/blob/master/README.zh-Hans-CN.md
安装:
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
配置文件路径:/usr/local/etc/v2ray/config.json
配置文件模板:
{
"log": {
"loglevel": "warning"
},
"routing": {
"domainStrategy": "AsIs",
"rules": [
{
"ip": [
"geoip:private"
],
"outboundTag": "blocked",
"type": "field"
}
]
},
"inbounds": [
{
"port": 2020,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "用户id",
"alterId": 64
}
]
}
}
],
"outbounds": [
{
"protocol": "freedom"
},
{
"protocol": "blackhole",
"tag": "blocked"
}
]
}
以下安装脚本已过期
yum -y install wget
wget https://install.direct/go.sh
yum install -y zip unzip
bash go.sh
得到PORT和UUID
2.设置
## 启动
systemctl start v2ray
## 停止
systemctl stop v2ray
## 重启
systemctl restart v2ray
## 开机自启
systemctl enable v2ray
配置文件路径:/etc/v2ray/config.json
3.Windows使用
下载v2rayN:https://github.com/2dust/v2rayN/releases
添加vmess
4.安卓使用
下载 BifrostV :https://apkpure.com/bifrostv/com.github.dawndiy.bifrostv
顶部选择 VMess ,主机(Host)填入VPS的IP地址,端口(Port)填入记录的PORT,用户ID(UserId)填入记录的UUID,其他保持默认,然后保存