Implement 端口映射 (port mapping) on the controlled side

Message field 27 PortMappingFrame {session_id, rule_id, stream_id, type,
payload} on FILE_DATA_CHANNEL: SYN {version, target_host, target_port} ->
TCP connect (10 s timeout) -> SYN_ACK {version, ok, error}; DATA both ways;
FIN closes; DATA_ACK ignored, matching the official PortMappingHandler.
Bounded write queue per stream, data-channel backpressure, all streams
closed with the peer. UU_PORT_MAPPING=0 disables it. Replaces the unused
port_forward.rs placeholder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
VallierDevandClaude Opus 5.5 committed 2026-10-15 07:43:25 +08:00
1 parent 5b248c24ec
commit fe991c4a7d
4 files changed
+284 -62

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ mod capture;
mod file_trans;
mod input;
mod input_mapping;
mod port_forward;
mod port_mapping;
mod power;
mod signaling;
mod terminal;