set interface description

This commit is contained in:
Callan Bryant 2020-10-19 03:37:21 +01:00
parent 0f7ea82d8b
commit 53483ffaee
No known key found for this signature in database
GPG Key ID: C31FA9DF3ACBFFAA

2
add.go
View File

@ -23,10 +23,12 @@ AllowedIPs={{ .AllowedIPs }}
PersistentKeepalive={{ .Keepalive }}
`
// TODO use random wg0-wg999 to hopefully avoid conflict by default?
const vyattaPeerConf = `configure
set interfaces wireguard wg0 address {{ .Peer.IP }}/{{ .Cidrmask }}
set interfaces wireguard wg0 route-allowed-ips true
set interfaces wireguard wg0 private-key {{ .Peer.PrivateKey.Key }}
set interfaces wireguard wg0 description dsnet
{{- if .DsnetConfig.DNS }}
#set service dns forwarding name-server {{ .DsnetConfig.DNS }}
{{ end }}