mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-04-22 14:59:09 +00:00
minor changes
This commit is contained in:
parent
1031f586f7
commit
4ebd019cb5
1 changed files with 0 additions and 9 deletions
|
@ -33,8 +33,6 @@ struct SocksProxyImpl {
|
||||||
data_buf: VecDeque<u8>,
|
data_buf: VecDeque<u8>,
|
||||||
version: Version,
|
version: Version,
|
||||||
credentials: Option<UserKey>,
|
credentials: Option<UserKey>,
|
||||||
command: protocol::Command,
|
|
||||||
udp_relay_addr: Option<Address>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SocksProxyImpl {
|
impl SocksProxyImpl {
|
||||||
|
@ -53,8 +51,6 @@ impl SocksProxyImpl {
|
||||||
data_buf: VecDeque::default(),
|
data_buf: VecDeque::default(),
|
||||||
version,
|
version,
|
||||||
credentials,
|
credentials,
|
||||||
command: protocol::Command::Connect,
|
|
||||||
udp_relay_addr: None,
|
|
||||||
};
|
};
|
||||||
result.send_client_hello()?;
|
result.send_client_hello()?;
|
||||||
Ok(result)
|
Ok(result)
|
||||||
|
@ -221,11 +217,6 @@ impl SocksProxyImpl {
|
||||||
return Err(format!("SOCKS connection failed: {}", response.reply).into());
|
return Err(format!("SOCKS connection failed: {}", response.reply).into());
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.command == protocol::Command::UdpAssociate {
|
|
||||||
log::info!("UDP packet destination: {}", response.address);
|
|
||||||
self.udp_relay_addr = Some(response.address);
|
|
||||||
}
|
|
||||||
|
|
||||||
self.server_outbuf.append(&mut self.data_buf);
|
self.server_outbuf.append(&mut self.data_buf);
|
||||||
self.data_buf.clear();
|
self.data_buf.clear();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue