Skip to content

feat(connect): add --tunnel-only for external GUI clients#1018

Merged
paulocsanz merged 1 commit into
masterfrom
pcs/connect-tunnel-only
Jul 17, 2026
Merged

feat(connect): add --tunnel-only for external GUI clients#1018
paulocsanz merged 1 commit into
masterfrom
pcs/connect-tunnel-only

Conversation

@paulocsanz

Copy link
Copy Markdown
Collaborator

Summary

  • railway connect already opens a local SSH tunnel to the database when there's no public proxy (feat(connect): tunnel to private databases over SSH #955), but it immediately launches psql/mongosh/etc against it and tears the tunnel down when the client exits — there was no way to just hold the tunnel open for an external GUI client.
  • Adds --tunnel-only: opens the same tunnel, skips launching a database client, prints host/port/user/password/database (what TablePlus, DBeaver, pgAdmin, etc. expect) plus the full URL, and holds the tunnel open until Ctrl+C.
  • Implies --ssh; conflicts with --no-ssh.

Test plan

  • cargo build
  • cargo test (connect.rs suite, 9/9 passing)
  • cargo fmt --check
  • railway connect --help shows the new flag and example
  • railway connect postgres --tunnel-only --no-ssh correctly rejected as conflicting args
  • Manual end-to-end tunnel + TablePlus connection against a live private-only database

Opens the same SSH tunnel `connect` already uses for psql/mongosh/etc,
but skips launching a client and instead prints host/port/user/pass
and holds the tunnel open until Ctrl+C — for pointing TablePlus,
DBeaver, pgAdmin, or similar at a private-only database.
@paulocsanz paulocsanz added the release/minor Author minor release label Jul 17, 2026
@paulocsanz
paulocsanz merged commit 8430fda into master Jul 17, 2026
6 of 7 checks passed
@paulocsanz
paulocsanz deleted the pcs/connect-tunnel-only branch July 17, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/minor Author minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants