tobaru 0.4.0

Port forwarding CLI utility written in Rust with allowlists, TLS, iptables support, round-robin forwarding (load balancing), and IP-to-destination mapping.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[cfg(all(feature = "tls-native", feature = "tls-rustls"))]
compile_error!("only one of tls-native or tls-rustls can be enabled.");

#[cfg(feature = "tls-native")]
mod native_tls;

#[cfg(feature = "tls-rustls")]
mod rustls;

#[cfg(feature = "tls-native")]
pub fn create_tls_factory() -> native_tls::NativeTlsFactory {
    native_tls::NativeTlsFactory::new()
}

#[cfg(feature = "tls-rustls")]
pub fn create_tls_factory() -> rustls::RustlsFactory {
    rustls::RustlsFactory::new()
}