How to connect to VPN server through LAN (WiFi)?

Hi I would like to enable “Always-On-VPN” on Android, at least when not at home. Unfortunately Android doesn’t include an option to disable VPN on certain networks. However with Turris’ default configuration connecting to the OpenVPN server through LAN is not possible. And of course I also want my phone to use the WiFi at home. Is there a safe and relatively easy way to enable VPN connection through LAN/WiFi?

Note: I would prefer to not use Tasker on Android to hack together a conditional connection.

You could simply edit openvpn.conf for your client and add local ip (additionally) with example: remote 192.168.0.1

So your config contains your public ip/domain AND local ip of your router. Like that you can have openvpn client on your android device always on and it will randomly try to connect to either of the ips.

If on public network it will connect to your public ip and if on wifi it will connect to your local ip.