Skip to content

fix(terminal): authenticate mobile WebSockets with JWT subprotocol - #77

Merged
LukeGus merged 2 commits into
Termix-SSH:dev-1.5.1from
ZacharyZcR:fix/support-1334-websocket-auth
Sep 30, 2026
Merged

LukeGus merged 2 commits into
Termix-SSH:dev-1.5.1from
ZacharyZcR:fix/support-1334-websocket-auth

Conversation

@ZacharyZcR

@ZacharyZcR ZacharyZcR commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

SSH terminals on Mobile 1.5.0 keep reconnecting against Termix 2.8 because they send the JWT only in ?token=, which the server's WebSocket token extractor no longer accepts.

Send the existing JWT in the termix.jwt.* WebSocket subprotocol from both NativeWebSocketManager and the shared terminal socket factory. Retain the protocol list for automatic reconnects. The existing URL token remains for compatibility with older servers such as 2.7.1.

Fixes Termix-SSH/Support#1334

Validation:

  • Six regression tests pass, covering first connection, automatic reconnect, the shared factory, and missing/blank credentials. The first three failed before the fix. Added the check to CI without adding dependencies.
  • Real loopback WebSocket handshakes using the exact token extractor from the server's release-2.8.0-tag: query-only control is rejected with 1008, the new client is accepted; the 2.7 query-token path remains accepted.
  • TypeScript and lint pass (existing lint warnings remain), formatting and Expo public-config validation pass.

Includes the independent formatting baseline commit from #76 so the existing bundled Guacamole asset parsing failure does not block this PR's CI.

No physical iPhone/iPad SSH session or app-store build was exercised. This fixes the 2.8 authentication regression; migration to the separate 2.9 plugin WebSocket routes is outside this change. Mobile upstream currently has no dev branch, so the PR targets main.

Full CI passed for head df6b5f3c97517667ad0eaf433a588fd72465008c, including formatting, lint, TypeScript, terminal WebSocket auth regressions and Expo config validation. CI run.

@LukeGus
LukeGus changed the base branch from main to dev-1.5.1 September 30, 2026 23:43
@LukeGus
LukeGus merged commit a68f589 into Termix-SSH:dev-1.5.1 Sep 30, 2026
2 checks passed
LukeGus added a commit that referenced this pull request Oct 1, 2026
* fix: restore format checks for bundled guacamole assets (#76)

* fix: respect configured rdp resolution on mobile (#75)

* fix: send terminal jwt as websocket subprotocol (#77)

* fix: fit vnc framebuffer and keep touch coords in sync (#74)

* chore: increment ver

* feat: support the 2.9 plugin api alongside older servers

* fix: handle totp and browser sign-in replies for files and docker

* fix: host form keeps fields it does not edit

* fix: raise pod deployment targets so ios builds on newer xcode

* fix: pass target triple to app intents metadata step for xcode 27

* chore: rename ipados build to ios and drop duplicate workflow

* fix: restore ios dev ota workflow and move unsigned build to build-ios.yml

* fix: add touch text selection and copy bar to terminal

* fix: add selection handles and stop text jumping while selecting

---------

Co-authored-by: ZacharyZcR <zacharyzcr1984@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Mobile terminal stuck on "reconnecting" after upgrading to 2.8.0

2 participants