v2ray教程
1、下载安装脚本
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
sudo yum install zip unzip
sudo bash go.sh
2、相关v2ray命令
## 启动
sudo systemctl start v2ray
## 停止
sudo systemctl stop v2ray
## 重启
sudo systemctl restart v2ray
3、记下相关信息
PORT:26954
UUID:544d4543-8079-457f-a553-fbd51e0c394b
4、打开防火墙
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=443/tcp --permanent
firewall-cmd --reload
5、安装宝塔面板
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh
6、宝塔面板配置文件添加
location /ray { #/ws为v2ray路径,随便填写比如/v2ray/
proxy_redirect off;
proxy_pass http://127.0.0.1:33618; #修改自己v2ray服务端口
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
}
7、修改v2ray配置
{
"inbounds": [
{
"port": 41992,
"listen":"127.0.0.1",//只监听 127.0.0.1,避免除本机外的机器探测到开放了 10000 端口
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "1a6693da-081d-4d47-abf3-715b7dec56b4",
"alterId": 64
}
]
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/ray"
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}
8、下载客户端
1)下载【v2ray-windows-64.zip Github Release】
https://github.com/v2ray/v2ray-core/releases
2)下载【v2rayN-v2rayN.exe-Github Release】
https://github.com/2dust/v2rayN/releases
对v2ray-windows-64.zip进行解压,然后将下载的V2RayN.exe复制到解压后的目录,即两个下载好的文件需要在同一目录。
Editing is enabled. Use the "Save changes" button below the editor to commit modifications to this file.