summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/proxy/proxy_server.cc')
-rw-r--r--net/proxy/proxy_server.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/proxy/proxy_server.cc b/net/proxy/proxy_server.cc
index ba45ff2..b78c347 100644
--- a/net/proxy/proxy_server.cc
+++ b/net/proxy/proxy_server.cc
@@ -34,6 +34,8 @@ ProxyServer::Scheme GetSchemeFromPacType(std::string::const_iterator begin,
return ProxyServer::SCHEME_SOCKS5;
if (LowerCaseEqualsASCII(begin, end, "direct"))
return ProxyServer::SCHEME_DIRECT;
+ if (LowerCaseEqualsASCII(begin, end, "https"))
+ return ProxyServer::SCHEME_HTTPS;
return ProxyServer::SCHEME_INVALID;
}
@@ -53,6 +55,8 @@ ProxyServer::Scheme GetSchemeFromURI(std::string::const_iterator begin,
return ProxyServer::SCHEME_SOCKS5;
if (LowerCaseEqualsASCII(begin, end, "direct"))
return ProxyServer::SCHEME_DIRECT;
+ if (LowerCaseEqualsASCII(begin, end, "https"))
+ return ProxyServer::SCHEME_HTTPS;
return ProxyServer::SCHEME_INVALID;
}
@@ -132,6 +136,8 @@ std::string ProxyServer::ToURI() const {
return std::string("socks4://") + host_and_port();
case SCHEME_SOCKS5:
return std::string("socks5://") + host_and_port();
+ case SCHEME_HTTPS:
+ return std::string("https://") + host_and_port();
default:
// Got called with an invalid scheme.
NOTREACHED();
@@ -180,6 +186,8 @@ std::string ProxyServer::ToPacString() const {
return std::string("SOCKS ") + host_and_port();
case SCHEME_SOCKS5:
return std::string("SOCKS5 ") + host_and_port();
+ case SCHEME_HTTPS:
+ return std::string("HTTPS ") + host_and_port();
default:
// Got called with an invalid scheme.
NOTREACHED();
@@ -195,6 +203,8 @@ int ProxyServer::GetDefaultPortForScheme(Scheme scheme) {
case SCHEME_SOCKS4:
case SCHEME_SOCKS5:
return 1080;
+ case SCHEME_HTTPS:
+ return 443;
default:
return -1;
}