Skip to content

🐲 WireGuard 配置文件示例

Virgil Clyne edited this page Sep 1, 2022 · 18 revisions

Surge

  • 详细说明: https://manual.nssurge.com/policy/wireguard.html
  • 客户端私钥: private-key,由Wireguard客户端生成
  • 节点公钥: public-key,Cloudflare WARP的公钥始终为bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
  • 可用IP: endpoint,目前Surge仅支持单节点(peer),所以需要选择一个可用IP,详见可用IP,可以直接使用engage.nanocat.me:2408,此地址已配置解析为所有可用IP
  • 客户端 IPv6 地址: self-ip-v6,隧道内使用 IPv6,x为随机ipv6地址(此配置需要iOS 5.20.0 (2452)macOS Version 4.8.1-1809 及以上版本)
[Proxy]
☁WARP = wireguard, section-name = Cloudflare, test-url=http://1.1.1.1/generate_204

[Group]
你的策略组 = 节点1, 节点2, 节点3, WARP

[WireGuard Cloudflare]
private-key = 客户端私钥
self-ip = 172.16.0.2
self-ip-v6 = 2606:4700:110:xxxx:xxxx:xxxx:xxxx:xxxx
dns-server = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001
mtu = 1280
peer = (public-key = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=, allowed-ips = "0.0.0.0/0, ::/0", endpoint = engage.nanocat.me:2408, keepalive = 45)
Clone this wiki locally