版权声明:本文为博主原创文章,可以自由转载。 https://blog.csdn.net/u010953692/article/details/90734774
V2Ray 搭建
1,CentOS 安装bbr
- bbr 查看
$ cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
$ sudo -i
# sysctl net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_available_congestion_control = cubic reno
# sysctl net.ipv4.tcp_congestion_control
net.ipv4.tcp_congestion_control = cubic
# sysctl net.core.default_qdisc
net.core.default_qdisc = pfifo_fast
# lsmod | grep bbr
#
- bbr 安装,输入y重启
# yum install -y wget
# wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh
# chmod +x bbr.sh
# ./bbr.sh
$ sysctl net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_available_congestion_control = reno cubic bbr
$ sysctl net.ipv4.tcp_congestion_control
net.ipv4.tcp_congestion_control = bbr
$ lsmod | grep bbr
tcp_bbr 20480 10
2,使用脚本安装
bash <(curl -s -L https://git.io/v2ray.sh)
tcp 传输协议
port 端口自定义
Shadowsocks 不配置
3,简单配置
# v2ray url
# 生成 vmess URL 链接
4,客户端安装
4.1,macOS 客户端
V2Ray客户端下载
V2RayX GUI 客户端下载 V2RayX.app.zip
- 只需要配置3个参数
Address 服务器IP、端口、User ID
- 启动 选择PAC Mode模式,Load core启动,宽带基本可以拉满
4.2,ios 客户端
- 使用Shadowrocket
- 选择 Vmess 类型
4.3,linux 客户端
- Linux环境
╰─➤ lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: 2019.2
Codename: n/a
- v2ray linux 客户端下载
v2ray-linux-64.zip 下载地址
配置 config.json
╰─➤ ./v2ray
4.3.1,火狐浏览器配置socks代理
4.3.2,google 浏览器安装SwitchyOmega 插件
- 命令启动浏览器代理
╰─➤ /usr/bin/google-chrome-stable %U --no-sandbox -user-data-dir --proxy-server="socks5://127.0.0.1:1080"
- 安装Proxy SwitchyOmega插件
- Socks5配置
- 切换到 proxy
4.3.3,v2ray 开机自动启动
# apt-cache search supervisor
# apt-get install supervisor
# cd /etc/supervisor/conf.d/
# touch v2ray.conf
# vim v2ray.conf
╰─➤ cat v2ray.conf
[program:v2ray]
command=/root/v2ray/v2ray
autostart=true
autorestart=true
# systemctl restart supervisor
# systemctl status supervisor
# systemctl enable supervisor
参考: