Client to connect only if vpn/wireguard is connected to home router

Dear all,
is there a possibility to adjust that android client in only trying to connect to server if
Wireguard or other vpn is connected to my router at home?

Greetings

No, you need to take care of it on your own.

Hello,

Consider using Split DNS to achieve the goal rather waiting for a specific network route being available

Thanks.

Hmmm,
how to do this on Android?
Can you give me some hints?

You could use FolterSync. FolterSync offers the option to sync only if a VPN is active.