Repository navigation
Add per-app access control for remote automation - #6206
eliotcougar wants to merge 14 commits into
Conversation
|
非常感谢 |
It's exactly backwards. The feature that is used by a small number of people makes everybody else vulnerable. It is extremely uncomfortable when an unrelated domestic app can have an update any moment that will make it possible to disable your VPN whenever it wants. And it already happens. Existing users who need automation will only have to check what automation apps can access v2rayNG. We can also try to preselect the most popular known automation apps to make the update more seamless. |
Resolve shared-resource conflicts without dropping feature-specific semantics or current upstream translations. Retain upstream service and UI updates, and migrate feature regression tests to the upstream JUnit Platform setup. Validation: PlaystoreDebug JVM suite, Kotlin compilation and APK assembly passed. All declared ABIs contain the current Xray library and both HEV libraries. Full device and OEM lifecycle regression coverage was not run.
Integrate upstream/master 01b4630, retaining subscription response-header usage metadata, the subscription information card, pill group navigation, current Kotlin/Gradle versions, and upstream native dependency gitlinks. Preserve identity-bound automation grants, authenticated Tasker and external import requests, append-only user-confirmed imports, and private internal broadcast receivers. Supply all seven feature strings in the newly maintained Azerbaijani catalog so access controls and import confirmation remain localized. VPN, proxy-only, and root start dispatch continue through LauncherManager. Validation: all 148 Play Store debug JVM tests passed, including automation policy, Tasker, URL import, and subscription metadata regressions. Kotlin compilation and x86_64 debug assembly passed; all three required packaged native libraries hash-match the official upstream inputs. Locale XML, feature-key coverage, placeholders, whitespace, and instruction-file gates passed. Not run: Android caller-identity, permission, Tasker host, external-import UI, widget/tile, and VPN/proxy-only/root runtime scenarios; VM/adb use was excluded.
Preserve per-app automation grants and daemon-only command handling while adopting upstream configuration, format, and native dependency updates.
To add to that, if someone’s already gone to the trouble of setting up automation, I doubt they’ll have much trouble poking around in Settings and giving their automation app access.
That’s what release notes are for. You can put BREAKING CHANGES in HUGE, SCARY LETTERS. |
Problem and motivation
The exported Locale/Tasker receiver accepts start/stop commands from other installed apps without authorization. An unrelated app can stop the user's VPN without sharing v2rayNG's signing key. External shared text and install links can also silently replace profiles in the default group and change selection (#6231).
I have received a confidential report that two government-affiliated apps in Russia already detect v2rayNG and send its stop command, disabling the user's VPN. The source cannot be disclosed. The independent reproduction verifies the exposed control mechanism, not the app-specific attribution.
Leaving this channel open makes it easy for more domestic apps to follow suit as they face government demands to restrict VPN users. RBC reported that the Ministry of Digital Development instructed major platforms to restrict access for users with active VPNs, with April 15, 2026 as the target date. This provides public context for the risk of wider adoption; it does not establish the reported stop-command behavior.
Changes
noBackupFilesDir, using process-local and cross-process locking. Control commands and imports share this grant store.getCallingPackage()before loading profiles and again before returning a capability. Preserve selection/start state across recreation and validate commands and explicit profile GUIDs before dispatch.LauncherManager. Immutable launcher PendingIntents continue working without an automation grant. Broadcast actions use the installed application's ID, including the F-Droid suffix.getCallingPackage(), which can identify a forwarded result recipient.Compatibility
Public integration entry points stay exported for independently signed automation hosts. Users must allow a host, then reopen and save existing plugin actions to receive a capability. Legacy anonymous Send Intent broadcasts are rejected. Import clients without shared platform identity can supply the saved capability bundle; other imports take the confirmation-and-append path.
Revocation invalidates capabilities for control and imports; regranting creates a new token. Exporting a task containing the capability delegates that access, so hosts must keep it secret. Android VPN consent, background-execution restrictions, and the selected operating mode still apply.
Current validation
Validation on
95d5ec215746cb205e1b52d87baedc4a3b4362bb, which merges upstream57907cf354d9769200ed4717b4430d605abe0952(2.3.15) without rewriting history. Reviewed the configuration/format, subscription-info, native, OkHttp, and workflow delta together with caller authorization, flavor IDs, and daemon ownership. Upstream configuration fields and request/cancellation lifecycle code are retained.:app:lintPlaystoreDebugand:app:lintFdroidDebugpassed with zero errors (329 and 345 warnings respectively).git diff --checkpassed.libgojni.so,libhev-socks5-tunnel.so, andlibhevsockstun.so.Not run: fresh device/emulator grant/revoke, caller-UID/capability, import confirmation, recreation/forwarded-result, legacy-signature, service-mode, keyboard/D-pad/TalkBack, or physical-device checks. No device target was available for this sync. Actual Tasker/Locale/MacroDroid interoperability, real network subscription updates, root-mode end-to-end, signer replacement/reinstallation, and process-death scenarios also remain unrun. Earlier API 33/API 37 protocol-compatible-host results are historical and were not repeated on this merged revision.
Fixes #6231 Silent configuration import.