Add the C++ TCP relay engine and run ss-tunnel on it

One engine (src/relay/tcp) for the four TCP relays: connections live in a
fixed pool owned through PoolPtr, handshake, cipher state and buffers are
inline, timeouts are intrusive deadline lists on one timer and DNS answers
come back through generation-checked handles. A full pool refuses new
connections and pauses accepting until a slot frees.

ss-tunnel is the first user; its hand-written relay callbacks are gone.
tests/tunnel_interop.py covers every method against ss-server and
shadowsocks-rust.
This commit is contained in:
Max Lv
2026-10-14 22:53:09 +08:00
parent 78ca0af745
commit 892b45d1e5
17 changed files with 2391 additions and 857 deletions
+1 -1
View File
@@ -19,6 +19,6 @@ src/server.cpp 17
src/ss_event.cpp 5
src/ssurl.cpp 3
src/stream.cpp 3
src/tunnel.cpp 14
src/tunnel.cpp 2
src/udprelay.cpp 7
src/utils.cpp 10