65 lines
2.0 KiB
Smarty
Raw Normal View History

2023-02-12 23:13:04 +01:00
# AUTOGENERATED FILE - DO NOT EDIT
2023-06-24 01:35:25 +02:00
# This file uses wg-quick format.
# See https://man7.org/linux/man-pages/man8/wg-quick.8.html#CONFIGURATION
# Lines starting with the -WGP- tag are used by
# the WireGuard Portal configuration parser.
2023-02-12 23:13:04 +01:00
2023-06-24 01:35:25 +02:00
# -WGP- WIREGUARD PORTAL CONFIGURATION FILE
# -WGP- version {{ .Portal.Version }}
2023-02-12 23:13:04 +01:00
[Interface]
2023-06-24 01:35:25 +02:00
# -WGP- Peer: {{.Peer.Identifier}}
# -WGP- Created: {{.Peer.CreatedAt}}
# -WGP- Updated: {{.Peer.UpdatedAt}}
2023-02-12 23:13:04 +01:00
# -WGP- Display name: {{ .Peer.DisplayName }}
2023-06-24 01:35:25 +02:00
# -WGP- PublicKey: {{ .Peer.Interface.KeyPair.PublicKey }}
2023-02-12 23:13:04 +01:00
{{- if eq .Peer.Interface.Type "server"}}
# -WGP- Peer type: server
2023-06-24 01:35:25 +02:00
{{else}}
# -WGP- Peer type: client
2023-02-12 23:13:04 +01:00
{{- end}}
# Core settings
2023-06-24 01:35:25 +02:00
PrivateKey = {{ .Peer.Interface.KeyPair.PrivateKey }}
Address = {{ CidrsToString .Peer.Interface.Addresses }}
2023-02-12 23:13:04 +01:00
# Misc. settings (optional)
{{- if .Peer.Interface.DnsStr.GetValue}}
DNS = {{ .Peer.Interface.DnsStr.GetValue }}
{{- end}}
{{- if ne .Peer.Interface.Mtu.GetValue 0}}
MTU = {{ .Peer.Interface.Mtu.GetValue }}
{{- end}}
{{- if ne .Peer.Interface.FirewallMark.GetValue 0}}
FwMark = {{ .Peer.Interface.FirewallMark.GetValue }}
{{- end}}
{{- if ne .Peer.Interface.RoutingTable.GetValue ""}}
Table = {{ .Peer.Interface.RoutingTable.GetValue }}
{{- end}}
# Interface hooks (optional)
{{- if .Peer.Interface.PreUp.GetValue}}
PreUp = {{ .Peer.Interface.PreUp.GetValue }}
{{- end}}
{{- if .Peer.Interface.PostUp.GetValue}}
PostUp = {{ .Peer.Interface.PostUp.GetValue }}
{{- end}}
{{- if .Peer.Interface.PreDown.GetValue}}
PreDown = {{ .Peer.Interface.PreDown.GetValue }}
{{- end}}
{{- if .Peer.Interface.PostDown.GetValue}}
PostDown = {{ .Peer.Interface.PostDown.GetValue }}
{{- end}}
[Peer]
2023-06-24 01:35:25 +02:00
PublicKey = {{ .Peer.EndpointPublicKey.GetValue }}
2023-02-12 23:13:04 +01:00
Endpoint = {{ .Peer.Endpoint.GetValue }}
{{- if .Peer.AllowedIPsStr.GetValue}}
AllowedIPs = {{ .Peer.AllowedIPsStr.GetValue }}
{{- end}}
{{- if .Peer.PresharedKey}}
PresharedKey = {{ .Peer.PresharedKey }}
{{- end}}
2023-06-24 01:35:25 +02:00
{{- if and (ne .Peer.PersistentKeepalive.GetValue 0) (eq .Peer.Interface.Type "client")}}
2023-02-12 23:13:04 +01:00
PersistentKeepalive = {{ .Peer.PersistentKeepalive.GetValue }}
{{- end}}