Repository navigation
fix: camex 4.4.1, the tunnel no longer takes the VPN from another app by itself (2.27.4) - #297
Conversation
… by itself (2.27.4) The app's start and the restart for a new web page port use startWhenFree(): while another app's VPN is up the tunnel waits (WAITING in Settings, in /stats.json and on the web page) and connects when that VPN ends. The consent is asked at the app's start only when no other app's VPN is up, since with the consent given consentIntent() takes the VPN. Save with Join on keeps start(). e2e: the tunnel's interface is any tun*, not tun0: camex 4.4.0 keeps the old TUN until the new one is up, so a restarted tunnel is on tun1. Closes #296
PR Summary by QodoWait for other apps’ VPNs before automatically starting the camex tunnel
AI Description
Merge Risk
|
Code Review by Qodo
1.
|
…in one call (Qodo on #297) autoStart() checked otherVpnActive() and then called consentIntent(), which takes the VPN when the consent is there: another app's VPN coming up in between was taken. It calls startWhenFree() now; only NEEDS_CONSENT (no consent, so nothing can be taken) shows the system dialog, once per start of the app.
|
Qodo finding 1 (auto-start can still seize another VPN): fixed in 6e378f5. |
Closes #296.
camex 4.4.0/4.4.1 (OpenIPC/camex#197, #200):
VpnService.prepare()of an app with the consent takes the device's one VPN at once, so Decoder's own starts of the tunnel took it from vectis, microsnander or the camex app.bundles/camex→ 7a8834e (4.4.1; 4.4.0'sgetOwnerUid()on Android 10 failed lint with NewApi and is fixed there).NetworkPanel: the app's start and the restart for a new web page port usestartWhenFree(); Save with Join on keepsstart(). At the app's startconsentIntent()is called only whenotherVpnActive()is false (the first set-up on Android 5.0 still shows the dialog).WAITING: "Waiting for the VPN: another app holds it; Save takes it" in Settings,waitingin/stats.json(docs/debug.md) and on the web page's board.tests/e2e.sh: the tunnel's address on anytun*: the library keeps the old TUN until the new one is up, so a restarted tunnel is ontun1(the restart check failed, and the after-update "no tunnel" check looked only attun0).Checked locally in
compot/android:2026.10:testDebugUnitTest lintDebug assembleDebug(13 lint warnings, as in the baseline),.github/check-version.sh,TRANSPORT=TCP tests/e2e.shAPI 21 and 34: 20/20 each.