This is as far as I am now:
There does not seem to be a config file in the source or if it is I could not find it.
The default is if there is no setting in the config file (option route_allowed_ips
)
The script responsible for this package/network/utils/wireguard-tools/files/wireguard.sh
which is installed in lib/netifd/proto/
treats no option set (default) as not enabled (line 43: config_get_bool route_allowed_ips "${peer_config}" "route_allowed_ips" 0
).
This can easily be changed but then all existing configurations will be invalid so this is a no-go.
Next I have been looking into Luci trying to enable the setting there by default.
The js script responsible seem:
feeds/luci/protocols/luci-proto-wireguard/ht-docs/luci-static/resources/protocol/wireguard.js
line 653:
`o = ss.option(form.Flag, 'route_allowed_ips', _('Route Allowed IPs'), _('Optional. Create routes for Allowed IPs for this peer.'));`
Looking at another thread where @jow commented with advice
I added:
o.default = o.enabled;
o.forcewrite = true;
This result in the option in Luci indeed as being ticked (enabled) however nothing is written in the config, it looks like the default option is not written to the config file, because if I disable the option in LuCi then the option is written en is disabled (option route_allowed_ips '0'
)
So how to get this default option written to the config file, I had hoped that forcewrite
should do that but apparently not.
If anybody has any advice it is welcome.