diff options
author | arindam@chromium.org <arindam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-23 02:59:02 +0000 |
---|---|---|
committer | arindam@chromium.org <arindam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-23 02:59:02 +0000 |
commit | 3cd172426ed848f689a3c1363ed7832179ef7919 (patch) | |
tree | 56932a311fc046c8d3551b6449066dd1bc3375e8 /net/proxy/proxy_server_unittest.cc | |
parent | d9117760905f5b6b5979cba386a2b8c41fe7699c (diff) | |
download | chromium_src-3cd172426ed848f689a3c1363ed7832179ef7919.zip chromium_src-3cd172426ed848f689a3c1363ed7832179ef7919.tar.gz chromium_src-3cd172426ed848f689a3c1363ed7832179ef7919.tar.bz2 |
Adding socks4 support for chromium. tested for windows and linux.
includes socks4, socks4a
TEST=change proxy settings to use proxy and set only the socks proxy fields (others must remain blank). Use CCProxy for windows or 'ssh -D' for linux / cygwin if trying it via localhost.
Browser should successfully open both http and https URLs.
tests are also at HttpNetworkTransactionTest.SOCKS*
BUG=none
Review URL: http://codereview.chromium.org/113811
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19005 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_server_unittest.cc')
-rw-r--r-- | net/proxy/proxy_server_unittest.cc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/net/proxy/proxy_server_unittest.cc b/net/proxy/proxy_server_unittest.cc index ad3fad5..3257851 100644 --- a/net/proxy/proxy_server_unittest.cc +++ b/net/proxy/proxy_server_unittest.cc @@ -125,6 +125,26 @@ TEST(ProxyServerTest, FromURI) { "foopy:10", "SOCKS5 foopy:10" }, + + // SOCKS proxy URIs (should default to SOCKS4) + { + "socks://foopy", // No port. + "socks4://foopy:1080", + net::ProxyServer::SCHEME_SOCKS4, + "foopy", + 1080, + "foopy:1080", + "SOCKS foopy:1080" + }, + { + "socks://foopy:10", + "socks4://foopy:10", + net::ProxyServer::SCHEME_SOCKS4, + "foopy", + 10, + "foopy:10", + "SOCKS foopy:10" + }, }; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { @@ -162,7 +182,6 @@ TEST(ProxyServerTest, Invalid) { " ", "dddf:", // not a valid port "dddd:d", // not a valid port - "socks://foopy", // not a valid scheme (needs to be socks4 or sock5). "http://", // not a valid host/port. "direct://xyz", // direct is not allowed a host/port. "http:/", // ambiguous, but will fail because of bad port. |