SSR 几百年不更新了,目前较为主流的代理工具中,除了用户众多的 Shadowsocks/ShadowsocksR 外,V2Ray 也有广泛的使用人群。凭借强大的功能、不错的使用效果,V2Ray 正越来越被大家接受和认可,是 SS/SSR 的重要备选工具。
一键脚本
这边推荐两个脚本,都是经过本人亲自测试过的,如果你是 CentOS 系统需要关闭防火墙
或者放行相关端口
# Centos关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service
如果提示 curl: command not found
,那是因为你的 VPS 没装 curl
,安装命令:
# CentOS:
yum update -y && yum install curl -y
# Debian/Ubuntu:
apt-get update -y && apt-get install curl -y
1. 233boy 一键脚本
233boy 的 V2Ray 搭建脚本貌似有 BUG 用户无法自定义端口,不过依然能够正常安装使用,支持单用户及多种协议,非常推荐
# Debian 8+ CentOS 7+ Ubuntu 16+
bash <(curl -s -L https://git.io/v2ray.sh)
2. multi-v2ray 一键脚本
GitHub 地址:https://github.com/Jrohy/multi-v2ray
这是个脚本作者一直在维护,支持多用户管理及多种协议(详见作者 GitHub)和 Docker 部署,不过个人觉得还是 233boy 版的好用
# 安装中文版
source <(curl -sL https://multi.netlify.com/v2ray.sh) --zh
其他说明
V2Ray 时间要求
VPS 服务器时间与 V2Ray 客户端所在设备时间,两者最好保持一致,不要误差太大。这是 V2Ray 自身要求,与脚本无关。SSH 连接服务器,输入 date
命令,可以查看服务器时间。
V2Ray 协议说明
没啥需求就用 TCP
追求更加安全就用 WS + TLS
ISP 多作怪用动态端口
VPS 网络不好就用 mKCP
BBR 加速
使用233版自带的 BBR 或者使用下面的安装脚本,安装期间可能会更换系统内核选择 NO
即可
注意:过程有 2 步,第 1 步安装相应的内核,第 2 步开启内核对应的加速。运行以下命令:
# CentOS 6+、Debian 8+、Ubuntu 14+
# 预先准备
CentOS:yum install ca-certificates wget -y && update-ca-trust force-enable
Debian/Ubuntu:apt-get install ca-certificates wget -y && update-ca-certificates
# 不卸载内核版本
wget -N "https://github.000060000.xyz/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.sh
# 卸载内核版本
wget -N "https://github.000060000.xyz/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
运行后出现如下的界面:
根据提示安装即可,重启后可以使用 bash tcp.sh
命令接着操作,建议安装 BBRplus内核 和开启 BBRplus版 加速,据说速度最快。
各平台客户端
注:使用 Clash 客户端需要转换链接格式,可以使用在线API转换工具
Windows
客户端 下载地址 Clash for Windows(荐) https://github.com/Fndroid/clash_for_windows_pkg V2RayN https://github.com/2dust/v2rayN/releases MacOS
客户端 下载地址 ClashX https://github.com/yichengchen/clashX/releases Android
客户端 下载地址 ClashForAndroid(荐) https://github.com/Kr328/ClashForAndroid V2RayNG https://github.com/2dust/v2rayNG/releases iOS客户端客户端下载地址:
IOS 目前没有免费的客户端,付费的有:QuantumultX(荐)、Shadowrocket等,需要去美区商店下载。
Comments | 4 条评论
V2的一键脚本别用了,我已经被查水表了
该评论为私密评论
好累,做啥都不能风平浪静=-=
阿里云端口也放行了,=-= 连接显示超时
v2ray.service - V2Ray Service
Loaded: loaded (/etc/systemd/system/v2ray.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2020-06-07 11:32:51 CST; 1min 2s ago
Docs: https://www.v2ray.com/
https://www.v2fly.org/
Main PID: 32649 (v2ray)
Tasks: 7 (limit: 23087)
Memory: 8.7M
CGroup: /system.slice/v2ray.service
└─32649 /usr/bin/v2ray/v2ray -config /etc/v2ray/config.json
[root@MuYu ~]# netstat -apn | grep v2ray
tcp 0 0 127.0.0.1:62237 0.0.0.0: LISTEN 32649/v2ray
udp6 0 0 :::55472 ::: 32649/v2ray
unix 3 [ ] STREAM CONNECTED 3133006 32649/v2ray
老蘑菇天下第一