windows端wireguard配置文件示例

默认分类 · 13 天前 · 6 人浏览

服务器端

[Interface]
#本地私钥
PrivateKey = aMvQI2MC33Rz3VcG7I2Q/7dXyCgnWDhJ8PpQGTJugUQ=
#监听的端口,需要在防墙中放行。
ListenPort = 9999
#本机ip
Address = 192.168.99.1/24

[Peer]
#客户端公钥
PublicKey = Seqx0m/+yr9pes4ziJxSch5eP44UlM6vwOSKjxakmxI=
#要路由的ip,如果是单机的话,掩码必需是32位的,ipv6前缀必需是128
AllowedIPs = 192.168.99.2/32

客户端

[Interface]
#本机私钥
PrivateKey = SLJ4DZ0d9wUa6rY1JZV5ulfyWJyCJWbGXoAvQ35s6EM=
#本机ip
Address = 192.168.99.2/24

[Peer]
#对端公钥
PublicKey = BdoyQ6Fv9FlSxQm7WlVJ6GJ39u8jkWxSfFfOOcjP7CI=
#要路由的ip
AllowedIPs = 192.168.99.0/24
#服务器ip和端口,ipv6要用[]号括起来
Endpoint = [240e:335:24a:a690::7d3]:9999
#握手时间,如不加这个,过段时间,服务器会ping不通客户端
PersistentKeepalive = 25
Theme Jasmine by Kent Liao