Fix logic error and make some settings optional in wg.conf template. (#506)
This commit is contained in:
		
							parent
							
								
									c2a6ced991
								
							
						
					
					
						commit
						867aa1305d
					
				|  | @ -22,6 +22,6 @@ Table = {{ .globalSettings.Table }} | ||||||
| [Peer] | [Peer] | ||||||
| PublicKey = {{ .Client.PublicKey }} | PublicKey = {{ .Client.PublicKey }} | ||||||
| {{if .Client.PresharedKey }}PresharedKey = {{ .Client.PresharedKey }}{{end}} | {{if .Client.PresharedKey }}PresharedKey = {{ .Client.PresharedKey }}{{end}} | ||||||
| AllowedIPs = {{$first :=true}}{{range .Client.AllocatedIPs }}{{if $first}}{{$first = false}}{{else}},{{end}}{{.}}{{end}}{{range .Client.ExtraAllowedIPs }},{{.}}{{end}}{{end}} | AllowedIPs = {{$first :=true}}{{range .Client.AllocatedIPs }}{{if $first}}{{$first = false}}{{else}},{{end}}{{.}}{{end}}{{range .Client.ExtraAllowedIPs }},{{.}}{{end}} | ||||||
| {{if .Client.Endpoint }}Endpoint = {{ .Client.Endpoint }}{{end}} | {{if .Client.Endpoint }}Endpoint = {{ .Client.Endpoint }}{{end}} | ||||||
| {{end}} | {{end}}{{end}} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue