[PR #69] feat: Allow any application to toggle the tunnels, useful for automation #81

Open
opened 2026-10-13 21:05:53 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amneziawg-android/pull/69
Author: @laralex
Created: 4/9/2026
Status: 🔄 Open

Base: master ← Head: feat/public-intent-receiver


📝 Commits (1)

  • 4e73c35 feat: Drop the CONTROL_TUNNELS signature permission requirement from the

📊 Changes

1 file changed (+1 additions, -2 deletions)

View changed files

📝 ui/src/main/AndroidManifest.xml (+1 -2)

📄 Description

I wanted to make an external app to conveniently toggle the tunnels. Useful in Russia where you need to toggle it a lot, and using the Android dropdown menu is inconvenient.

In the current code base the external application must request CONTROL_TUNNELS permission in its manifest in order to broadcast messages to IntentReceiver.

However, there are some applications like Automate/Tasker/MacroDroid, that allow implementing simple programs without programming. Unfortunately, they don't request this permission in the manifest, thus the broadcast messages to IntentReceiver don't work. You have to actually go to Android Studio and make the app from scratch to request this permission.

So I made this change to your Android client, to remove requirement on the CONTROL_TUNNELS from the IntentReceiver.

And then I could control the tunnel from Automate. * Here I demonstrate the Automate app that I made, it's very convenient
https://github.com/user-attachments/assets/d1f0eced-acf3-4500-8533-2eabcdf2999f

Note that the user can still keep the checkbox "allow remote control intents" disabled, and so no other app by default will be able to control Amnezia client

Please consider this change, as I think it's useful, and if some external malicious application wants to disable all VPN tunnels from Amnezia, they still can do it by simply requesting this permission in the manifest. So it's a sloppy guard


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amneziawg-android/pull/69 **Author:** [@laralex](https://github.com/laralex) **Created:** 4/9/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `feat/public-intent-receiver` --- ### 📝 Commits (1) - [`4e73c35`](https://github.com/amnezia-vpn/amneziawg-android/commit/4e73c35906ecd0f7ebd45325e0d9e2bce0b7112d) feat: Drop the CONTROL_TUNNELS signature permission requirement from the ### 📊 Changes **1 file changed** (+1 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `ui/src/main/AndroidManifest.xml` (+1 -2) </details> ### 📄 Description I wanted to make an external app to conveniently toggle the tunnels. Useful in Russia where you need to toggle it a lot, and using the Android dropdown menu is inconvenient. In the current code base the external application must request CONTROL_TUNNELS permission in its manifest in order to broadcast messages to IntentReceiver. However, there are some applications like Automate/Tasker/MacroDroid, that allow implementing simple programs without programming. Unfortunately, they don't request this permission in the manifest, thus the broadcast messages to IntentReceiver don't work. You have to actually go to Android Studio and make the app from scratch to request this permission. So I made this change to your Android client, to remove requirement on the CONTROL_TUNNELS from the IntentReceiver. And then I could control the tunnel from Automate. * Here I demonstrate the Automate app that I made, it's very convenient https://github.com/user-attachments/assets/d1f0eced-acf3-4500-8533-2eabcdf2999f Note that the user can still keep the checkbox "allow remote control intents" disabled, and so no other app by default will be able to control Amnezia client Please consider this change, as I think it's useful, and if some external malicious application wants to disable all VPN tunnels from Amnezia, they still can do it by simply requesting this permission in the manifest. So it's a sloppy guard --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-android#81
No description provided.