From e5398c45a3a9660f327ea502c4a5aeb94c888c56 Mon Sep 17 00:00:00 2001 From: XOR-op <17672363+XOR-op@users.noreply.github.com> Date: Sat, 25 Mar 2023 16:57:06 +0800 Subject: [PATCH] rename: mitm -> eavesdrop --- boltadm/src/main.rs | 12 ++--- boltadm/src/request.rs | 18 ++++---- boltapi/src/schema.rs | 10 ++-- boltconn/src/config/config.rs | 4 +- .../eavesdrop_modifier.rs} | 10 ++-- .../src/{mitm => eavesdrop}/header_rewrite.rs | 2 +- .../http_eavesdrop.rs} | 8 ++-- .../https_eavesdrop.rs} | 8 ++-- boltconn/src/{mitm => eavesdrop}/mod.rs | 12 ++--- boltconn/src/{mitm => eavesdrop}/modifier.rs | 0 .../src/{mitm => eavesdrop}/url_rewrite.rs | 2 +- boltconn/src/external/api_server.rs | 23 +++++----- boltconn/src/main.rs | 46 ++++++------------- boltconn/src/proxy/dispatcher.rs | 22 ++++----- 14 files changed, 82 insertions(+), 95 deletions(-) rename boltconn/src/{mitm/mitm_modifier.rs => eavesdrop/eavesdrop_modifier.rs} (96%) rename boltconn/src/{mitm => eavesdrop}/header_rewrite.rs (99%) rename boltconn/src/{mitm/http_mitm.rs => eavesdrop/http_eavesdrop.rs} (94%) rename boltconn/src/{mitm/https_mitm.rs => eavesdrop/https_eavesdrop.rs} (96%) rename boltconn/src/{mitm => eavesdrop}/mod.rs (95%) rename boltconn/src/{mitm => eavesdrop}/modifier.rs (100%) rename boltconn/src/{mitm => eavesdrop}/url_rewrite.rs (99%) diff --git a/boltadm/src/main.rs b/boltadm/src/main.rs index 967e2a1..a348221 100644 --- a/boltadm/src/main.rs +++ b/boltadm/src/main.rs @@ -55,7 +55,7 @@ struct CertOptions { } #[derive(Debug, StructOpt)] -enum MitmOptions { +enum EavesdropOptions { /// List all captured data List, /// List data ranged from *start* to *end* @@ -77,7 +77,7 @@ enum SubCommand { /// Generate Certificates Cert(CertOptions), /// Captured HTTP data - Mitm(MitmOptions), + Eavesdrop(EavesdropOptions), /// Clean unexpected shutdown Clean, /// Reload Configuration @@ -128,10 +128,10 @@ async fn main() { Err(e) => Err(e), } } - SubCommand::Mitm(opt) => match opt { - MitmOptions::List => requestor.get_mitm(None).await, - MitmOptions::Range { start, end } => requestor.get_mitm(Some((start, end))).await, - MitmOptions::Get { id } => requestor.get_mitm_payload(id).await, + SubCommand::Eavesdrop(opt) => match opt { + EavesdropOptions::List => requestor.eavesdrop(None).await, + EavesdropOptions::Range { start, end } => requestor.eavesdrop(Some((start, end))).await, + EavesdropOptions::Get { id } => requestor.get_eavesdrop_payload(id).await, }, SubCommand::Clean => { if !is_root() { diff --git a/boltadm/src/request.rs b/boltadm/src/request.rs index 9ca85f9..32f3cea 100644 --- a/boltadm/src/request.rs +++ b/boltadm/src/request.rs @@ -119,14 +119,16 @@ impl Requester { Ok(()) } - pub async fn get_mitm(&self, range: Option<(u32, Option)>) -> Result<()> { + pub async fn eavesdrop(&self, range: Option<(u32, Option)>) -> Result<()> { let uri = match range { - None => self.route("/mitm/all"), - Some((s, Some(e))) => self.route(format!("/mitm/range?start={}&end={}", s, e).as_str()), - Some((s, None)) => self.route(format!("/mitm/range?start={}", s).as_str()), + None => self.route("/eavesdrop/all"), + Some((s, Some(e))) => { + self.route(format!("/eavesdrop/range?start={}&end={}", s, e).as_str()) + } + Some((s, None)) => self.route(format!("/eavesdrop/range?start={}", s).as_str()), }; let data = reqwest::get(uri).await?.text().await?; - let result: Vec = serde_json::from_str(data.as_str())?; + let result: Vec = serde_json::from_str(data.as_str())?; let mut table = Table::new("{:<} {:<} {:<} {:<} {:<} {:<}"); table.add_row( Row::new() @@ -152,12 +154,12 @@ impl Requester { Ok(()) } - pub async fn get_mitm_payload(&self, id: u32) -> Result<()> { - let data = reqwest::get(self.route(format!("/mitm/payload/{}", id).as_str())) + pub async fn get_eavesdrop_payload(&self, id: u32) -> Result<()> { + let data = reqwest::get(self.route(format!("/eavesdrop/payload/{}", id).as_str())) .await? .text() .await?; - let result: boltapi::GetMitmDataResp = serde_json::from_str(data.as_str())?; + let result: boltapi::GetEavesdropDataResp = serde_json::from_str(data.as_str())?; println!("================== Request ==================="); println!("Header:"); result.req_header.iter().for_each(|l| println!("{}", l)); diff --git a/boltapi/src/schema.rs b/boltapi/src/schema.rs index 03cd3b3..2ff735c 100644 --- a/boltapi/src/schema.rs +++ b/boltapi/src/schema.rs @@ -25,8 +25,8 @@ pub struct SessionSchema { #[derive(Serialize, Deserialize, Debug, Clone)] #[serde(deny_unknown_fields)] -pub struct HttpMitmSchema { - pub mitm_id: u64, +pub struct HttpEavesdropSchema { + pub eavesdrop_id: u64, pub client: Option, pub uri: String, pub method: String, @@ -58,20 +58,20 @@ pub struct SetGroupReqSchema { #[derive(Serialize, Deserialize, Debug, Clone)] #[serde(deny_unknown_fields)] -pub struct GetMitmRangeReq { +pub struct GetEavesdropRangeReq { pub start: u32, pub end: Option, } #[derive(Serialize, Deserialize, Debug, Clone)] #[serde(deny_unknown_fields)] -pub struct GetMitmDataReq { +pub struct GetEavesdropDataReq { pub id: u32, } #[derive(Serialize, Deserialize, Debug, Clone)] #[serde(deny_unknown_fields)] -pub struct GetMitmDataResp { +pub struct GetEavesdropDataResp { pub req_header: Vec, #[serde(with = "base64ext")] pub req_body: Vec, diff --git a/boltconn/src/config/config.rs b/boltconn/src/config/config.rs index c83d080..1f794ad 100644 --- a/boltconn/src/config/config.rs +++ b/boltconn/src/config/config.rs @@ -28,8 +28,8 @@ pub struct RawRootCfg { pub rule_local: Vec, #[serde(alias = "rule-provider", default = "default_rule_provider")] pub rule_provider: HashMap, - #[serde(alias = "mitm-rule")] - pub mitm_rule: Option>, + #[serde(alias = "eavesdrop-rule")] + pub eavesdrop_rule: Option>, #[serde(alias = "rewrite-rule")] pub rewrite: Option>, } diff --git a/boltconn/src/mitm/mitm_modifier.rs b/boltconn/src/eavesdrop/eavesdrop_modifier.rs similarity index 96% rename from boltconn/src/mitm/mitm_modifier.rs rename to boltconn/src/eavesdrop/eavesdrop_modifier.rs index 4c0f0c4..0e618d9 100644 --- a/boltconn/src/mitm/mitm_modifier.rs +++ b/boltconn/src/eavesdrop/eavesdrop_modifier.rs @@ -1,5 +1,5 @@ -use crate::mitm::url_rewrite::{UrlModManager, UrlModType}; -use crate::mitm::{HeaderModManager, Modifier, ModifierContext}; +use crate::eavesdrop::url_rewrite::{UrlModManager, UrlModType}; +use crate::eavesdrop::{HeaderModManager, Modifier, ModifierContext}; use crate::platform::process::ProcessInfo; use crate::proxy::{DumpedRequest, DumpedResponse, HttpCapturer, NetworkAddr}; use anyhow::anyhow; @@ -11,7 +11,7 @@ use std::str::FromStr; use std::sync::Arc; use std::time::Instant; -pub struct MitmModifier { +pub struct EavesdropModifier { client: Option, contents: Arc, url_rewriter: Arc, @@ -19,7 +19,7 @@ pub struct MitmModifier { pending: DashMap, } -impl MitmModifier { +impl EavesdropModifier { pub fn new( contents: Arc, url_rewriter: Arc, @@ -37,7 +37,7 @@ impl MitmModifier { } #[async_trait] -impl Modifier for MitmModifier { +impl Modifier for EavesdropModifier { async fn modify_request( &self, req: Request, diff --git a/boltconn/src/mitm/header_rewrite.rs b/boltconn/src/eavesdrop/header_rewrite.rs similarity index 99% rename from boltconn/src/mitm/header_rewrite.rs rename to boltconn/src/eavesdrop/header_rewrite.rs index b930a9a..4046cba 100644 --- a/boltconn/src/mitm/header_rewrite.rs +++ b/boltconn/src/eavesdrop/header_rewrite.rs @@ -1,4 +1,4 @@ -use crate::mitm::Replacement; +use crate::eavesdrop::Replacement; use http::header::HeaderName; use http::{HeaderMap, HeaderValue}; use regex::{Regex, RegexSet}; diff --git a/boltconn/src/mitm/http_mitm.rs b/boltconn/src/eavesdrop/http_eavesdrop.rs similarity index 94% rename from boltconn/src/mitm/http_mitm.rs rename to boltconn/src/eavesdrop/http_eavesdrop.rs index 27527bb..0d0d56b 100644 --- a/boltconn/src/mitm/http_mitm.rs +++ b/boltconn/src/eavesdrop/http_eavesdrop.rs @@ -1,8 +1,8 @@ use crate::adapter::{Connector, TcpOutBound}; use crate::common::duplex_chan::DuplexChan; use crate::common::id_gen::IdGenerator; -use crate::mitm::modifier::Modifier; -use crate::mitm::ModifierContext; +use crate::eavesdrop::modifier::Modifier; +use crate::eavesdrop::ModifierContext; use crate::proxy::{ConnAbortHandle, ConnAgent}; use hyper::client::conn; use hyper::server::conn::Http; @@ -12,14 +12,14 @@ use std::io; use std::sync::Arc; use tokio::sync::RwLock; -pub struct HttpMitm { +pub struct HttpEavesdrop { inbound: DuplexChan, modifier: Arc, creator: Arc, conn_info: Arc>, } -impl HttpMitm { +impl HttpEavesdrop { pub fn new( inbound: DuplexChan, modifier: Arc, diff --git a/boltconn/src/mitm/https_mitm.rs b/boltconn/src/eavesdrop/https_eavesdrop.rs similarity index 96% rename from boltconn/src/mitm/https_mitm.rs rename to boltconn/src/eavesdrop/https_eavesdrop.rs index c61f275..8e8c1a6 100644 --- a/boltconn/src/mitm/https_mitm.rs +++ b/boltconn/src/eavesdrop/https_eavesdrop.rs @@ -1,8 +1,8 @@ use crate::adapter::{Connector, TcpOutBound}; use crate::common::duplex_chan::DuplexChan; use crate::common::id_gen::IdGenerator; -use crate::mitm::modifier::Modifier; -use crate::mitm::{sign_site_cert, ModifierContext}; +use crate::eavesdrop::modifier::Modifier; +use crate::eavesdrop::{sign_site_cert, ModifierContext}; use crate::proxy::{ConnAbortHandle, ConnAgent}; use hyper::client::conn; use hyper::server::conn::Http; @@ -18,7 +18,7 @@ use tokio_rustls::rustls::{ }; use tokio_rustls::{TlsAcceptor, TlsConnector}; -pub struct HttpsMitm { +pub struct HttpsEavesdrop { cert: Vec, priv_key: PrivateKey, server_name: String, @@ -28,7 +28,7 @@ pub struct HttpsMitm { conn_info: Arc>, } -impl HttpsMitm { +impl HttpsEavesdrop { pub fn new( ca_cert: &CaCertificate, server_name: String, diff --git a/boltconn/src/mitm/mod.rs b/boltconn/src/eavesdrop/mod.rs similarity index 95% rename from boltconn/src/mitm/mod.rs rename to boltconn/src/eavesdrop/mod.rs index a74a6da..9021f31 100644 --- a/boltconn/src/mitm/mod.rs +++ b/boltconn/src/eavesdrop/mod.rs @@ -1,14 +1,14 @@ +mod eavesdrop_modifier; mod header_rewrite; -mod http_mitm; -mod https_mitm; -mod mitm_modifier; +mod http_eavesdrop; +mod https_eavesdrop; mod modifier; mod url_rewrite; +pub use eavesdrop_modifier::*; pub use header_rewrite::*; -pub use http_mitm::HttpMitm; -pub use https_mitm::HttpsMitm; -pub use mitm_modifier::*; +pub use http_eavesdrop::HttpEavesdrop; +pub use https_eavesdrop::HttpsEavesdrop; pub use modifier::*; use rcgen::{ date_time_ymd, Certificate, CertificateParams, DistinguishedName, DnType, IsCa, KeyUsagePurpose, diff --git a/boltconn/src/mitm/modifier.rs b/boltconn/src/eavesdrop/modifier.rs similarity index 100% rename from boltconn/src/mitm/modifier.rs rename to boltconn/src/eavesdrop/modifier.rs diff --git a/boltconn/src/mitm/url_rewrite.rs b/boltconn/src/eavesdrop/url_rewrite.rs similarity index 99% rename from boltconn/src/mitm/url_rewrite.rs rename to boltconn/src/eavesdrop/url_rewrite.rs index acc9ae0..1dc14cd 100644 --- a/boltconn/src/mitm/url_rewrite.rs +++ b/boltconn/src/eavesdrop/url_rewrite.rs @@ -1,4 +1,4 @@ -use crate::mitm::ReplacedChunk; +use crate::eavesdrop::ReplacedChunk; use regex::{Regex, RegexSet}; #[derive(Copy, Clone, Debug, PartialEq, Eq)] diff --git a/boltconn/src/external/api_server.rs b/boltconn/src/external/api_server.rs index 27e624a..08421a4 100644 --- a/boltconn/src/external/api_server.rs +++ b/boltconn/src/external/api_server.rs @@ -10,7 +10,8 @@ use axum::response::IntoResponse; use axum::routing::{delete, get, post}; use axum::{Json, Router}; use boltapi::{ - GetGroupRespSchema, GetMitmDataResp, GetMitmRangeReq, ProxyData, SetGroupReqSchema, TrafficResp, + GetEavesdropDataResp, GetEavesdropRangeReq, GetGroupRespSchema, ProxyData, SetGroupReqSchema, + TrafficResp, }; use serde_json::json; use std::collections::HashMap; @@ -75,9 +76,9 @@ impl ApiServer { ) .route("/connections/:id", delete(Self::stop_conn)) .route("/sessions", get(Self::get_sessions)) - .route("/mitm/all", get(Self::get_mitm)) - .route("/mitm/range", get(Self::get_mitm_range)) - .route("/mitm/payload/:id", get(Self::get_mitm_payload)) + .route("/eavesdrop/all", get(Self::get_eavesdrop)) + .route("/eavesdrop/range", get(Self::get_eavesdrop_range)) + .route("/eavesdrop/payload/:id", get(Self::get_eavesdrop_payload)) .route("/proxies", get(Self::get_all_proxies)) .route( "/proxies/:group", @@ -252,8 +253,8 @@ impl ApiServer { ) -> Json { let mut result = Vec::new(); for (idx, (host, proc, req, resp)) in list.into_iter().enumerate() { - let item = boltapi::HttpMitmSchema { - mitm_id: idx as u64, + let item = boltapi::HttpEavesdropSchema { + eavesdrop_id: idx as u64, client: proc.map(|proc| proc.name), uri: { let s = req.uri.to_string(); @@ -275,7 +276,7 @@ impl ApiServer { Json(json!(result)) } - async fn get_mitm(State(server): State) -> Json { + async fn get_eavesdrop(State(server): State) -> Json { if let Some(capturer) = &server.http_capturer { let list = capturer.get_copy(); Self::collect_captured(list) @@ -284,9 +285,9 @@ impl ApiServer { } } - async fn get_mitm_range( + async fn get_eavesdrop_range( State(server): State, - Query(params): Query, + Query(params): Query, ) -> Json { if let Some(capturer) = &server.http_capturer { if let Some(list) = @@ -298,7 +299,7 @@ impl ApiServer { Json(serde_json::Value::Null) } - async fn get_mitm_payload( + async fn get_eavesdrop_payload( State(server): State, Path(params): Path>, ) -> Json { @@ -314,7 +315,7 @@ impl ApiServer { if let Some(list) = capturer.get_range_copy(id, Some(id + 1)) { if list.len() == 1 { let (_, _, req, resp) = list.get(0).unwrap(); - let result = GetMitmDataResp { + let result = GetEavesdropDataResp { req_header: req .headers .iter() diff --git a/boltconn/src/main.rs b/boltconn/src/main.rs index 9635597..fefe2a3 100644 --- a/boltconn/src/main.rs +++ b/boltconn/src/main.rs @@ -2,11 +2,10 @@ extern crate core; -use crate::common::host_matcher::{HostMatcher, HostMatcherBuilder}; use crate::config::{LinkedState, ProxySchema, RawRootCfg, RawState, RuleSchema}; use crate::dispatch::{Dispatching, DispatchingBuilder}; +use crate::eavesdrop::{EavesdropModifier, HeaderModManager, UrlModManager}; use crate::external::ApiServer; -use crate::mitm::{HeaderModManager, MitmModifier, UrlModManager}; use crate::network::configure::TunConfigure; use crate::network::dns::{extract_address, new_bootstrap_resolver, parse_dns_config}; use crate::proxy::{AgentCenter, HttpCapturer, HttpInbound, Socks5Inbound, TunUdpInbound}; @@ -40,8 +39,8 @@ mod adapter; mod common; mod config; mod dispatch; +mod eavesdrop; mod external; -mod mitm; mod network; mod platform; mod proxy; @@ -149,21 +148,6 @@ fn mapping_rewrite(list: &[String]) -> anyhow::Result<(Vec, Vec) Ok((url_list, header_list)) } -fn read_mitm_hosts(arr: &Option>) -> HostMatcher { - let mut builder = HostMatcherBuilder::new(); - if let Some(arr) = arr.as_ref() { - for s in arr { - if s.starts_with('*') { - let st: String = s.chars().skip(1).collect(); - builder.add_suffix(st.as_str()); - } else { - builder.add_exact(s.as_str()) - } - } - } - builder.build() -} - fn init_tracing() { let formatting_layer = fmt::layer() .compact() @@ -315,17 +299,17 @@ fn main() -> ExitCode { return ExitCode::from(1); } }; - let mitm_filter = match { + let eavesdrop_filter = match { let builder = DispatchingBuilder::new(); - if let Some(mitm_rules) = config.mitm_rule { - builder.build_filter(mitm_rules.as_slice(), &rule_schema) + if let Some(eavesdrop_rules) = config.eavesdrop_rule { + builder.build_filter(eavesdrop_rules.as_slice(), &rule_schema) } else { builder.build_filter(vec![].as_slice(), &rule_schema) } } { Ok(m) => m, Err(e) => { - eprintln!("Load mitm rules failed: {}", e); + eprintln!("Load eavesdrop rules failed: {}", e); return ExitCode::from(1); } }; @@ -366,14 +350,14 @@ fn main() -> ExitCode { dispatching, cert, Box::new(move |pi| { - Arc::new(MitmModifier::new( + Arc::new(EavesdropModifier::new( hcap_copy.clone(), url_modifier.clone(), hdr_modifier.clone(), pi, )) }), - Arc::new(mitm_filter), + Arc::new(eavesdrop_filter), )) }; let tun_inbound_tcp = Arc::new(TunTcpInbound::new( @@ -421,12 +405,12 @@ fn main() -> ExitCode { if restart.is_some(){ // try restarting components match reload(&config_path,dns.clone()).await{ - Ok((dispatching, mitm_hosts,url_rewriter,header_rewriter)) => { + Ok((dispatching, eavesdrop_filter,url_rewriter,header_rewriter)) => { *api_dispatching_handler.write().await = dispatching.clone(); let hcap2 = http_capturer.clone(); dispatcher.replace_dispatching(dispatching); - dispatcher.replace_mitm_list(mitm_hosts); - dispatcher.replace_modifier(Box::new(move |pi| Arc::new(MitmModifier::new(hcap2.clone(),url_rewriter.clone(),header_rewriter.clone(),pi)))); + dispatcher.replace_eavesdrop_filter(eavesdrop_filter); + dispatcher.replace_modifier(Box::new(move |pi| Arc::new(EavesdropModifier::new(hcap2.clone(),url_rewriter.clone(),header_rewriter.clone(),pi)))); tracing::info!("Reloaded config successfully"); } Err(err)=>{ @@ -477,14 +461,14 @@ async fn reload( } Arc::new(builder.build(&config, &state, &rule_schema, &proxy_schema)?) }; - let mitm_filter = { + let eavesdrop_filter = { let builder = DispatchingBuilder::new(); - if let Some(mitm_rules) = config.mitm_rule { - Arc::new(builder.build_filter(mitm_rules.as_slice(), &rule_schema)?) + if let Some(eavesdrop_rule) = config.eavesdrop_rule { + Arc::new(builder.build_filter(eavesdrop_rule.as_slice(), &rule_schema)?) } else { Arc::new(builder.build_filter(vec![].as_slice(), &rule_schema)?) } }; dns.replace_resolvers(group).await?; - Ok((dispatching, mitm_filter, url_mod, hdr_mod)) + Ok((dispatching, eavesdrop_filter, url_mod, hdr_mod)) } diff --git a/boltconn/src/proxy/dispatcher.rs b/boltconn/src/proxy/dispatcher.rs index eb2e3e0..aa50f4a 100644 --- a/boltconn/src/proxy/dispatcher.rs +++ b/boltconn/src/proxy/dispatcher.rs @@ -5,7 +5,7 @@ use crate::adapter::{ }; use crate::common::duplex_chan::DuplexChan; use crate::dispatch::{ConnInfo, Dispatching, GeneralProxy, ProxyImpl}; -use crate::mitm::{HttpMitm, HttpsMitm, ModifierClosure}; +use crate::eavesdrop::{HttpEavesdrop, HttpsEavesdrop, ModifierClosure}; use crate::network::dns::Dns; use crate::platform::process; use crate::platform::process::{NetworkType, ProcessInfo}; @@ -26,7 +26,7 @@ pub struct Dispatcher { dispatching: RwLock>, ca_certificate: Certificate, modifier: RwLock, - mitm_filter: RwLock>, + eavesdrop_filter: RwLock>, wireguard_mgr: WireguardManager, } @@ -39,7 +39,7 @@ impl Dispatcher { dispatching: Arc, ca_certificate: Certificate, modifier: ModifierClosure, - mitm_filter: Arc, + eavesdrop_filter: Arc, ) -> Self { let wg_mgr = WireguardManager::new(iface_name, dns.clone(), Duration::from_secs(180)); Self { @@ -49,7 +49,7 @@ impl Dispatcher { dispatching: RwLock::new(dispatching), ca_certificate, modifier: RwLock::new(modifier), - mitm_filter: RwLock::new(mitm_filter), + eavesdrop_filter: RwLock::new(eavesdrop_filter), wireguard_mgr: wg_mgr, } } @@ -58,8 +58,8 @@ impl Dispatcher { *self.dispatching.write().unwrap() = dispatching; } - pub fn replace_mitm_list(&self, mitm_filter: Arc) { - *self.mitm_filter.write().unwrap() = mitm_filter; + pub fn replace_eavesdrop_filter(&self, eavesdrop_filter: Arc) { + *self.eavesdrop_filter.write().unwrap() = eavesdrop_filter; } pub fn replace_modifier(&self, closure: ModifierClosure) { @@ -254,7 +254,7 @@ impl Dispatcher { if let NetworkAddr::DomainName { domain_name, port } = dst_addr { if (port == 80 || port == 443) && matches!( - self.mitm_filter + self.eavesdrop_filter .read() .unwrap() .matches(&conn_info, false) @@ -267,12 +267,12 @@ impl Dispatcher { match port { 80 => { // hijack - tracing::trace!("HTTP MitM for {}", domain_name); + tracing::trace!("HTTP eavesdropping for {}", domain_name); handles.push({ let info = info.clone(); let abort_handle = abort_handle.clone(); tokio::spawn(async move { - let mocker = HttpMitm::new( + let mocker = HttpEavesdrop::new( DuplexChan::new(tun_next), modifier, outbounding, @@ -288,11 +288,11 @@ impl Dispatcher { return; } 443 => { - tracing::trace!("HTTPS MitM for {}", domain_name); + tracing::trace!("HTTPS eavesdropping for {}", domain_name); handles.push({ let info = info.clone(); let abort_handle = abort_handle.clone(); - let mocker = match HttpsMitm::new( + let mocker = match HttpsEavesdrop::new( &self.ca_certificate, domain_name, DuplexChan::new(tun_next),