feat: Add Go SDK host support with V1/V2 relay protocol#611
Draft
avanderhoorn wants to merge 1 commit intomicrosoft:mainfrom
Draft
feat: Add Go SDK host support with V1/V2 relay protocol#611avanderhoorn wants to merge 1 commit intomicrosoft:mainfrom
avanderhoorn wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Implement full tunnel host capability for the Go SDK, enabling Go programs to act as tunnel hosts: register endpoints, connect to the relay over WebSocket, accept client connections via SSH, and forward traffic to local TCP ports. Key features: - V2 relay protocol with direct port forwarding (no nested SSH) - V1 protocol support with automatic fallback - Reconnection with exponential backoff - Automatic access token refresh - Connection status callbacks - Dynamic port management (AddPort, RemovePort, RefreshPorts) - Concurrent client support - Comprehensive unit and E2E test coverage Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Add full tunnel host capability to the Go SDK, enabling Go programs to act as tunnel hosts.
Key features
Files added/modified
go/tunnels/host.go— Host struct and connect/close/wait lifecyclego/tunnels/host_reconnect.go— Reconnection with backoff and token refreshgo/tunnels/connection_status.go— ConnectionStatus enumgo/tunnels/tunnel_error.go— Typed error with HTTP status codesgo/tunnels/ssh/host_session.go— Dual V1/V2 SSH session handlinggo/tunnels/ssh/messages/— V2 wire format messages