Skip to content

Commit

Permalink
fix warnings and errors from previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
GlenDC committed Oct 10, 2024
1 parent 24088d1 commit ca5ff84
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion g3proxy/src/inspect/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use uuid::Uuid;
use g3_daemon::server::ServerQuitPolicy;
use g3_dpi::{
H1InterceptionConfig, H2InterceptionConfig, ImapInterceptionConfig, MaybeProtocol,
ProtocolInspectAction, ProtocolInspectPolicy, ProtocolInspector, SmtpInterceptionConfig,
ProtocolInspectAction, ProtocolInspector, SmtpInterceptionConfig,
};
use g3_types::net::{Host, OpensslClientConfig};

Expand Down Expand Up @@ -271,6 +271,7 @@ impl<SC: ServerConfig> StreamInspectContext<SC> {
}

#[inline]
#[allow(dead_code)]
fn h2_inspect_missing_action(&self) -> ProtocolInspectAction {
self.audit_handle.h2_inspect_policy().missing_action()
}
Expand Down Expand Up @@ -312,6 +313,7 @@ impl<SC: ServerConfig> StreamInspectContext<SC> {
}

#[inline]
#[allow(dead_code)]
fn smtp_inspect_missing_action(&self) -> ProtocolInspectAction {
self.audit_handle.smtp_inspect_policy().missing_action()
}
Expand All @@ -330,6 +332,7 @@ impl<SC: ServerConfig> StreamInspectContext<SC> {
}

#[inline]
#[allow(dead_code)]
fn imap_inspect_missing_action(&self) -> ProtocolInspectAction {
self.audit_handle.imap_inspect_policy().missing_action()
}
Expand Down
2 changes: 1 addition & 1 deletion g3proxy/src/inspect/websocket/h2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl<SC: ServerConfig> H2WebsocketInterceptObject<SC> {
ups_r: RecvStream,
ups_w: SendStream<Bytes>,
) {
let r = match self.ctx.websocket_inspect_action(upstream.host()) {
let r = match self.ctx.websocket_inspect_action(self.upstream.host()) {
ProtocolInspectAction::Intercept => self.do_intercept(clt_r, clt_w, ups_r, ups_w).await,
#[cfg(feature = "quic")]
ProtocolInspectAction::Detour => self.do_detour(clt_r, clt_w, ups_r, ups_w).await,
Expand Down

0 comments on commit ca5ff84

Please sign in to comment.