OpenWRT Wireguard routing trick

Here is a smashing trick. Routing problems can arise if Wireguard replace default route when up, then when it is down you may not have a default route.
So, Have your default route for 0.0.0.0/0
And then Wireguard routes split the full IP space in two. You have two routes that are more specific. That way when wireguard is up, the wireguard routes take preferences. When down, default route works.
uci set network.@wireguard_wgclient[0].route_allowed_ips=”0″ uci -q delete network.@wireguard_wgclient[0].allowed_ips uci add_list network.@wireguard_wgclient[0].allowed_ips=”0.0.0.0/1″ uci add_list network.@wireguard_wgclient[0].allowed_ips=”128.0.0.0/1″
Discuss it here forum.openwrt.org/t/help-config-wireguard-client/69132/13