feat(ssh): add pane-scoped local port forwarding - #280
Open
WilliamWang1721 wants to merge 9 commits into
Open
WilliamWang1721 wants to merge 9 commits into
WilliamWang1721 wants to merge 9 commits into
Conversation
WilliamWang1721
force-pushed
the
feature/ssh-port-forward-253
branch
from
September 24, 2026 07:49
80d9ff6 to
e44b905
Compare
github-actions Bot
added a commit
to WilliamWang1721/pebrel
that referenced
this pull request
Sep 25, 2026
github-actions Bot
added a commit
to WilliamWang1721/pebrel
that referenced
this pull request
Sep 25, 2026
github-actions Bot
added a commit
to WilliamWang1721/pebrel
that referenced
this pull request
Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #253
Result
Add lightweight local port forwarding to native SSH panes.
Once an SSH session is ready, the focused pane exposes a Ports control where users can:
127.0.0.1portThis implements the core workflow requested in #253 without introducing a separate SSH implementation or a larger VS Code-style Ports subsystem.
Implementation
The forwarding path reuses Pebrel's existing SSH stack:
SharedSessionauthenticated_session()channel_open_direct_tcpip()Each forward is owned directly by its
TerminalView. Closing or failing the SSH pane therefore releases its listener and active forwarding tasks naturally with the pane lifecycle.Local forwarding is intentionally limited to:
127.0.0.1:<local port> -> SSH server 127.0.0.1:<remote port>No extra SSH process or second authentication path is created.
Scope
This PR deliberately does not add:
-R)-D)Those can be considered separately if there is demand.
Size
The final feature diff is approximately:
The small deletion mostly comes from sharing the existing SSH-runtime bridge that was previously local to Remote Files.
Validation
The implementation was validated using Pebrel's existing native test workflow:
Validation run:
https://github.com/WilliamWang1721/pebrel/actions/runs/35962262104
UI Review Screenshots
Current-head evidence for
4399916e115b7d0d42d9d23dcd31b864ba095de0. UI review workflow runWindows — success
Raw evidence: Windows originals
macOS — success
Raw evidence: macOS originals