OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_PROXY_PROXY_SERVER_H_ | 5 #ifndef NET_PROXY_PROXY_SERVER_H_ |
6 #define NET_PROXY_PROXY_SERVER_H_ | 6 #define NET_PROXY_PROXY_SERVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // [<scheme>"://"]<server>[":"<port>] | 65 // [<scheme>"://"]<server>[":"<port>] |
66 // | 66 // |
67 // Both <scheme> and <port> are optional. If <scheme> is omitted, it will be | 67 // Both <scheme> and <port> are optional. If <scheme> is omitted, it will be |
68 // assumed as |default_scheme|. If <port> is omitted, it will be assumed as | 68 // assumed as |default_scheme|. If <port> is omitted, it will be assumed as |
69 // the default port for the chosen scheme (80 for "http", 1080 for "socks"). | 69 // the default port for the chosen scheme (80 for "http", 1080 for "socks"). |
70 // | 70 // |
71 // If parsing fails the instance will be set to invalid. | 71 // If parsing fails the instance will be set to invalid. |
72 // | 72 // |
73 // Examples (for |default_scheme| = SCHEME_HTTP ): | 73 // Examples (for |default_scheme| = SCHEME_HTTP ): |
74 // "foopy" {scheme=HTTP, host="foopy", port=80} | 74 // "foopy" {scheme=HTTP, host="foopy", port=80} |
| 75 // "socks://foopy" {scheme=SOCKS5, host="foopy", port=1080} |
75 // "socks4://foopy" {scheme=SOCKS4, host="foopy", port=1080} | 76 // "socks4://foopy" {scheme=SOCKS4, host="foopy", port=1080} |
76 // "socks5://foopy" {scheme=SOCKS5, host="foopy", port=1080} | 77 // "socks5://foopy" {scheme=SOCKS5, host="foopy", port=1080} |
77 // "http://foopy:17" {scheme=HTTP, host="foopy", port=17} | 78 // "http://foopy:17" {scheme=HTTP, host="foopy", port=17} |
78 // "https://foopy:17" {scheme=HTTPS, host="foopy", port=17} | 79 // "https://foopy:17" {scheme=HTTPS, host="foopy", port=17} |
79 // "direct://" {scheme=DIRECT} | 80 // "direct://" {scheme=DIRECT} |
80 // "foopy:X" INVALID -- bad port. | 81 // "foopy:X" INVALID -- bad port. |
81 static ProxyServer FromURI(const std::string& uri, Scheme default_scheme); | 82 static ProxyServer FromURI(const std::string& uri, Scheme default_scheme); |
82 static ProxyServer FromURI(std::string::const_iterator uri_begin, | 83 static ProxyServer FromURI(std::string::const_iterator uri_begin, |
83 std::string::const_iterator uri_end, | 84 std::string::const_iterator uri_end, |
84 Scheme default_scheme); | 85 Scheme default_scheme); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 std::string::const_iterator host_and_port_begin, | 148 std::string::const_iterator host_and_port_begin, |
148 std::string::const_iterator host_and_port_end); | 149 std::string::const_iterator host_and_port_end); |
149 | 150 |
150 Scheme scheme_; | 151 Scheme scheme_; |
151 HostPortPair host_port_pair_; | 152 HostPortPair host_port_pair_; |
152 }; | 153 }; |
153 | 154 |
154 } // namespace net | 155 } // namespace net |
155 | 156 |
156 #endif // NET_PROXY_PROXY_SERVER_H_ | 157 #endif // NET_PROXY_PROXY_SERVER_H_ |
OLD | NEW |