get_credentials removed

This commit is contained in:
ssrlive 2023-09-02 21:26:58 +08:00
parent 2122cc0ba8
commit 59fa5b155e
3 changed files with 3 additions and 12 deletions

View file

@ -346,17 +346,13 @@ impl ConnectionManager for SocksProxyManager {
fn new_proxy_handler(&self, info: &ConnectionInfo, udp_associate: bool) -> Result<Box<dyn ProxyHandler>> {
use socks5_impl::protocol::Command::{Connect, UdpAssociate};
let command = if udp_associate { UdpAssociate } else { Connect };
let credentials = self.get_credentials().clone();
let credentials = self.credentials.clone();
Ok(Box::new(SocksProxyImpl::new(info, credentials, self.version, command)?))
}
fn get_server_addr(&self) -> SocketAddr {
self.server
}
fn get_credentials(&self) -> &Option<UserKey> {
&self.credentials
}
}
impl SocksProxyManager {