mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-10-13 15:56:14 -08:00
refactor: listener/connector protocol abstraction (#2026)
* fix listener protocol detection * replace IpProtocol with IpNextHeaderProtocol * use an enum to gather all listener schemes * rename ListenerScheme to TunnelScheme; replace IpNextHeaderProtocols with socket2::Protocol * move TunnelScheme to tunnel * add IpScheme, simplify connector creation * format; fix some typos; remove check_scheme_...; * remove PROTO_PORT_OFFSET * rename WSTunnel.. -> WsTunnel.., DNSTunnel.. -> DnsTunnel..
This commit is contained in:
1 parent
9cc617ae4c
commit
e91a0da70a
18 files changed
+481
-526
No files matched your search
@@ -156,14 +156,14 @@ async fn init_three_node_ex_with_inst3<F: Fn(TomlConfigLoader) -> TomlConfigLoad
|
||||
#[cfg(feature = "websocket")]
|
||||
inst1
|
||||
.get_conn_manager()
|
||||
.add_connector(crate::tunnel::websocket::WSTunnelConnector::new(
|
||||
.add_connector(crate::tunnel::websocket::WsTunnelConnector::new(
|
||||
"ws://10.1.1.2:11011".parse().unwrap(),
|
||||
));
|
||||
} else if proto == "wss" {
|
||||
#[cfg(feature = "websocket")]
|
||||
inst1
|
||||
.get_conn_manager()
|
||||
.add_connector(crate::tunnel::websocket::WSTunnelConnector::new(
|
||||
.add_connector(crate::tunnel::websocket::WsTunnelConnector::new(
|
||||
"wss://10.1.1.2:11012".parse().unwrap(),
|
||||
));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user