remove [Interfaces] left over from before, re-order

This commit is contained in:
Callan Bryant 2020-10-19 17:49:36 +01:00
parent b38e0966eb
commit d0e8eb74ec
No known key found for this signature in database
GPG Key ID: C31FA9DF3ACBFFAA

17
add.go
View File

@ -23,23 +23,18 @@ AllowedIPs={{ .AllowedIPs }}
PersistentKeepalive={{ .Keepalive }}
`
const vyattaPeerConf = `[Interface]
configure
const vyattaPeerConf = `configure
set interfaces wireguard dsnet address {{ .Peer.IP }}/{{ .Cidrmask }}
set interfaces wireguard dsnet route-allowed-ips true
set interfaces wireguard dsnet peer {{ .DsnetConfig.PrivateKey.PublicKey.Key }} endpoint {{ .DsnetConfig.ExternalIP }}:{{ .DsnetConfig.ListenPort }}
set interfaces wireguard dsnet peer allowed-ips {{ .AllowedIPs }}
set interfaces wireguard dsnet peer persistent-keepalive {{ .Keepalive }}
set interfaces wireguard dsnet private-key {{ .Peer.PrivateKey.Key }}
set interfaces wireguard dsnet preshared-key {{ .Peer.PresharedKey.Key }}
{{- if .DsnetConfig.DNS }}
#set service dns forwarding name-server {{ .DsnetConfig.DNS }}
{{ end }}
set interfaces wireguard dsnet private-key {{ .Peer.PrivateKey.Key }}
set interfaces wireguard dsnet preshared-key {{ .Peer.PresharedKey.Key }}
set interfaces wireguard dsnet peer {{ .DsnetConfig.PrivateKey.PublicKey.Key }} endpoint {{ .DsnetConfig.ExternalIP }}:{{ .DsnetConfig.ListenPort }}
set interfaces wireguard dsnet peer allowed-ips {{ .AllowedIPs }}
set interfaces wireguard dsnet peer persistent-keepalive {{ .Keepalive }}
commit; save
`