diff --git a/g3proxy/src/escape/comply_audit/mod.rs b/g3proxy/src/escape/comply_audit/mod.rs index 6f2a1a9a..fbe2004d 100644 --- a/g3proxy/src/escape/comply_audit/mod.rs +++ b/g3proxy/src/escape/comply_audit/mod.rs @@ -141,11 +141,11 @@ impl Escaper for ComplyAuditEscaper { .await } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { udp_notes.escaper.clone_from(&self.config.name); @@ -155,11 +155,11 @@ impl Escaper for ComplyAuditEscaper { .await } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { udp_notes.escaper.clone_from(&self.config.name); @@ -174,11 +174,11 @@ impl Escaper for ComplyAuditEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { self.stats.add_request_passed(); self.next diff --git a/g3proxy/src/escape/direct_fixed/ftp_connect/mod.rs b/g3proxy/src/escape/direct_fixed/ftp_connect/mod.rs index ac610ca6..07ffd0f4 100644 --- a/g3proxy/src/escape/direct_fixed/ftp_connect/mod.rs +++ b/g3proxy/src/escape/direct_fixed/ftp_connect/mod.rs @@ -28,11 +28,11 @@ use crate::module::tcp_connect::{TcpConnectError, TcpConnectTaskConf, TcpConnect use crate::serve::ServerTaskNotes; impl DirectFixedEscaper { - pub(super) async fn new_ftp_control_connection<'a>( - &'a self, + pub(super) async fn new_ftp_control_connection( + &self, task_conf: &TcpConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcFtpTaskRemoteControlStats, ) -> Result { let stream = self @@ -55,12 +55,12 @@ impl DirectFixedEscaper { Ok(Box::new(stream)) } - pub(super) async fn new_ftp_transfer_connection<'a>( - &'a self, + pub(super) async fn new_ftp_transfer_connection( + &self, task_conf: &TcpConnectTaskConf<'_>, - transfer_tcp_notes: &'a mut TcpConnectTaskNotes, - control_tcp_notes: &'a TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + transfer_tcp_notes: &mut TcpConnectTaskNotes, + control_tcp_notes: &TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcFtpTaskRemoteTransferStats, ftp_server: &UpstreamAddr, ) -> Result { diff --git a/g3proxy/src/escape/direct_fixed/http_forward/mod.rs b/g3proxy/src/escape/direct_fixed/http_forward/mod.rs index d7de9151..2e5e5af5 100644 --- a/g3proxy/src/escape/direct_fixed/http_forward/mod.rs +++ b/g3proxy/src/escape/direct_fixed/http_forward/mod.rs @@ -36,11 +36,11 @@ pub(crate) use reader::DirectHttpForwardReader; pub(crate) use writer::DirectHttpForwardWriter; impl DirectFixedEscaper { - pub(super) async fn http_forward_new_connection<'a>( - &'a self, + pub(super) async fn http_forward_new_connection( + &self, task_conf: &TcpConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcHttpForwardTaskRemoteStats, ) -> Result { let stream = self @@ -75,11 +75,11 @@ impl DirectFixedEscaper { Ok((Box::new(writer), Box::new(reader))) } - pub(super) async fn https_forward_new_connection<'a>( - &'a self, + pub(super) async fn https_forward_new_connection( + &self, task_conf: &TlsConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcHttpForwardTaskRemoteStats, ) -> Result { let tls_stream = self diff --git a/g3proxy/src/escape/direct_fixed/mod.rs b/g3proxy/src/escape/direct_fixed/mod.rs index 1626bdd7..41076b61 100644 --- a/g3proxy/src/escape/direct_fixed/mod.rs +++ b/g3proxy/src/escape/direct_fixed/mod.rs @@ -312,11 +312,11 @@ impl Escaper for DirectFixedEscaper { .await } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { self.stats.interface.add_udp_connect_attempted(); @@ -325,11 +325,11 @@ impl Escaper for DirectFixedEscaper { .await } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { self.stats.interface.add_udp_relay_session_attempted(); @@ -343,11 +343,11 @@ impl Escaper for DirectFixedEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - _task_notes: &'a ServerTaskNotes, + _task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { Box::new(DirectFtpConnectContext::new( escaper, diff --git a/g3proxy/src/escape/direct_fixed/tcp_connect/mod.rs b/g3proxy/src/escape/direct_fixed/tcp_connect/mod.rs index bf326073..c6e38379 100644 --- a/g3proxy/src/escape/direct_fixed/tcp_connect/mod.rs +++ b/g3proxy/src/escape/direct_fixed/tcp_connect/mod.rs @@ -47,10 +47,10 @@ pub(crate) struct DirectTcpConnectConfig { } impl DirectFixedEscaper { - fn handle_tcp_target_ip_acl_action<'a>( - &'a self, + fn handle_tcp_target_ip_acl_action( + &self, action: AclAction, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, ) -> Result<(), TcpConnectError> { let forbid = match action { AclAction::Permit => false, @@ -363,13 +363,13 @@ impl DirectFixedEscaper { } } - pub(super) async fn tcp_connect_to_again<'a>( - &'a self, + pub(super) async fn tcp_connect_to_again( + &self, task_conf: &TcpConnectTaskConf<'_>, old_upstream: &UpstreamAddr, - new_tcp_notes: &'a mut TcpConnectTaskNotes, - old_tcp_notes: &'a TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + new_tcp_notes: &mut TcpConnectTaskNotes, + old_tcp_notes: &TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, ) -> Result { new_tcp_notes.bind = old_tcp_notes.bind; @@ -435,11 +435,11 @@ impl DirectFixedEscaper { } } - pub(super) async fn tcp_new_connection<'a>( - &'a self, + pub(super) async fn tcp_new_connection( + &self, task_conf: &TcpConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcTcpConnectionTaskRemoteStats, ) -> TcpConnectResult { let stream = self diff --git a/g3proxy/src/escape/direct_fixed/tls_connect/mod.rs b/g3proxy/src/escape/direct_fixed/tls_connect/mod.rs index e347a560..173c54ce 100644 --- a/g3proxy/src/escape/direct_fixed/tls_connect/mod.rs +++ b/g3proxy/src/escape/direct_fixed/tls_connect/mod.rs @@ -33,11 +33,11 @@ use crate::module::tcp_connect::{ use crate::serve::ServerTaskNotes; impl DirectFixedEscaper { - pub(super) async fn tls_connect_to<'a>( - &'a self, + pub(super) async fn tls_connect_to( + &self, task_conf: &TlsConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, tls_application: TlsApplication, ) -> Result, TcpConnectError> { let stream = self @@ -89,11 +89,11 @@ impl DirectFixedEscaper { } } - pub(super) async fn tls_new_connection<'a>( - &'a self, + pub(super) async fn tls_new_connection( + &self, task_conf: &TlsConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcTcpConnectionTaskRemoteStats, ) -> TcpConnectResult { let tls_stream = self diff --git a/g3proxy/src/escape/direct_fixed/udp_connect/mod.rs b/g3proxy/src/escape/direct_fixed/udp_connect/mod.rs index 2d69c99b..52e9beee 100644 --- a/g3proxy/src/escape/direct_fixed/udp_connect/mod.rs +++ b/g3proxy/src/escape/direct_fixed/udp_connect/mod.rs @@ -36,10 +36,10 @@ pub(crate) use recv::DirectUdpConnectRemoteRecv; pub(crate) use send::DirectUdpConnectRemoteSend; impl DirectFixedEscaper { - fn handle_udp_target_ip_acl_action<'a>( - &'a self, + fn handle_udp_target_ip_acl_action( + &self, action: AclAction, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, ) -> Result<(), UdpConnectError> { let forbid = match action { AclAction::Permit => false, @@ -64,11 +64,11 @@ impl DirectFixedEscaper { } } - pub(super) async fn udp_connect_to<'a>( - &'a self, + pub(super) async fn udp_connect_to( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { let peer_addr = self diff --git a/g3proxy/src/escape/direct_fixed/udp_relay/mod.rs b/g3proxy/src/escape/direct_fixed/udp_relay/mod.rs index 9fe6cff9..d8593f92 100644 --- a/g3proxy/src/escape/direct_fixed/udp_relay/mod.rs +++ b/g3proxy/src/escape/direct_fixed/udp_relay/mod.rs @@ -36,10 +36,10 @@ pub(crate) use recv::DirectUdpRelayRemoteRecv; pub(crate) use send::DirectUdpRelayRemoteSend; impl DirectFixedEscaper { - pub(super) async fn udp_setup_relay<'a>( - &'a self, + pub(super) async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { let mut wrapper_stats = UdpRelayRemoteWrapperStats::new(&self.stats, task_stats); diff --git a/g3proxy/src/escape/direct_float/ftp_connect/mod.rs b/g3proxy/src/escape/direct_float/ftp_connect/mod.rs index a0bb8d26..4eca40a1 100644 --- a/g3proxy/src/escape/direct_float/ftp_connect/mod.rs +++ b/g3proxy/src/escape/direct_float/ftp_connect/mod.rs @@ -28,11 +28,11 @@ use crate::module::tcp_connect::{TcpConnectError, TcpConnectTaskConf, TcpConnect use crate::serve::ServerTaskNotes; impl DirectFloatEscaper { - pub(super) async fn new_ftp_control_connection<'a>( - &'a self, + pub(super) async fn new_ftp_control_connection( + &self, task_conf: &TcpConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcFtpTaskRemoteControlStats, ) -> Result { let (stream, _) = self @@ -55,12 +55,12 @@ impl DirectFloatEscaper { Ok(Box::new(stream)) } - pub(super) async fn new_ftp_transfer_connection<'a>( - &'a self, + pub(super) async fn new_ftp_transfer_connection( + &self, task_conf: &TcpConnectTaskConf<'_>, - transfer_tcp_notes: &'a mut TcpConnectTaskNotes, - control_tcp_notes: &'a TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + transfer_tcp_notes: &mut TcpConnectTaskNotes, + control_tcp_notes: &TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcFtpTaskRemoteTransferStats, ftp_server: &UpstreamAddr, ) -> Result { diff --git a/g3proxy/src/escape/direct_float/http_forward/mod.rs b/g3proxy/src/escape/direct_float/http_forward/mod.rs index 62fa90ec..6d6d662c 100644 --- a/g3proxy/src/escape/direct_float/http_forward/mod.rs +++ b/g3proxy/src/escape/direct_float/http_forward/mod.rs @@ -34,11 +34,11 @@ mod writer; use writer::DirectFloatHttpForwardWriter; impl DirectFloatEscaper { - pub(super) async fn http_forward_new_connection<'a>( - &'a self, + pub(super) async fn http_forward_new_connection( + &self, task_conf: &TcpConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcHttpForwardTaskRemoteStats, ) -> Result { let (stream, bind) = self @@ -73,11 +73,11 @@ impl DirectFloatEscaper { Ok((Box::new(writer), Box::new(reader))) } - pub(super) async fn https_forward_new_connection<'a>( - &'a self, + pub(super) async fn https_forward_new_connection( + &self, task_conf: &TlsConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcHttpForwardTaskRemoteStats, ) -> Result { let (tls_stream, bind) = self diff --git a/g3proxy/src/escape/direct_float/mod.rs b/g3proxy/src/escape/direct_float/mod.rs index 90b6bc47..83b2c17c 100644 --- a/g3proxy/src/escape/direct_float/mod.rs +++ b/g3proxy/src/escape/direct_float/mod.rs @@ -400,11 +400,11 @@ impl Escaper for DirectFloatEscaper { .await } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { self.stats.interface.add_udp_connect_attempted(); @@ -413,11 +413,11 @@ impl Escaper for DirectFloatEscaper { .await } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { self.stats.interface.add_udp_relay_session_attempted(); @@ -434,11 +434,11 @@ impl Escaper for DirectFloatEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - _task_notes: &'a ServerTaskNotes, + _task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { Box::new(DirectFtpConnectContext::new( escaper, diff --git a/g3proxy/src/escape/direct_float/tcp_connect/mod.rs b/g3proxy/src/escape/direct_float/tcp_connect/mod.rs index 5af6ca5a..50a85e7c 100644 --- a/g3proxy/src/escape/direct_float/tcp_connect/mod.rs +++ b/g3proxy/src/escape/direct_float/tcp_connect/mod.rs @@ -40,10 +40,10 @@ use crate::resolve::HappyEyeballsResolveJob; use crate::serve::ServerTaskNotes; impl DirectFloatEscaper { - fn handle_tcp_target_ip_acl_action<'a>( - &'a self, + fn handle_tcp_target_ip_acl_action( + &self, action: AclAction, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, ) -> Result<(), TcpConnectError> { let forbid = match action { AclAction::Permit => false, @@ -323,11 +323,11 @@ impl DirectFloatEscaper { } } - pub(super) async fn tcp_connect_to<'a>( - &'a self, + pub(super) async fn tcp_connect_to( + &self, task_conf: &TcpConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, ) -> Result<(TcpStream, DirectFloatBindIp), TcpConnectError> { let mut config = DirectTcpConnectConfig { connect: self.config.general.tcp_connect, @@ -364,13 +364,13 @@ impl DirectFloatEscaper { } } - pub(super) async fn tcp_connect_to_again<'a>( - &'a self, + pub(super) async fn tcp_connect_to_again( + &self, task_conf: &TcpConnectTaskConf<'_>, old_upstream: &UpstreamAddr, - new_tcp_notes: &'a mut TcpConnectTaskNotes, - old_tcp_notes: &'a TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + new_tcp_notes: &mut TcpConnectTaskNotes, + old_tcp_notes: &TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, ) -> Result<(TcpStream, DirectFloatBindIp), TcpConnectError> { new_tcp_notes.bind = old_tcp_notes.bind; @@ -436,11 +436,11 @@ impl DirectFloatEscaper { } } - pub(super) async fn tcp_new_connection<'a>( - &'a self, + pub(super) async fn tcp_new_connection( + &self, task_conf: &TcpConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcTcpConnectionTaskRemoteStats, ) -> TcpConnectResult { let (stream, _) = self diff --git a/g3proxy/src/escape/direct_float/tls_connect/mod.rs b/g3proxy/src/escape/direct_float/tls_connect/mod.rs index 2fa6600f..e5eb2368 100644 --- a/g3proxy/src/escape/direct_float/tls_connect/mod.rs +++ b/g3proxy/src/escape/direct_float/tls_connect/mod.rs @@ -33,11 +33,11 @@ use crate::module::tcp_connect::{ use crate::serve::ServerTaskNotes; impl DirectFloatEscaper { - pub(super) async fn tls_connect_to<'a>( - &'a self, + pub(super) async fn tls_connect_to( + &self, task_conf: &TlsConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, tls_application: TlsApplication, ) -> Result<(SslStream, DirectFloatBindIp), TcpConnectError> { let (stream, bind) = self @@ -89,11 +89,11 @@ impl DirectFloatEscaper { } } - pub(super) async fn tls_new_connection<'a>( - &'a self, + pub(super) async fn tls_new_connection( + &self, task_conf: &TlsConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcTcpConnectionTaskRemoteStats, ) -> TcpConnectResult { let (tls_stream, _) = self diff --git a/g3proxy/src/escape/direct_float/udp_connect/mod.rs b/g3proxy/src/escape/direct_float/udp_connect/mod.rs index 1a71fcb8..5b5a16e2 100644 --- a/g3proxy/src/escape/direct_float/udp_connect/mod.rs +++ b/g3proxy/src/escape/direct_float/udp_connect/mod.rs @@ -34,10 +34,10 @@ use crate::module::udp_connect::{ use crate::serve::ServerTaskNotes; impl DirectFloatEscaper { - fn handle_udp_target_ip_acl_action<'a>( - &'a self, + fn handle_udp_target_ip_acl_action( + &self, action: AclAction, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, ) -> Result<(), UdpConnectError> { let forbid = match action { AclAction::Permit => false, @@ -62,11 +62,11 @@ impl DirectFloatEscaper { } } - pub(super) async fn udp_connect_to<'a>( - &'a self, + pub(super) async fn udp_connect_to( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { let peer_addr = self diff --git a/g3proxy/src/escape/direct_float/udp_relay/mod.rs b/g3proxy/src/escape/direct_float/udp_relay/mod.rs index 8948db37..5619ec82 100644 --- a/g3proxy/src/escape/direct_float/udp_relay/mod.rs +++ b/g3proxy/src/escape/direct_float/udp_relay/mod.rs @@ -33,10 +33,10 @@ use crate::module::udp_relay::{ use crate::serve::ServerTaskNotes; impl DirectFloatEscaper { - pub(super) async fn udp_setup_relay<'a>( - &'a self, + pub(super) async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { let mut wrapper_stats = UdpRelayRemoteWrapperStats::new(&self.stats, task_stats); diff --git a/g3proxy/src/escape/divert_tcp/http_forward/mod.rs b/g3proxy/src/escape/divert_tcp/http_forward/mod.rs index ed6bfd4a..a572069c 100644 --- a/g3proxy/src/escape/divert_tcp/http_forward/mod.rs +++ b/g3proxy/src/escape/divert_tcp/http_forward/mod.rs @@ -33,11 +33,11 @@ use crate::module::tcp_connect::{ use crate::serve::ServerTaskNotes; impl DivertTcpEscaper { - pub(super) async fn http_forward_new_connection<'a>( - &'a self, + pub(super) async fn http_forward_new_connection( + &self, task_conf: &TcpConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcHttpForwardTaskRemoteStats, ) -> Result { let stream = self @@ -77,11 +77,11 @@ impl DivertTcpEscaper { Ok((Box::new(writer), Box::new(reader))) } - pub(super) async fn https_forward_new_connection<'a>( - &'a self, + pub(super) async fn https_forward_new_connection( + &self, task_conf: &TlsConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcHttpForwardTaskRemoteStats, ) -> Result { let tls_stream = self diff --git a/g3proxy/src/escape/divert_tcp/mod.rs b/g3proxy/src/escape/divert_tcp/mod.rs index 0799ef8c..900e3060 100644 --- a/g3proxy/src/escape/divert_tcp/mod.rs +++ b/g3proxy/src/escape/divert_tcp/mod.rs @@ -245,11 +245,11 @@ impl Escaper for DivertTcpEscaper { .await } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, _task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - _task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + _task_notes: &ServerTaskNotes, _task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { self.stats.interface.add_udp_connect_attempted(); @@ -257,11 +257,11 @@ impl Escaper for DivertTcpEscaper { Err(UdpConnectError::MethodUnavailable) } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, _task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - _task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + _task_notes: &ServerTaskNotes, _task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { self.stats.interface.add_udp_relay_session_attempted(); @@ -274,11 +274,11 @@ impl Escaper for DivertTcpEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - _task_notes: &'a ServerTaskNotes, + _task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { Box::new(DirectFtpConnectContext::new( escaper, diff --git a/g3proxy/src/escape/divert_tcp/tcp_connect/mod.rs b/g3proxy/src/escape/divert_tcp/tcp_connect/mod.rs index 4b2f812b..7e9e123d 100644 --- a/g3proxy/src/escape/divert_tcp/tcp_connect/mod.rs +++ b/g3proxy/src/escape/divert_tcp/tcp_connect/mod.rs @@ -282,11 +282,11 @@ impl DivertTcpEscaper { } } - pub(super) async fn tcp_connect_to<'a>( - &'a self, + pub(super) async fn tcp_connect_to( + &self, task_conf: &TcpConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, ) -> Result { let peer_proxy = self.get_next_proxy(task_notes, task_conf.upstream.host()); @@ -315,11 +315,11 @@ impl DivertTcpEscaper { } } - pub(super) async fn tcp_new_connection<'a>( - &'a self, + pub(super) async fn tcp_new_connection( + &self, task_conf: &TcpConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcTcpConnectionTaskRemoteStats, ) -> TcpConnectResult { let stream = self diff --git a/g3proxy/src/escape/divert_tcp/tls_connect/mod.rs b/g3proxy/src/escape/divert_tcp/tls_connect/mod.rs index 9cdfd1c5..355d62ab 100644 --- a/g3proxy/src/escape/divert_tcp/tls_connect/mod.rs +++ b/g3proxy/src/escape/divert_tcp/tls_connect/mod.rs @@ -33,11 +33,11 @@ use crate::module::tcp_connect::{ use crate::serve::ServerTaskNotes; impl DivertTcpEscaper { - pub(super) async fn tls_connect_to<'a>( - &'a self, + pub(super) async fn tls_connect_to( + &self, task_conf: &TlsConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, tls_application: TlsApplication, ) -> Result, TcpConnectError> { let stream = self @@ -97,11 +97,11 @@ impl DivertTcpEscaper { } } - pub(super) async fn tls_new_connection<'a>( - &'a self, + pub(super) async fn tls_new_connection( + &self, task_conf: &TlsConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcTcpConnectionTaskRemoteStats, ) -> TcpConnectResult { let tls_stream = self diff --git a/g3proxy/src/escape/dummy_deny/mod.rs b/g3proxy/src/escape/dummy_deny/mod.rs index 43c1b616..c27e55c7 100644 --- a/g3proxy/src/escape/dummy_deny/mod.rs +++ b/g3proxy/src/escape/dummy_deny/mod.rs @@ -132,11 +132,11 @@ impl Escaper for DummyDenyEscaper { Err(TcpConnectError::MethodUnavailable) } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, _task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - _task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + _task_notes: &ServerTaskNotes, _task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { self.stats.interface.add_udp_connect_attempted(); @@ -144,11 +144,11 @@ impl Escaper for DummyDenyEscaper { Err(UdpConnectError::MethodUnavailable) } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, _task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - _task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + _task_notes: &ServerTaskNotes, _task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { self.stats.interface.add_udp_relay_session_attempted(); @@ -161,11 +161,11 @@ impl Escaper for DummyDenyEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, _escaper: ArcEscaper, _task_conf: &TcpConnectTaskConf<'_>, - _task_notes: &'a ServerTaskNotes, + _task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { Box::new(DenyFtpConnectContext::new(self.config.name(), None)) } diff --git a/g3proxy/src/escape/mod.rs b/g3proxy/src/escape/mod.rs index fa23cb74..d3ddb400 100644 --- a/g3proxy/src/escape/mod.rs +++ b/g3proxy/src/escape/mod.rs @@ -187,29 +187,29 @@ pub(crate) trait Escaper: EscaperInternal { audit_ctx: &'a mut AuditContext, ) -> TcpConnectResult; - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult; - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult; fn new_http_forward_context(&self, escaper: ArcEscaper) -> BoxHttpForwardContext; - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext; } diff --git a/g3proxy/src/escape/proxy_float/mod.rs b/g3proxy/src/escape/proxy_float/mod.rs index e30cd106..939b9996 100644 --- a/g3proxy/src/escape/proxy_float/mod.rs +++ b/g3proxy/src/escape/proxy_float/mod.rs @@ -238,11 +238,11 @@ impl Escaper for ProxyFloatEscaper { .await } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { self.stats.interface.add_udp_connect_attempted(); @@ -254,11 +254,11 @@ impl Escaper for ProxyFloatEscaper { .await } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { self.stats.interface.add_udp_relay_session_attempted(); @@ -275,11 +275,11 @@ impl Escaper for ProxyFloatEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, _escaper: ArcEscaper, _task_conf: &TcpConnectTaskConf<'_>, - _task_notes: &'a ServerTaskNotes, + _task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { Box::new(DenyFtpConnectContext::new(self.name(), None)) } diff --git a/g3proxy/src/escape/proxy_http/mod.rs b/g3proxy/src/escape/proxy_http/mod.rs index 1668bed6..b9bba546 100644 --- a/g3proxy/src/escape/proxy_http/mod.rs +++ b/g3proxy/src/escape/proxy_http/mod.rs @@ -201,11 +201,11 @@ impl Escaper for ProxyHttpEscaper { .await } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, _task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - _task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + _task_notes: &ServerTaskNotes, _task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { self.stats.interface.add_udp_connect_attempted(); @@ -213,11 +213,11 @@ impl Escaper for ProxyHttpEscaper { Err(UdpConnectError::MethodUnavailable) } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, _task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - _task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + _task_notes: &ServerTaskNotes, _task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { self.stats.interface.add_udp_relay_session_attempted(); @@ -230,11 +230,11 @@ impl Escaper for ProxyHttpEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - _task_notes: &'a ServerTaskNotes, + _task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { Box::new(DirectFtpConnectContext::new( escaper, diff --git a/g3proxy/src/escape/proxy_https/mod.rs b/g3proxy/src/escape/proxy_https/mod.rs index de68f7e1..66cb98c0 100644 --- a/g3proxy/src/escape/proxy_https/mod.rs +++ b/g3proxy/src/escape/proxy_https/mod.rs @@ -208,11 +208,11 @@ impl Escaper for ProxyHttpsEscaper { .await } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, _task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - _task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + _task_notes: &ServerTaskNotes, _task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { self.stats.interface.add_udp_connect_attempted(); @@ -220,11 +220,11 @@ impl Escaper for ProxyHttpsEscaper { Err(UdpConnectError::MethodUnavailable) } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, _task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - _task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + _task_notes: &ServerTaskNotes, _task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { self.stats.interface.add_udp_relay_session_attempted(); @@ -237,11 +237,11 @@ impl Escaper for ProxyHttpsEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - _task_notes: &'a ServerTaskNotes, + _task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { Box::new(DirectFtpConnectContext::new( escaper, diff --git a/g3proxy/src/escape/proxy_socks5/mod.rs b/g3proxy/src/escape/proxy_socks5/mod.rs index f258cff2..6ec3b566 100644 --- a/g3proxy/src/escape/proxy_socks5/mod.rs +++ b/g3proxy/src/escape/proxy_socks5/mod.rs @@ -204,11 +204,11 @@ impl Escaper for ProxySocks5Escaper { .await } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { self.stats.interface.add_udp_connect_attempted(); @@ -217,11 +217,11 @@ impl Escaper for ProxySocks5Escaper { .await } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { self.stats.interface.add_udp_relay_session_attempted(); @@ -238,11 +238,11 @@ impl Escaper for ProxySocks5Escaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - _task_notes: &'a ServerTaskNotes, + _task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { Box::new(DirectFtpConnectContext::new( escaper, diff --git a/g3proxy/src/escape/proxy_socks5/udp_connect/mod.rs b/g3proxy/src/escape/proxy_socks5/udp_connect/mod.rs index 2fd72156..4e9c9425 100644 --- a/g3proxy/src/escape/proxy_socks5/udp_connect/mod.rs +++ b/g3proxy/src/escape/proxy_socks5/udp_connect/mod.rs @@ -33,11 +33,11 @@ pub(crate) use recv::ProxySocks5UdpConnectRemoteRecv; pub(crate) use send::ProxySocks5UdpConnectRemoteSend; impl ProxySocks5Escaper { - pub(super) async fn udp_connect_to<'a>( - &'a self, + pub(super) async fn udp_connect_to( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { let mut tcp_notes = TcpConnectTaskNotes::default(); diff --git a/g3proxy/src/escape/proxy_socks5/udp_relay/mod.rs b/g3proxy/src/escape/proxy_socks5/udp_relay/mod.rs index e97b1d1b..80af07f9 100644 --- a/g3proxy/src/escape/proxy_socks5/udp_relay/mod.rs +++ b/g3proxy/src/escape/proxy_socks5/udp_relay/mod.rs @@ -33,10 +33,10 @@ pub(crate) use recv::ProxySocks5UdpRelayRemoteRecv; pub(crate) use send::ProxySocks5UdpRelayRemoteSend; impl ProxySocks5Escaper { - pub(super) async fn udp_setup_relay<'a>( - &'a self, + pub(super) async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { let mut tcp_notes = TcpConnectTaskNotes::default(); diff --git a/g3proxy/src/escape/proxy_socks5s/mod.rs b/g3proxy/src/escape/proxy_socks5s/mod.rs index d348accb..6448227f 100644 --- a/g3proxy/src/escape/proxy_socks5s/mod.rs +++ b/g3proxy/src/escape/proxy_socks5s/mod.rs @@ -210,11 +210,11 @@ impl Escaper for ProxySocks5sEscaper { .await } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { self.stats.interface.add_udp_connect_attempted(); @@ -223,11 +223,11 @@ impl Escaper for ProxySocks5sEscaper { .await } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { self.stats.interface.add_udp_relay_session_attempted(); @@ -244,11 +244,11 @@ impl Escaper for ProxySocks5sEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - _task_notes: &'a ServerTaskNotes, + _task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { Box::new(DirectFtpConnectContext::new( escaper, diff --git a/g3proxy/src/escape/proxy_socks5s/udp_connect/mod.rs b/g3proxy/src/escape/proxy_socks5s/udp_connect/mod.rs index 513a25e8..76ca7025 100644 --- a/g3proxy/src/escape/proxy_socks5s/udp_connect/mod.rs +++ b/g3proxy/src/escape/proxy_socks5s/udp_connect/mod.rs @@ -30,11 +30,11 @@ use crate::module::udp_connect::{ use crate::serve::ServerTaskNotes; impl ProxySocks5sEscaper { - pub(super) async fn udp_connect_to<'a>( - &'a self, + pub(super) async fn udp_connect_to( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { let mut tcp_notes = TcpConnectTaskNotes::default(); diff --git a/g3proxy/src/escape/proxy_socks5s/udp_relay/mod.rs b/g3proxy/src/escape/proxy_socks5s/udp_relay/mod.rs index 08ee9e73..bfabecda 100644 --- a/g3proxy/src/escape/proxy_socks5s/udp_relay/mod.rs +++ b/g3proxy/src/escape/proxy_socks5s/udp_relay/mod.rs @@ -30,10 +30,10 @@ use crate::module::udp_relay::{ use crate::serve::ServerTaskNotes; impl ProxySocks5sEscaper { - pub(super) async fn udp_setup_relay<'a>( - &'a self, + pub(super) async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { let mut tcp_notes = TcpConnectTaskNotes::default(); diff --git a/g3proxy/src/escape/route_client/mod.rs b/g3proxy/src/escape/route_client/mod.rs index cb178871..219927a2 100644 --- a/g3proxy/src/escape/route_client/mod.rs +++ b/g3proxy/src/escape/route_client/mod.rs @@ -185,11 +185,11 @@ impl Escaper for RouteClientEscaper { .await } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { udp_notes.escaper.clone_from(&self.config.name); @@ -200,11 +200,11 @@ impl Escaper for RouteClientEscaper { .await } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { udp_notes.escaper.clone_from(&self.config.name); @@ -220,11 +220,11 @@ impl Escaper for RouteClientEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, _escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { let escaper = self.select_next(task_notes.client_ip()); self.stats.add_request_passed(); diff --git a/g3proxy/src/escape/route_failover/ftp_connect.rs b/g3proxy/src/escape/route_failover/ftp_connect.rs index 829f030c..0d9e637d 100644 --- a/g3proxy/src/escape/route_failover/ftp_connect.rs +++ b/g3proxy/src/escape/route_failover/ftp_connect.rs @@ -114,10 +114,10 @@ impl FtpConnectFailoverContext { } impl RouteFailoverEscaper { - pub(super) async fn new_ftp_connect_context_with_failover<'a>( - &'a self, + pub(super) async fn new_ftp_connect_context_with_failover( + &self, task_conf: &TcpConnectTaskConf<'_>, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { let primary_context = FtpConnectFailoverContext::new(self.primary_node.clone()); let mut primary_task = pin!(primary_context.run(task_conf, task_notes)); diff --git a/g3proxy/src/escape/route_failover/mod.rs b/g3proxy/src/escape/route_failover/mod.rs index 47b90ba5..9ea00fa6 100644 --- a/g3proxy/src/escape/route_failover/mod.rs +++ b/g3proxy/src/escape/route_failover/mod.rs @@ -147,11 +147,11 @@ impl Escaper for RouteFailoverEscaper { .await } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { udp_notes.escaper.clone_from(&self.config.name); @@ -159,11 +159,11 @@ impl Escaper for RouteFailoverEscaper { .await } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { udp_notes.escaper.clone_from(&self.config.name); @@ -181,11 +181,11 @@ impl Escaper for RouteFailoverEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, _escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { self.new_ftp_connect_context_with_failover(task_conf, task_notes) .await diff --git a/g3proxy/src/escape/route_failover/tcp_connect.rs b/g3proxy/src/escape/route_failover/tcp_connect.rs index f520d72f..928fc319 100644 --- a/g3proxy/src/escape/route_failover/tcp_connect.rs +++ b/g3proxy/src/escape/route_failover/tcp_connect.rs @@ -75,13 +75,13 @@ impl TcpConnectFailoverContext { } impl RouteFailoverEscaper { - pub(super) async fn tcp_setup_connection_with_failover<'a>( - &'a self, + pub(super) async fn tcp_setup_connection_with_failover( + &self, task_conf: &TcpConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcTcpConnectionTaskRemoteStats, - audit_ctx: &'a mut AuditContext, + audit_ctx: &mut AuditContext, ) -> TcpConnectResult { let primary_context = TcpConnectFailoverContext::new(audit_ctx); let mut primary_task = pin!(primary_context.run( diff --git a/g3proxy/src/escape/route_failover/tls_connect.rs b/g3proxy/src/escape/route_failover/tls_connect.rs index b7893c8b..52c43241 100644 --- a/g3proxy/src/escape/route_failover/tls_connect.rs +++ b/g3proxy/src/escape/route_failover/tls_connect.rs @@ -75,13 +75,13 @@ impl TlsConnectFailoverContext { } impl RouteFailoverEscaper { - pub(super) async fn tls_setup_connection_with_failover<'a>( - &'a self, + pub(super) async fn tls_setup_connection_with_failover( + &self, task_conf: &TlsConnectTaskConf<'_>, - tcp_notes: &'a mut TcpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + tcp_notes: &mut TcpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcTcpConnectionTaskRemoteStats, - audit_ctx: &'a mut AuditContext, + audit_ctx: &mut AuditContext, ) -> TcpConnectResult { let primary_context = TlsConnectFailoverContext::new(audit_ctx); let mut primary_task = pin!(primary_context.run( diff --git a/g3proxy/src/escape/route_failover/udp_connect.rs b/g3proxy/src/escape/route_failover/udp_connect.rs index 5d3113b4..aa7f092c 100644 --- a/g3proxy/src/escape/route_failover/udp_connect.rs +++ b/g3proxy/src/escape/route_failover/udp_connect.rs @@ -65,11 +65,11 @@ impl UdpConnectFailoverContext { } impl RouteFailoverEscaper { - pub(super) async fn udp_setup_connection_with_failover<'a>( - &'a self, + pub(super) async fn udp_setup_connection_with_failover( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { let primary_context = UdpConnectFailoverContext::new(); diff --git a/g3proxy/src/escape/route_failover/udp_relay.rs b/g3proxy/src/escape/route_failover/udp_relay.rs index 3d0c3b68..9b23b8ed 100644 --- a/g3proxy/src/escape/route_failover/udp_relay.rs +++ b/g3proxy/src/escape/route_failover/udp_relay.rs @@ -65,11 +65,11 @@ impl UdpRelayFailoverContext { } impl RouteFailoverEscaper { - pub(super) async fn udp_setup_relay_with_failover<'a>( - &'a self, + pub(super) async fn udp_setup_relay_with_failover( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { let primary_context = UdpRelayFailoverContext::new(); diff --git a/g3proxy/src/escape/route_geoip/mod.rs b/g3proxy/src/escape/route_geoip/mod.rs index c43d1679..6fea5d0d 100644 --- a/g3proxy/src/escape/route_geoip/mod.rs +++ b/g3proxy/src/escape/route_geoip/mod.rs @@ -304,11 +304,11 @@ impl Escaper for RouteGeoIpEscaper { } } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { udp_notes.escaper.clone_from(&self.config.name); @@ -326,11 +326,11 @@ impl Escaper for RouteGeoIpEscaper { } } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { udp_notes.escaper.clone_from(&self.config.name); @@ -353,11 +353,11 @@ impl Escaper for RouteGeoIpEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, _escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { match self.select_next(task_conf.upstream).await { Ok(escaper) => { diff --git a/g3proxy/src/escape/route_mapping/mod.rs b/g3proxy/src/escape/route_mapping/mod.rs index c46692b9..91b4a5a2 100644 --- a/g3proxy/src/escape/route_mapping/mod.rs +++ b/g3proxy/src/escape/route_mapping/mod.rs @@ -152,11 +152,11 @@ impl Escaper for RouteMappingEscaper { .await } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { udp_notes.escaper.clone_from(&self.config.name); @@ -167,11 +167,11 @@ impl Escaper for RouteMappingEscaper { .await } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { udp_notes.escaper.clone_from(&self.config.name); @@ -187,11 +187,11 @@ impl Escaper for RouteMappingEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, _escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { let escaper = self.select_next(task_notes.egress_path()); self.stats.add_request_passed(); diff --git a/g3proxy/src/escape/route_query/mod.rs b/g3proxy/src/escape/route_query/mod.rs index 0f299b80..bcfa2fac 100644 --- a/g3proxy/src/escape/route_query/mod.rs +++ b/g3proxy/src/escape/route_query/mod.rs @@ -178,11 +178,11 @@ impl Escaper for RouteQueryEscaper { .await } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { udp_notes.escaper.clone_from(&self.config.name); @@ -193,11 +193,11 @@ impl Escaper for RouteQueryEscaper { .await } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { udp_notes.escaper.clone_from(&self.config.name); @@ -213,11 +213,11 @@ impl Escaper for RouteQueryEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, _escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { let escaper = self.select_next(task_notes, task_conf.upstream).await; self.stats.add_request_passed(); diff --git a/g3proxy/src/escape/route_resolved/mod.rs b/g3proxy/src/escape/route_resolved/mod.rs index 28790978..4c9b0632 100644 --- a/g3proxy/src/escape/route_resolved/mod.rs +++ b/g3proxy/src/escape/route_resolved/mod.rs @@ -219,11 +219,11 @@ impl Escaper for RouteResolvedEscaper { } } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { udp_notes.escaper.clone_from(&self.config.name); @@ -241,11 +241,11 @@ impl Escaper for RouteResolvedEscaper { } } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { udp_notes.escaper.clone_from(&self.config.name); @@ -268,11 +268,11 @@ impl Escaper for RouteResolvedEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, _escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { match self.select_next(task_conf.upstream).await { Ok(escaper) => { diff --git a/g3proxy/src/escape/route_select/mod.rs b/g3proxy/src/escape/route_select/mod.rs index df6309fe..e67e001e 100644 --- a/g3proxy/src/escape/route_select/mod.rs +++ b/g3proxy/src/escape/route_select/mod.rs @@ -208,11 +208,11 @@ impl Escaper for RouteSelectEscaper { } } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { udp_notes.escaper.clone_from(&self.config.name); @@ -230,11 +230,11 @@ impl Escaper for RouteSelectEscaper { } } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { udp_notes.escaper.clone_from(&self.config.name); @@ -257,11 +257,11 @@ impl Escaper for RouteSelectEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, _escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { match self.select_next(task_notes, task_conf.upstream) { Ok(escaper) => { diff --git a/g3proxy/src/escape/route_upstream/mod.rs b/g3proxy/src/escape/route_upstream/mod.rs index 40faf1d0..b7e477a1 100644 --- a/g3proxy/src/escape/route_upstream/mod.rs +++ b/g3proxy/src/escape/route_upstream/mod.rs @@ -256,11 +256,11 @@ impl Escaper for RouteUpstreamEscaper { .await } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { udp_notes.escaper.clone_from(&self.config.name); @@ -271,11 +271,11 @@ impl Escaper for RouteUpstreamEscaper { .await } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { udp_notes.escaper.clone_from(&self.config.name); @@ -291,11 +291,11 @@ impl Escaper for RouteUpstreamEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, _escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { let escaper = self.select_next(task_conf.upstream); self.stats.add_request_passed(); diff --git a/g3proxy/src/escape/trick_float/mod.rs b/g3proxy/src/escape/trick_float/mod.rs index d3a3f0d8..d5519a42 100644 --- a/g3proxy/src/escape/trick_float/mod.rs +++ b/g3proxy/src/escape/trick_float/mod.rs @@ -163,11 +163,11 @@ impl Escaper for TrickFloatEscaper { } } - async fn udp_setup_connection<'a>( - &'a self, + async fn udp_setup_connection( + &self, task_conf: &UdpConnectTaskConf<'_>, - udp_notes: &'a mut UdpConnectTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpConnectTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpConnectTaskRemoteStats, ) -> UdpConnectResult { udp_notes.escaper.clone_from(&self.config.name); @@ -185,11 +185,11 @@ impl Escaper for TrickFloatEscaper { } } - async fn udp_setup_relay<'a>( - &'a self, + async fn udp_setup_relay( + &self, task_conf: &UdpRelayTaskConf<'_>, - udp_notes: &'a mut UdpRelayTaskNotes, - task_notes: &'a ServerTaskNotes, + udp_notes: &mut UdpRelayTaskNotes, + task_notes: &ServerTaskNotes, task_stats: ArcUdpRelayTaskRemoteStats, ) -> UdpRelaySetupResult { udp_notes.escaper.clone_from(&self.config.name); @@ -212,11 +212,11 @@ impl Escaper for TrickFloatEscaper { Box::new(ctx) } - async fn new_ftp_connect_context<'a>( - &'a self, + async fn new_ftp_connect_context( + &self, _escaper: ArcEscaper, task_conf: &TcpConnectTaskConf<'_>, - task_notes: &'a ServerTaskNotes, + task_notes: &ServerTaskNotes, ) -> BoxFtpConnectContext { match self.random_next() { Ok(escaper) => {