Mac安装Wireguard

Alan

Alan

Maintainer of blog
  1. 安装 WireGuard 客户端
brew install wireguard-tools
  1. 配置 WireGurad 客户端
sudo mkdir /usr/local/etc/wiregurad
sudo touch /usr/local/etc/wiregurad/wg0.conf

wg0.conf 文件如下:

[Interface]
Address = 10.200.200.2/32
PrivateKey = <client_private_key>
MTU = 1420
[Peer]
PublicKey = <server_public_key>
Endpoint = <SERVER_IP:SERVER_PORT>
AllowedIPs = 10.200.0.0/16
PersistentKeepalive = 25
  1. 启动 WireGuard
sudo wg-quick up wg0-client
sudo wg show

原文