mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-06-23 09:30:54 +00:00
get_credentials removed
This commit is contained in:
parent
2122cc0ba8
commit
59fa5b155e
3 changed files with 3 additions and 12 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue