forked from premiere/premiere-libtorrent
more fixing of test_transfer proxy tests
This commit is contained in:
parent
7fdc2e6308
commit
dcd6af6473
|
@ -560,12 +560,12 @@ namespace libtorrent
|
|||
|
||||
// If true, disables any communication that's not going over a proxy.
|
||||
// Enabling this requires a proxy to be configured as well, see
|
||||
// ``set_proxy_settings``. The listen sockets are closed, and incoming
|
||||
// connections will only be accepted through a SOCKS5 or I2P proxy (if
|
||||
// a peer proxy is set up and is run on the same machine as the
|
||||
// tracker proxy). This setting also disabled peer country lookups,
|
||||
// since those are done via DNS lookups that aren't supported by
|
||||
// proxies.
|
||||
// proxy_type and proxy_hostname settings. The listen sockets are
|
||||
// closed, and incoming connections will only be accepted through a
|
||||
// SOCKS5 or I2P proxy (if a peer proxy is set up and is run on the
|
||||
// same machine as the tracker proxy). This setting also disabled peer
|
||||
// country lookups, since those are done via DNS lookups that aren't
|
||||
// supported by proxies.
|
||||
force_proxy,
|
||||
|
||||
// if false, prevents libtorrent to advertise share-mode support
|
||||
|
|
|
@ -2221,7 +2221,7 @@ retry:
|
|||
|
||||
void session_impl::open_new_incoming_socks_connection()
|
||||
{
|
||||
int proxy_type = m_settings.get_int(settings_pack::proxy_type);
|
||||
int const proxy_type = m_settings.get_int(settings_pack::proxy_type);
|
||||
|
||||
if (proxy_type != settings_pack::socks5
|
||||
&& proxy_type != settings_pack::socks5_pw
|
||||
|
@ -2231,7 +2231,7 @@ retry:
|
|||
if (m_socks_listen_socket) return;
|
||||
|
||||
m_socks_listen_socket = boost::shared_ptr<socket_type>(new socket_type(m_io_service));
|
||||
bool ret = instantiate_connection(m_io_service, proxy()
|
||||
bool const ret = instantiate_connection(m_io_service, proxy()
|
||||
, *m_socks_listen_socket, NULL, NULL, false, false);
|
||||
TORRENT_ASSERT_VAL(ret, ret);
|
||||
TORRENT_UNUSED(ret);
|
||||
|
|
|
@ -169,6 +169,7 @@ void test_transfer(int proxy_type, settings_pack const& sett
|
|||
pack.set_str(settings_pack::proxy_password, "testpass");
|
||||
pack.set_int(settings_pack::proxy_type, proxy_type);
|
||||
pack.set_int(settings_pack::proxy_port, proxy_port);
|
||||
pack.set_bool(settings_pack::force_proxy, true);
|
||||
|
||||
// test resetting the proxy in quick succession.
|
||||
// specifically the udp_socket connecting to a new
|
||||
|
@ -176,14 +177,8 @@ void test_transfer(int proxy_type, settings_pack const& sett
|
|||
// in progress.
|
||||
pack.set_str(settings_pack::proxy_hostname, "5.6.7.8");
|
||||
ses1.apply_settings(pack);
|
||||
|
||||
pack.set_str(settings_pack::proxy_hostname, "127.0.0.1");
|
||||
ses1.apply_settings(pack);
|
||||
ses2.apply_settings(pack);
|
||||
|
||||
// ses1 is connecting to ses2, so only ses1 should be using the proxy
|
||||
pack.set_int(settings_pack::proxy_type, settings_pack::none);
|
||||
ses1.apply_settings(pack);
|
||||
}
|
||||
|
||||
pack = sett;
|
||||
|
|
Loading…
Reference in New Issue