mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-04-21 22:39:08 +00:00
Fix UDP associate address
This commit is contained in:
parent
9ad22fc419
commit
d5b76c18cc
1 changed files with 7 additions and 1 deletions
|
@ -203,7 +203,13 @@ impl SocksProxyImpl {
|
|||
}
|
||||
|
||||
fn send_request_socks5(&mut self) -> Result<(), Error> {
|
||||
protocol::Request::new(self.command, self.info.dst.clone()).write_to_stream(&mut self.server_outbuf)?;
|
||||
use socks5_impl::protocol::Command::UdpAssociate;
|
||||
let addr = if self.command == UdpAssociate {
|
||||
Address::unspecified()
|
||||
} else {
|
||||
self.info.dst.clone()
|
||||
};
|
||||
protocol::Request::new(self.command, addr).write_to_stream(&mut self.server_outbuf)?;
|
||||
self.state = SocksState::ReceiveResponse;
|
||||
self.state_change()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue