mirror of
https://github.com/amnezia-vpn/amneziawg-android.git
synced 2026-10-13 21:34:07 +00:00
[PR #69] feat: Allow any application to toggle the tunnels, useful for automation #81
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amnezia-vpn/amneziawg-android#81
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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)
4e73c35feat: 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.