[Tunnel] Add octobot_tunnel package (as Piko client)#3437
Draft
[Tunnel] Add octobot_tunnel package (as Piko client)#3437
Conversation
7c51c77 to
610f11d
Compare
Full Python reimplementation of the Go piko/client SDK using asyncio and aiohttp, with yamux multiplexing over WebSocket. - yamux: frame encode/decode, client-side session (accept queue, flow control, ping/pong, GoAway), per-stream send window and EOF/RST - client: Upstream (listen, listen_and_forward, exponential-backoff reconnect), Listener (accept_with_context, auto-reconnect on session drop), Dialer, Forwarder (bidirectional copy with TCP half-close), Stream, Backoff, WebSocketTransport - Session disconnect now unblocks pending accept() callers via sentinel - Stream.read(n) returns any available bytes (matches net.Conn.Read), not exactly n bytes; WebSocketTransport gains a matching read() method - Cancelled tasks in accept_with_context are properly awaited - Listener.close() uses session.send_go_away() public API - 140 tests covering all components (TDD) https://claude.ai/code/session_01QjvZSQCamcHU9NR5MxMzN1
610f11d to
af22012
Compare
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.
Implements a full Python equivalent of the Go github.com/andydunstall/piko/client SDK:
stream with flow-control window management)
auto-reconnect with exponential backoff), Dialer (outbound TCP connections),
Forwarder (bidirectional bridge to local address), WebSocket transport wrapper
(aiohttp), Logger protocol, Backoff, typed exceptions