I have successfully setup my wireguard client. And if wireless interface is turned off, no problem. My wireguard connection works perfectly routing through eth0 to the outside world.
But when both eth0 and wlan0 are connected (these interfaces are on two different networks with two totally separate internet gateways), it seems libreelec has a preference to set up the iproute table so that wg0 endpoint will route through wlan0 and not eth0.
Normally I would think of "postup" in wireguard config file as a way to solve this issue, by adding appropriate iproute commands in "postup" to set up routing table properly. But with libreelec using connman, I don't know of a way to add the "postup" section.
So now this is what I see when I type in "ip route":
LibreELEC:~/.config # ip route
default dev wg0 scope link
10.64.0.1 dev wg0 scope link
103.125.233.3 via 192.168.1.9 dev wlan0
192.168.1.0/24 dev wlan0 scope link src 192.168.1.5
192.168.1.9 dev wlan0 scope link
218.252.0.24 via 222.167.31.1 dev eth0
218.252.0.25 via 222.167.31.1 dev eth0
222.167.31.0/24 dev eth0 scope link src 222.167.31.87
222.167.31.1 dev eth0 scope link
where 103.125.233.3 is my Wireguard endpoint. So basically I'd like to see
103.125.233.3 via 222.167.31.1 dev eth0
instead of
103.122.233.3 via 192.168.1.9 dev wlan0
when everything is connected.
Any help appreciated !!