merged SOCKS4 fix into trunk
This commit is contained in:
parent
6bd58da567
commit
4284606cbc
|
@ -89,6 +89,7 @@
|
||||||
* fix uTP edge case where udp socket buffer fills up
|
* fix uTP edge case where udp socket buffer fills up
|
||||||
* fix nagle implementation in uTP
|
* fix nagle implementation in uTP
|
||||||
|
|
||||||
|
* SOCKS4 fix for trying to connect over IPv6
|
||||||
* fix saving resume data when removing all trackers
|
* fix saving resume data when removing all trackers
|
||||||
* fix bug in udp_socket when changing socks5 proxy quickly
|
* fix bug in udp_socket when changing socks5 proxy quickly
|
||||||
|
|
||||||
|
|
|
@ -293,6 +293,14 @@ namespace libtorrent
|
||||||
}
|
}
|
||||||
else if (m_version == 4)
|
else if (m_version == 4)
|
||||||
{
|
{
|
||||||
|
// SOCKS4 only supports IPv4
|
||||||
|
if (!m_remote_endpoint.address().is_v4())
|
||||||
|
{
|
||||||
|
(*h)(error_code(boost::asio::error::address_family_not_supported));
|
||||||
|
error_code ec;
|
||||||
|
close(ec);
|
||||||
|
return;
|
||||||
|
}
|
||||||
m_buffer.resize(m_user.size() + 9);
|
m_buffer.resize(m_user.size() + 9);
|
||||||
char* p = &m_buffer[0];
|
char* p = &m_buffer[0];
|
||||||
write_uint8(4, p); // SOCKS VERSION 4
|
write_uint8(4, p); // SOCKS VERSION 4
|
||||||
|
|
Loading…
Reference in New Issue