Skip to content

Commit

Permalink
Make settings optional
Browse files Browse the repository at this point in the history
  • Loading branch information
systemcrash committed Jan 31, 2024
1 parent 2fdafd3 commit a9983f5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions templates/wg.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
Address = {{$first :=true}}{{range .serverConfig.Interface.Addresses }}{{if $first}}{{$first = false}}{{else}},{{end}}{{.}}{{end}}
ListenPort = {{ .serverConfig.Interface.ListenPort }}
PrivateKey = {{ .serverConfig.KeyPair.PrivateKey }}
{{if .globalSettings.MTU}}MTU = {{ .globalSettings.MTU }}{{end}}
PostUp = {{ .serverConfig.Interface.PostUp }}
PreDown = {{ .serverConfig.Interface.PreDown }}
PostDown = {{ .serverConfig.Interface.PostDown }}
Table = {{ .globalSettings.Table }}
{{if .globalSettings.MTU }}MTU = {{ .globalSettings.MTU }}{{end}}
{{if .serverConfig.Interface.PostUp }}PostUp = {{ .serverConfig.Interface.PostUp }}{{end}}
{{if .serverConfig.Interface.PreDown }}PreDown = {{ .serverConfig.Interface.PreDown }}{{end}}
{{if .serverConfig.Interface.PostDown }}PostDown = {{ .serverConfig.Interface.PostDown }}{{end}}
{{if .globalSettings.Table }}Table = {{ .globalSettings.Table }}{{end}}

{{range .clientDataList}}{{if eq .Client.Enabled true}}
# ID: {{ .Client.ID }}
Expand Down

0 comments on commit a9983f5

Please sign in to comment.