Update patch to use the new ExternalHost feature.
This commit is contained in:
parent
d699862962
commit
66a7dff5e9
8
add.go
8
add.go
@ -66,7 +66,7 @@ commit; save
|
||||
`
|
||||
|
||||
const nixosPeerConf = `networking.wireguard.interfaces = {{ "{" }}
|
||||
{{ .Wgif }} = {{ "{" }}
|
||||
dsnet = {{ "{" }}
|
||||
ips = [
|
||||
{{ if gt (.DsnetConfig.Network.IPNet.IP | len) 0 -}}
|
||||
"{{ .Peer.IP }}/{{ .CidrSize }}"
|
||||
@ -91,11 +91,7 @@ const nixosPeerConf = `networking.wireguard.interfaces = {{ "{" }}
|
||||
"{{ .DsnetConfig.Network6 }}"
|
||||
{{ end -}}
|
||||
];
|
||||
{{ if gt (.DsnetConfig.ExternalIP | len) 0 -}}
|
||||
endpoint = "{{ .DsnetConfig.ExternalIP }}:{{ .DsnetConfig.ListenPort }}";
|
||||
{{ else -}}
|
||||
endpoint = "{{ .DsnetConfig.ExternalIP6 }}:{{ .DsnetConfig.ListenPort }}";
|
||||
{{ end -}}
|
||||
endpoint = "{{ .Endpoint }}:{{ .DsnetConfig.ListenPort }}";
|
||||
persistentKeepalive = {{ .Keepalive }};
|
||||
{{ "}" }}
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user