@
TashinV #19
Module 和 Profile 遵从一样的语法,我是这么写的:
Profile 里面:
[Rule]
RULE-SET,192.168.9.0/24,wg
[Proxy]
wg = wireguard, section-name=WG
然后就结束,规则里面不写 WG peers ,然后每个 module 里面(我用我给 Mini 用的做例子):
# mini.sgmodule
[WireGuard WG]
private-key = <Peer Private Key>
self-ip = 192.168.9.2
self-ip-v6 = fd00:9::2
dns-server = 10.0.0.1
mtu = 1280
peer = (public-key = <PubKey>, allowed-ips = "0.0.0.0/0, ::/0", endpoint = host:port, preshared-key = <PSK>, keepalive = 25)
然后如常应用 Profile ,再去加载规则( Profiles 和 Modules 在一个文件夹内)