z2k/mtproxy-client/builds/tg-mtproxy-client-linux-arm64
Necronicle 109140124a fix(tunnel): start client read immediately, await socket.opened
Two bugs causing "Connecting..." hang:

1. tunnel.go: streamReadLoop was deferred until CONNECT_OK arrived,
   but client already sends TLS ClientHello before that. Data was
   lost → DC never responded → timeout. Fix: start readLoop
   immediately after sending CONNECT frame.

2. worker.js: connect() was called but socket.opened was not awaited
   before sending CONNECT_OK. Fix: await socket.opened, and fix
   Uint8Array buffer slicing for DATA relay.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 01:17:31 +03:00

7.4 MiB
Executable file