WIP: support different interface types: many fixes and improvements...

This commit is contained in:
Christoph Haas
2021-04-03 23:54:35 +02:00
parent 3bfcbe0209
commit 647fe92a03
10 changed files with 134 additions and 78 deletions

View File

@@ -48,7 +48,7 @@ PublicKey = {{ .PublicKey }}
PresharedKey = {{ .PresharedKey }}
{{- end}}
AllowedIPs = {{ .AllowedIPsStr }}
{{- if ne .Endpoint ""}}
{{- if and (ne .Endpoint "") (ne $.Interface.Type "server")}}
Endpoint = {{ .Endpoint }}
{{- end}}
{{- if ne .PersistentKeepalive 0}}

View File

@@ -18,7 +18,7 @@ MTU = {{.Peer.Mtu}}
[Peer]
PublicKey = {{ .Peer.EndpointPublicKey }}
Endpoint = {{ .Server.Endpoint }}
Endpoint = {{ .Peer.Endpoint }}
AllowedIPs = {{ .Peer.AllowedIPsStr }}
{{- if .Peer.PresharedKey}}
PresharedKey = {{ .Peer.PresharedKey }}