feat: add native dual-stack IPv4/IPv6 support
This commit implements comprehensive dual-stack support for the proxy, allowing it to listen on both IPv4 and IPv6 addresses simultaneously. Key changes: - Added new dual_stack.rs module with DualStackTcpListener implementation - Updated SSH module to use dual-stack listener - Updated configuration documentation to reflect IPv6 support - Added comprehensive tests for dual-stack functionality The implementation is inspired by tokio_dual_stack but implemented natively without external dependencies. It provides fair connection distribution between IPv4 and IPv6 clients while maintaining full backward compatibility with existing IPv4-only configurations. Signed-off-by: Sienna Meridian Satterwhite <sienna@sunbeam.pt>
This commit is contained in:
@@ -4,7 +4,7 @@ use std::fs;
|
||||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct SshConfig {
|
||||
/// Address to bind the SSH listener on, e.g. "0.0.0.0:22".
|
||||
/// Address to bind the SSH listener on, e.g. "0.0.0.0:22" or "[::]:22".
|
||||
pub listen: String,
|
||||
/// Upstream backend address, e.g. "gitea-ssh.devtools.svc.cluster.local:2222".
|
||||
pub backend: String,
|
||||
@@ -22,7 +22,9 @@ pub struct Config {
|
||||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct ListenConfig {
|
||||
/// HTTP listener address, e.g., "0.0.0.0:80" or "[::]:80".
|
||||
pub http: String,
|
||||
/// HTTPS listener address, e.g., "0.0.0.0:443" or "[::]:443".
|
||||
pub https: String,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user