mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-06-10 00:27:46 +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()),
|
IpAddr::V6(ip) => self.server_outbuf.extend(ip.octets().as_ref()),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
DestinationHost::Hostname(_) => {
|
DestinationHost::Hostname(host) => {
|
||||||
self.server_outbuf
|
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(&[
|
self.server_outbuf.extend(&[
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue