Hope it is OK to reply to this old question, its the only one that comes up with 'wireguard' when searched and I believe it may be possible to toggle tunnels now.
In the wireguard app there is now a setting to 'Allow remote control apps', where external apps may toggle tunnels My knowledge is just too limited to know how to even begin to test this. I have though got the 'Start app block' that opens wireguard and I see the list of my tunnels, so far that's all I can do.
I'm happy to spend time trying various ways to choose a tunnel and get it to toggle, could anyone point me in the right direction to get started?
Thank you