gcp V2Ray 搭建

版权声明:本文为博主原创文章,可以自由转载。 https://blog.csdn.net/u010953692/article/details/90734774

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

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

参考:

  1. V2Ray 使用手册
  2. V2Ray搭建详细图文教程
  3. Linux桌面版 & Windows 如何使用 V2ray 服务?
  4. Mac V2Ray 苹果系统使用教程 V2RayX
  5. Ubuntu下使用supervisor设置脚本开机自启

猜你喜欢

转载自blog.csdn.net/u010953692/article/details/90734774
gcp