From fffc900f78a191970c4eebced9c1af016a9ea6f4 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Fri, 20 Apr 2012 15:04:29 +0100 Subject: Windows - "bypass proxy for local..." also affects IP addresses If the "bypass proxy for local addresses" option is enabled in the windows proxy configuration, then do not use the proxy for any IP address in the subnet of any network interface. As the systemProxyForQuery api is now offering HTTP proxy tunnels for TCP sockets, this change avoids local ad-hoc network connections being routed through the proxy. In the case where the local address was on a different interface to the proxy server, it may have been unreachable through the proxy. For example IP over USB or Bluetooth. Change-Id: I0842732832a7795112be029d923ed168edc008d6 Reviewed-by: Thiago Macieira --- .../network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp b/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp index 9b7d21eff8..d8f5a0428f 100644 --- a/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp +++ b/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp @@ -133,6 +133,10 @@ void tst_QNetworkProxyFactory::systemProxyForQuery_data() QTest::newRow("imap") << (int)QNetworkProxyQuery::TcpSocket << QUrl() << QString() << QString("qt-project.org") << 0 << (int)QNetworkProxy::TunnelingCapability; QTest::newRow("autobind-server") << (int)QNetworkProxyQuery::TcpServer << QUrl() << QString() << QString() << 0 << (int)QNetworkProxy::ListeningCapability; QTest::newRow("web-server") << (int)QNetworkProxyQuery::TcpServer << QUrl() << QString() << QString() << 80 << (int)QNetworkProxy::ListeningCapability; + //windows: these should be bypassed if "bypass proxy server for local addresses" is ticked + foreach (QHostAddress address, QNetworkInterface::allAddresses()) { + QTest::newRow(qPrintable(address.toString())) << (int)QNetworkProxyQuery::TcpSocket << QUrl() << QString() << address.toString() << 0 << 0; + } //UDP QTest::newRow("udp") << (int)QNetworkProxyQuery::UdpSocket << QUrl() << QString() << QString() << 0 << (int)QNetworkProxy::UdpTunnelingCapability; -- cgit v1.2.3