Commit graph

780 commits

Author SHA1 Message Date
umarfatmi05
29eb183861 Trust surviving tunnels, skip doomed cellular reconnects, log hold health
Field testing on device contradicted the assumption behind the interface-change
rebuild: connections established over LocalDevVPN's loopback SURVIVE a
Wi-Fi<->cellular handoff (an active location-sim session kept working across
the switch). Tearing the tunnel state down on interface change therefore
destroyed a working tunnel and, on cellular — where a fresh connect is refused
because nothing listens on port 49152 without a local network interface —
replaced it with a failure. Keep connected tunnels alone.

For the same reason, skip the automatic reconnect cycle when the path is
cellular-only: three retries with backoff that are refused every time, on
every path flap, forever. Manual attempts still go through start() directly.

Also count resend results in LocationSimulationKeepAlive and log transitions —
first failure, recovery, and a heartbeat every ~5 minutes while failing — so
the Logs tab shows whether a held location is actually being applied instead
of failing silently. Counter resets on hold/release so stale counts can't
fake a recovery message.

Not verified on device.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 19:13:29 -04:00
umarfatmi05
ef78da3c05 Make a held location survive interface changes and app restarts
Three fixes aimed at a simulation that stays up without manual intervention.

NetworkPathMonitor: ignore the utun (.other) interface when reporting which
interface is in use. LocalDevVPN is always present and always in use, so it
masked the real path — every state looked like "Other", a Wi-Fi<->cellular
handoff produced an identical signature, and no change was ever broadcast.

TunnelManager: stop trusting isConnected. It only records that the last
connect succeeded, and nothing in the app notices a tunnel that dies quietly,
which is precisely what a handoff causes — so the reconnect was skipped in the
exact case it existed for. Now a genuine interface change rebuilds the tunnel
regardless. startTunnel() is semaphore-guarded and recreates its adapter, so
reconnecting a live tunnel is safe.

LocationSimulationKeepAlive: persist the held coordinate and re-arm it on
launch. iOS gives sideloaded apps no way to start themselves, so a reboot or a
kill will always drop the simulation; restoring on launch means reconnecting
the VPN and opening the app is enough to get it back, with no need to re-pick
the location. Armed before the VPN is up is fine — the resend loop tolerates
failure and takes hold once the tunnel exists. Skipped when no pairing file
exists, since nothing could succeed and it would only burn battery.

Not verified on device.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 19:05:21 -04:00
umarfatmi05
91c16dd126 Keep a simulated location alive outside the map screen
The simulated location only held while the map screen was visible and the app
was foregrounded. The resend loop was a main-runloop Timer in the view's
@State, and .onDisappear tore it down along with the background assertion — so
switching tabs, locking the phone, or ~30s of background each stopped the
resends, let the simulation connection die, and snapped the device back to its
real location.

- Add LocationSimulationKeepAlive, which owns the held coordinate, resends it
  from a dispatch timer instead of the main runloop, takes forced audio and
  location holds (so it works with the user's keep-alive toggles off), and
  renews its background assertion rather than letting it expire.
- MapSelectionView delegates the resend loop to the service, and .onDisappear
  no longer stops the simulation — only an explicit Clear releases it. On
  reappear the view re-adopts the held coordinate so the UI is not misleading.
- MainTabView's URL-scheme path holds on simulate, and releases *before*
  clearing so a queued resend cannot re-apply a location just cleared.

This is the part of the reliability problem the PR never addressed: its
network-path work only governs the JIT/debug tunnel, while location simulation
runs over its own separate rp_pairing connection.

Not verified on device — the background-suspension behaviour needs testing on
real hardware.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 19:05:21 -04:00
umarfatmi05
de3f34292f CI: build this branch, and stop pinning a disappearing Xcode
Build the cellular work on GitHub's macOS runners so it can be compiled and
packaged without a local Mac.

- Trigger the IPA build on the working branches, not just main.
- Use latest-stable instead of a pinned Xcode. The pin (26.0.1) predates the
  PR, which had itself bumped to 26.6.0; pinned versions get dropped from the
  runner images and fail the build for reasons unrelated to the code.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 19:05:20 -04:00
umarfatmi05
5ba55e7bb8 Keep the app unsuspended during a debug session so reconnect can run
The tunnel reconnect in the previous commit only fires while StikDebug is
actually executing. In the real handoff scenario the user has switched to the
JIT-enabled app, so StikDebug is backgrounded — and upstream lets iOS suspend
it, which means the path-change notification is never delivered and the
tunnel stays dropped.

Two upstream behaviours cause that suspension:
- Keep-alive only ran if the user had the "Silent Audio"/"Background Location"
  toggles on. DebugKeepAliveLease now takes forced holds (force: true) that
  bypass those toggles for the duration of a debug session, released when the
  session ends. Both managers keep separate forced/unforced counters.
- The background-task expiration handler called invalidate(), tearing down
  audio and location the moment the ~30s assertion elapsed. It now renews the
  assertion (re-checking isActive) while silent audio sustains execution.

Also play an inaudible non-zero signal (~-80 dBFS, DC-free) instead of digital
silence, which some iOS versions treat as idle and reclaim. SettingsView calls
refreshFromSettings() rather than stop(), so toggling the setting off no longer
kills a forced session hold.

This is the minimal slice of the PR's keep-alive work that the cellular
reconnect depends on. Drop this commit for a foreground-only cellular fix.

Ported from StephenDev0/StikDebug#432 commit 656ec6d (keep-alive slice).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 19:04:55 -04:00
umarfatmi05
6c167f660c Support cellular: monitor network path and reconnect the tunnel
StikDebug assumed Wi-Fi even though the tunnel rides LocalDevVPN and works
equally well on cellular. On a Wi-Fi<->cellular handoff the loopback tunnel
dropped silently and the JIT/debug session died with no recovery.

- Add NetworkPathMonitor (NWPathMonitor) reporting reachability, interface
  type (Wi-Fi/cellular/VPN) and expensiveness, posting .networkPathDidChange
  on real transitions (deduplicated by signature).
- TunnelManager retries connect 3x with 1s/2s backoff so transient cellular
  failures recover, short-circuiting on permanent, user-actionable errors
  (missing/invalid pairing -9/-17, bad target IP -18).
- TunnelManager reconnects on a debounced (1.5s) path change when the tunnel
  is down, instead of staying dropped.
- Drop the false "Wi-Fi required" wording from connection alerts and README.

Ported from StephenDev0/StikDebug#432 commit 656ec6d (cellular slice only).
The keep-alive half of that commit follows as a separate commit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 19:04:55 -04:00
CelloSerenity
8f0439cd0c
Update AutoScriptAssignments.swift 2026-08-26 22:05:53 -06:00
CelloSerenity
460fb235c2
Fix uncomfortable blue line 2026-08-25 16:32:41 -06:00
Stephen
f5d31fe2b7 Bump version to 3.1.10 2026-08-25 12:42:58 -04:00
Stephen
70d31322e7 Fix DDI mount watchdog crash (hopefully) 2026-08-25 11:08:54 -04:00
CelloSerenity
66e359c7e2
Update README.md 2026-08-19 16:09:45 -06:00
CelloSerenity
ae460a7a5d
Fix extra line 2026-08-07 15:07:15 -06:00
CelloSerenity
8fdfb193e0
Fix image links in README.md 2026-08-07 15:00:40 -06:00
CelloSerenity
2354795117
Update AutoScriptAssignments.swift 2026-08-05 16:15:47 -06:00
CelloSerenity
a8a4892a8c fix: target Website source workflow 2026-08-03 18:16:14 -06:00
CelloSerenity
cf4108fc2c ci: update website source workflow 2026-08-03 18:13:31 -06:00
30cfa58785
Update download links and images in README.md 2026-08-03 14:27:51 -04:00
15d99027c0
Update GitHub URLs in SettingsView.swift 2026-08-03 12:44:37 -04:00
38c0ca1348
Update links to reflect new GitHub repository 2026-08-03 12:34:07 -04:00
e160c9e90a
Update AutoScriptAssignments.swift 2026-08-03 11:58:19 -04:00
CelloSerenity
f928790e7d
Update AutoScriptAssignments.swift 2026-08-01 16:53:07 -06:00
CelloSerenity
30a147aaaf ci: wait for tagged IPA builds 2026-08-01 14:28:22 -06:00
CelloSerenity
c7e08e64fd
Upgrade action-gh-release to version 3 2026-08-01 14:13:29 -06:00
CelloSerenity
85fb1350a4
3.1.9 2026-08-01 14:08:49 -06:00
CelloSerenity
ff030b809a Shorten IPA artifact SHA 2026-08-01 09:45:44 -06:00
CelloSerenity
22e34051ff Publish IPA releases from tags 2026-08-01 09:36:22 -06:00
CelloSerenity
ea42d847d1 Sync pairing files from Documents 2026-08-01 08:41:16 -06:00
CelloSerenity
49b7c7aef4 Update Website-Stuff source on release 2026-07-31 20:40:19 -06:00
CelloSerenity
809e7a82af
Update project.pbxproj 2026-07-31 13:23:00 -06:00
CelloSerenity
ff57409541
Merge branch 'StephenDev0:main' into main 2026-07-31 08:36:00 -06:00
CelloSerenity
dce4c2edfd Bounce back before script execution 2026-07-31 08:27:31 -06:00
CelloSerenity
60accbe1d1 Reuse open remote server for JIT bounce-back to avoid cold-launch race 2026-07-31 08:27:31 -06:00
CelloSerenity
83da8aad29 Make pairing file import atomic 2026-07-31 08:27:16 -06:00
858921019d
Add 'TachyonU' to the list of script assignments 2026-07-31 07:57:13 -04:00
CelloSerenity
c1189928d4 Fix JIT race on cold URL-scheme launch 2026-07-26 00:34:07 -06:00
CelloSerenity
03b7c109ac Rename UTM-Dolphin.js to legacy.js and drop screenshot demos 2026-07-25 18:21:34 -06:00
CelloSerenity
2047bcbe85
3.1.7 2026-07-25 18:15:54 -06:00
CelloSerenity
8b63ec2840 Update build_ipa.yml 2026-07-25 13:17:30 -06:00
CelloSerenity
5e0e48d4e6 Return to the target app after attaching for JIT 2026-07-25 13:17:25 -06:00
Stephen
c5b23e2282 Fix my mistake 2026-06-18 13:27:49 -04:00
CelloSerenity
1bb753086f
Update readme 2026-06-16 22:12:39 -06:00
CelloSerenity
7f2808bfb5
3.1.6 2026-06-16 21:53:53 -06:00
CelloSerenity
ef5e962b38
Merge pull request #416 from CelloSerenity/main
Fix TXM detection on iOS 27
2026-06-16 21:28:09 -06:00
Stephen
c504ef3ef5 Add a toggle 2026-06-02 07:50:20 -04:00
ca2df1efd2
Update README.md 2026-06-01 07:32:57 -04:00
Stephen
754fba0291 3.1.5 2026-06-01 07:29:22 -04:00
848ddbbfa4
Update README.md 2026-05-31 21:12:34 -04:00
Stephen
b4caf9dd8e Clean up app 2026-05-31 21:02:17 -04:00
Stephen
57ede80dad Merge branch 'main' of https://github.com/StephenDev0/StikDebug 2026-05-31 20:53:40 -04:00
Stephen
ec278d6963 Fix an issue with the script sheet 2026-05-31 20:53:38 -04:00