mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-08-31 00:09:22 +00: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:
@@ -36,8 +36,7 @@ thread_local! {
|
||||
}
|
||||
|
||||
pub fn setup_panic_handler() {
|
||||
use std::backtrace;
|
||||
use std::io::Write;
|
||||
use std::{backtrace, io::Write};
|
||||
std::panic::set_hook(Box::new(|info| {
|
||||
let mut stderr = std::io::stderr();
|
||||
let sep = format!("{}\n", "=======".repeat(10));
|
||||
|
||||
Reference in New Issue
Block a user