Implement server channel proxy: direct, SOCKS5, and HTTP CONNECT outbound connections

- Add channel_proxy.rs with connect_outbound() supporting Direct, Socks5, and HttpConnect proxy modes
- Implement proxy_channel() with bidirectional copy between SSH channel and outbound TCP
- Channel errors close individual channels without affecting SSH session (ADR-006)
- Remove destination logging from handler to comply with ADR-006
- Add ForwardError to error.rs (was missing, needed by forward.rs)
- Fix TcpListener type annotation in forward.rs
- Add 11 unit tests: direct, SOCKS5 handshake, HTTP CONNECT, proxy rejection, unreachable targets
This commit is contained in:
2026-06-02 11:24:32 +00:00
parent 992d478630
commit 49fe2b699f
5 changed files with 618 additions and 17 deletions

View File

@@ -1,3 +1,5 @@
pub mod channel_proxy;
pub mod handler;
pub use channel_proxy::{ChannelProxyError, connect_outbound, proxy_channel};
pub use handler::{ProxyConfig, ProxyMode, ServerHandler};