sirang/local/mod.rs
1use crate::common::TunnelType;
2use config::LocalConfig;
3
4pub mod config;
5mod forward;
6mod reverse;
7
8pub async fn start_local(
9    config: LocalConfig,
10) -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> {
11    return match config.tunnel_type {
12        TunnelType::Forward => forward::forward_local(config).await,
13        TunnelType::Reverse => reverse::reverse_local(config).await,
14    };
15}