Skip to content

Fix SOCKS proxy follow-ups for dialogs, persistent sessions and errors - #337

Merged
bifrost0x merged 3 commits into
mainfrom
fix/socks-proxy-route-followups
Nov 14, 2026
Merged

bifrost0x merged 3 commits into
mainfrom
fix/socks-proxy-route-followups

Conversation

@bifrost0x

Copy link
Copy Markdown
Owner

Follow-up to #336.

Changes

Connection dialog

  • "Manage SOCKS5 proxies" opened the proxy view behind the still open connection dialog, so the click appeared to do nothing and focus was lost. Opening any connection resource now leaves the dialog first; this also covers the "Review SOCKS5 proxy" action in SSH errors.
  • The button label is a short action instead of a hint sentence (all locales).
  • Reconnect and history set routes in code without updating the route controls. Applying a jump route now clears and locks the SOCKS selector, and vice versa.
  • A rejected proxy save showed the server error twice.

Persistent sessions

  • Reattaching a persistent tmux session requires its original proxy. Deleting that proxy left the session permanently unresumable. Deletion is now refused while a persistent session of the same user references the proxy; the error names up to 20 sessions.
  • The reattach mismatch message now says what to do. The route rule itself is unchanged: a session is only resumed over its original route.

Server

  • list_socks_proxies no longer consumes the connection mutation budget (same as list_jump_hosts). A throttled list made every routed host show "SOCKS5 proxy missing".
  • A proxy endpoint blocked by network policy is reported as SOCKS5 proxy: …, distinguishable from a blocked target.
  • SOCKS failure replies are evaluated before reading the bound address. Proxies that close after a short failure reply now report the actual reason instead of a protocol error or timeout. The socket is closed on every failure, as before.

Docs

  • Downgrading to a release without SOCKS support connects routed hosts directly. Saved passwords stay unusable through their route binding, but SSH keys and passwords entered at connect time would bypass the proxy. The storage docs now describe this and how to downgrade safely.
  • Proxy deletion rules include persistent sessions.

Security notes

No change to routing, DNS policy, credential binding or fail-closed behaviour. The deletion check only adds a refusal. A session created concurrently with a deletion ends in the same fail-closed state as before.

Tests

  • New Python tests for the deletion guard (persistent vs. ordinary vs. foreign sessions), the unthrottled list, proxy vs. target policy errors and truncated failure replies.
  • New JS tests for the single save error and session usage messages.
  • New Playwright tests for the dialog handoff and programmatic route switching.
  • All new tests fail against main.
  • Locally: full pytest suite, JS unit tests, ESLint, and the 35 Playwright specs that touch the connection dialog, resource views and routes (349 tests).

A persistent tmux session can only be resumed over the proxy it was opened
through, so deleting that proxy is refused while such a session exists.
Listing proxies no longer consumes the connection mutation budget, which
could make every routed host appear to have a missing proxy.

A blocked proxy endpoint is now reported as a proxy failure, and failure
replies are evaluated before the bound address so truncated replies keep
their reason.
The manage button opened the proxy view behind the still open connection
dialog. Opening any connection resource now leaves the dialog first.

Routes applied by reconnect or history now clear and lock the other route
selector, a rejected save reports its error once, and deletion blocked by
persistent sessions names them.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T14:40:53.746918Z 0052472 PR opened
🔒 Security Review ✅ Completed 2026-11-14T14:43:31.469658Z 0052472 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@bifrost0x
bifrost0x merged commit b7b1ff5 into main Nov 14, 2026
34 checks passed
@bifrost0x
bifrost0x deleted the fix/socks-proxy-route-followups branch November 14, 2026 14:49
@github-project-automation github-project-automation Bot moved this from Backlog to Done in WebSSH Roadmap Nov 14, 2026
@bifrost0x bifrost0x added this to the v3.1.0 milestone Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant