NHAS / wag

Simple Wireguard 2FA
BSD 3-Clause "New" or "Revised" License
486 stars 27 forks source link

Default value of NAT in config is null #97

Closed eeldivad closed 2 months ago

eeldivad commented 4 months ago

It's not a big deal but when we run "sudo ./wag gen-config" it generates the config file with "NAT": null

When starting up the service I see NAT is enabled: Set routing mode to MASQUERADE (NAT)

Shouldn't the confg generator default "NAT": true instead of null? The null here makes me think that NAT is off. Not a big deal but just wanted to mention it if you could fix it in the next release.

NHAS commented 2 months ago

Yep! Thats entirely fair, I've been a bit slow on this project recently due to getting the clustering all working. So changes like this are a bit on the back burner (especially as I plan to remove the cli config generation in favor of a web UI at some point)

NHAS commented 2 months ago

I've just added the json tag to omit empty, it'll default to true internally. Thanks! This is now on unstable.