Add forward session support - #6
Open
vaurdan wants to merge 5 commits into
Open
Conversation
vaurdan
force-pushed
the
feature/forward-and-ssh-agent
branch
from
January 29, 2026 09:53
bca8415 to
aaab23c
Compare
- Add ForwardSession for multiplexed socket/port forwarding via WebSocket with ForwardInfo/Forwards() for inspecting active forwards - Fix race condition: start readLoop after forward init completes - Add SSH agent stream type (0x05) with bidirectional message handling - Add WriteSSHAgent and WriteText methods to Cmd - Add UpgradeURL field to APIError
When a TCP relay is active inside the sprite container, the server returns the listen address (e.g., "localhost:25002") so clients can display the transparent TCP endpoint instead of the Unix socket path.
Close() was holding fs.mu while closing channel connections. When a connection is closed, the channel's readLoop() exits and calls ch.close() which also tries to acquire fs.mu, causing a deadlock. Fix by collecting channels while holding the lock, then closing connections after releasing the lock.
vaurdan
force-pushed
the
feature/forward-and-ssh-agent
branch
from
January 29, 2026 11:51
412a978 to
48e6b7b
Compare
- Add preflight check to verify sprite is accessible before starting listener - Use TCP RST instead of clean close on proxy errors for faster failure detection - Add user-friendly warning messages with timestamps for connection failures - Add debug logging throughout proxy connection flow - Track fatal errors (401, 403, 404) and close session on fatal errors
Collaborator
|
@vaurdan Things have drifted pretty significantly since this work was done. Is this reverse forwarding something we still need or want? |
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.
Summary