Control WireGuard with Macros

Endercraft

Moderator (& bug finder :D)
Cool. When will this version be released
 

MacroDroidDev

Administrator
Staff member
The beta is available now as linked above and new betas are rolling out regularly. I anticipate starting production roll out in the first week of October.
 

Dimlos

Well-known member
It is working on the Xiaomi Redmi Note 11.
Please read back through the thread to make sure it is properly configured and excluded from battery optimization.
 

Wifi4680

New member
Could you try attaching a screenshot of the setup?
i used this Macro.

 

Wifi4680

New member

Attachments

  • Screenshot_2023-10-11-15-45-48-698_com.arlosoft.macrodroid.jpg
    Screenshot_2023-10-11-15-45-48-698_com.arlosoft.macrodroid.jpg
    347.3 KB · Views: 62
  • Screenshot_2023-10-11-15-45-42-425_com.arlosoft.macrodroid.jpg
    Screenshot_2023-10-11-15-45-42-425_com.arlosoft.macrodroid.jpg
    434.2 KB · Views: 62
  • Screenshot_2023-10-11-15-45-23-579_com.wireguard.android.jpg
    Screenshot_2023-10-11-15-45-23-579_com.wireguard.android.jpg
    164.6 KB · Views: 61

Dimlos

Well-known member
MacroDroid Settings
App info > App permissions > Aditional permissions > control WireGuard tunnels

WireGuard Settings
Three dots in the upper right > Settings > Advanced > Allow remote control apps
Turn tunnel on once manually. (approve when alerted)
 

Attachments

  • Aditional permissions.jpg
    Aditional permissions.jpg
    161.3 KB · Views: 38
  • Advanced Settings.jpg
    Advanced Settings.jpg
    174.9 KB · Views: 38

Wifi4680

New member
MacroDroid Settings
App info > App permissions > Aditional permissions > control WireGuard tunnels

WireGuard Settings
Three dots in the upper right > Settings > Advanced > Allow remote control apps
Turn tunnel on once manually. (approve when alerted)
It worked, thank you!
 

Dm114

Well-known member
Weird macro: you send an intent ...SET_TUNNEL_UP immediately followed by another opposite intent ...SET_TUNNEL_DOWN

Either it's an error (the 2nd intent negates the previous one) or you need to add a short Wait action (a few 100th of second) between the 2 actions to allow enough time for the 1st intent to execute
 

Dimlos

Well-known member
@Dm114
Sorry for being so lazy.
We have combined the test actions into one macro, assuming they are to be done individually.

Your point is well taken.
 

koshak

New member
MacroDroid Settings
App info > App permissions > Aditional permissions > control WireGuard tunnels

WireGuard Settings
Three dots in the upper right > Settings > Advanced > Allow remote control apps
Turn tunnel on once manually. (approve when alerted)
can't find "control WireGuard tunnels" permission at my phone(miui 12.5)
 

koshak

New member
Do you have the WireGuard app installed?
of course I have,
I was able to create a working workflow in the "automate" app, because they have "wg permission" checkbox right inside their app options,
but MIUI doesn't have default android "app permissions" menu, so I can't just allow this wg permission for Macrodroid
 
Top