WireGuard一键安装

WireGuard是新一代VPN协议,目前已经支持Linux, macOS, Android, iOS以及OpenWrt平台。使用了最先进的加密技术(利用Curve25519进行密钥交换,ChaCha20和Poly1305用于数据认证,BLAKE2用于散列),安全性毋庸置疑。WireGuard使用UDP协议传输数据。这里推荐一键安装方式建立服务器端,过程非常简单。

以Debian10.1系统为例,先用Bitvise SSH Client登入远端主机,打开终端。然后输入下面命令下载安装脚本:

wget https://git.io/wireguard -O wireguard-install.sh && chmod +x wireguard-install.sh && bash wireguard-install.sh

如果您的linux 默认没有自带 wget 请您先安装wget

#ubuntu debian 安装wget
apt install wget -y
centos 安装wget
yum install wget -y

客户端配置文件会在/root/里面

比如这里安装显示在

The client configuration is available in: /root/ss.conf New clients can be added by running this script again.

systemctl start wg-quick@wg0      # 启动VPN
systemctl stop wg-quick@wg0      # 停止VPN
systemctl restart wg-quick@wg0     # 重启VPN
wg                # 查看wg0接口设置 (尤其是查看端口listening port是多少)
ip a show wg0     # 查看wg0接口的IP地址 

最后更新于