mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-13 14:31:15 +00:00
switch to bootstrap 4
This commit is contained in:
22
internal/wireguard/template.go
Normal file
22
internal/wireguard/template.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package wireguard
|
||||
|
||||
var (
|
||||
ClientCfgTpl = `[Interface]
|
||||
Address = {{ .Client.IPsStr }}
|
||||
PrivateKey = {{ .Client.PrivateKey }}
|
||||
{{ if ne (len .Server.DNS) 0 -}}
|
||||
DNS = {{ .Server.DNSStr }}
|
||||
{{- end }}
|
||||
{{ if ne .Server.Mtu 0 -}}
|
||||
MTU = {{.Server.Mtu}}
|
||||
{{- end}}
|
||||
[Peer]
|
||||
PublicKey = {{ .Server.PublicKey }}
|
||||
PresharedKey = {{ .Client.PresharedKey }}
|
||||
AllowedIPs = {{ .Client.AllowedIPsStr }}
|
||||
Endpoint = {{ .Server.Endpoint }}
|
||||
{{ if and (ne .Server.PersistentKeepalive 0) (not .Client.IgnorePersistentKeepalive) -}}
|
||||
PersistentKeepalive = {{.Server.PersistentKeepalive}}
|
||||
{{- end}}
|
||||
`
|
||||
)
|
Reference in New Issue
Block a user