🎨配置文件的初始化

This commit is contained in:
coward
2024-03-07 17:32:38 +08:00
parent 28cdfd1240
commit 15cfa17a5e
12 changed files with 228 additions and 33 deletions

View File

@@ -1,9 +1,18 @@
[Interface]
Address = {{ .Address }}
ListenPort = {{ .ListenPort }}
PrivateKey = {{ .PrivateKey }}
MTU = {{ .MTU }}
PostUp = {{ .PostUp }}
PreDown = {{ .PreDown }}
PostDown = {{ .PostDown }}
Table = {{ .Table }}
Address = {{ .Server.Address }}
ListenPort = {{ .Server.ListenPort }}
PrivateKey = {{ .Server.PrivateKey }}
MTU = {{ .Server.MTU }}
PostUp = {{ .Server.PostUp }}
PreDown = {{ .Server.PreDown }}
PostDown = {{ .Server.PostDown }}
Table = {{ .Server.Table }}
{{ range .Clients }}
[Peer]
PublicKey = {{ .Client.PublicKey }}
PresharedKey = {{ .Client.PresharedKey }}
AllowedIPs = {{ .Client.AllowedIPs }}
PersistentKeepalive = {{ .Client.PersistentKeepalive }}
Endpoint = {{ .Client.Endpoint }}
{{ end }}