mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-13 14:31:15 +00:00
WIP: support different interface types: update config templates
This commit is contained in:
28
internal/wireguard/tpl/peer.tpl
Normal file
28
internal/wireguard/tpl/peer.tpl
Normal file
@@ -0,0 +1,28 @@
|
||||
# AUTOGENERATED FILE - PROVIDED BY WIREGUARD PORTAL
|
||||
# WireGuard configuration: {{ .Peer.Identifier }}
|
||||
# -WGP- PublicKey: {{ .Peer.PublicKey }}
|
||||
|
||||
[Interface]
|
||||
|
||||
# Core settings
|
||||
PrivateKey = {{ .Peer.PrivateKey }}
|
||||
Address = {{ .Peer.IPsStr }}
|
||||
|
||||
# Misc. settings
|
||||
{{- if .Peer.DNSStr}}
|
||||
DNS = {{ .Peer.DNSStr }}
|
||||
{{- end}}
|
||||
{{- if ne .Peer.Mtu 0}}
|
||||
MTU = {{.Peer.Mtu}}
|
||||
{{- end}}
|
||||
|
||||
[Peer]
|
||||
PublicKey = {{ .Peer.EndpointPublicKey }}
|
||||
Endpoint = {{ .Server.Endpoint }}
|
||||
AllowedIPs = {{ .Peer.AllowedIPsStr }}
|
||||
{{- if .Peer.PresharedKey}}
|
||||
PresharedKey = {{ .Peer.PresharedKey }}
|
||||
{{- end}}
|
||||
{{- if ne .Peer.PersistentKeepalive 0}}
|
||||
PersistentKeepalive = {{.Peer.PersistentKeepalive}}
|
||||
{{- end}}
|
Reference in New Issue
Block a user