香港服务器一键安装wireguard

WireGuard 是一款‌现代、高速且简洁‌的开源虚拟专用网络(VPN)协议,运行于 Linux 内核中。

这次用的是一台香港服务器4H2G30M的服务器,用的系统是Ubuntu 18

购买后用FinalShell连上服务器,按照惯例先来开启 BBR

# 检查是否开启BBR
sysctl net.ipv4.tcp_congestion_control

# 永久开启BBR
echo "net.ipv4.tcp_congestion_control=bbr" | sudo tee -a /etc/sysctl.conf
echo "net.core.default_qdisc=fq" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

如果已经开启BBR,在检查的时候会输出

net.ipv4.tcp_congestion_control = bbr

接下来开始一键安装

sudo su

apt-get update -y && apt-get install curl -y

curl -O https://raw.githubusercontent.com/atrandys/wireguard/master/wg_mult.sh && chmod +x wg_mult.sh && ./wg_mult.sh

如果有安全组记得开放对应的TCP和UDP

其他相关操作

# 停止WireGuard
wg-quick down wg0

# 查询WireGuard状态
wg

# 启动WireGuard
wg-quick up wg0

官网相关客户端下载地址https://www.wireguard.com/install/

蓝奏云下载地址:

https://52m2.lanzoub.com/b00l2vuh1e

密码:52m2.com

从服务器上下载对应的配置文件/etc/wireguard/client.conf

导入客户端

打完收工,开始畅玩