VPN
wireguard
自动一键配置
wget -O wireguard.sh https://get.vpnsetup.net/wg
路由配置(国外ip走代理)
手动配置(ubuntu)
- 安装 WireGuard
sudo apt-get update
sudo apt-get install wireguard
- 配置 WireGuard
nano /etc/wireguard/wg0.conf
[Interface]
Address = 10.0.0.1/24
ListenPort = 51820
PrivateKey = <服务器端私钥>
[Peer]
PublicKey = <客户端公钥>
AllowedIPs = 10.0.0.2/32
- 启动 WireGuard
wg-quick up /etc/wireguard/wg0.conf
wg-quick down /etc/wireguard/wg0.conf
- 配置防火墙
ufw enable
ufw allow 51820/udp
# ufw delete allow 51820/udp
wg # 查看链接状态
- 安装 连接客户端wireguard 软件
IPScure VPN
IKEV2
IPsec/L2TP
yum update # update
wget https://git.io/vpnquickstart -O vpn.sh && sudo sh vpn.sh
ikev2
# Set up IKEv2 using default options
sudo ikev2.sh --auto
# Alternatively, you may customize IKEv2 options
sudo ikev2.sh
IPsec/XAuth
部署google BBR 拥塞控制算法
uname -r # 查看 linux 内核版本 需满足版本 大于等于4.9
编辑 /etc/sysctl.conf
文件 增加
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr