mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-04-19 05:19:09 +00:00
Fix SOCKS5 domain name address type sending
This commit is contained in:
parent
1a5eeece6f
commit
56d0dd9d42
1 changed files with 3 additions and 2 deletions
|
@ -205,9 +205,10 @@ impl SocksConnection {
|
|||
IpAddr::V6(ip) => self.server_outbuf.extend(ip.octets().as_ref()),
|
||||
};
|
||||
}
|
||||
DestinationHost::Hostname(_) => {
|
||||
DestinationHost::Hostname(host) => {
|
||||
self.server_outbuf
|
||||
.extend(&[SocksAddressType::DomainName as u8]);
|
||||
.extend(&[SocksAddressType::DomainName as u8, host.len() as u8]);
|
||||
self.server_outbuf.extend(host.as_bytes());
|
||||
}
|
||||
}
|
||||
self.server_outbuf.extend(&[
|
||||
|
|
Loading…
Add table
Reference in a new issue