OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SOCKET_SOCKS5_CLIENT_SOCKET_H_ | 5 #ifndef NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ |
6 #define NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ | 6 #define NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "net/base/address_list.h" | 16 #include "net/base/address_list.h" |
17 #include "net/base/completion_callback.h" | 17 #include "net/base/completion_callback.h" |
18 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
19 #include "net/dns/host_resolver.h" | 19 #include "net/dns/host_resolver.h" |
20 #include "net/log/net_log.h" | 20 #include "net/log/net_log_with_source.h" |
21 #include "net/socket/stream_socket.h" | 21 #include "net/socket/stream_socket.h" |
22 #include "url/gurl.h" | 22 #include "url/gurl.h" |
23 | 23 |
24 namespace net { | 24 namespace net { |
25 | 25 |
26 class ClientSocketHandle; | 26 class ClientSocketHandle; |
27 class NetLogWithSource; | |
28 | 27 |
29 // This StreamSocket is used to setup a SOCKSv5 handshake with a socks proxy. | 28 // This StreamSocket is used to setup a SOCKSv5 handshake with a socks proxy. |
30 // Currently no SOCKSv5 authentication is supported. | 29 // Currently no SOCKSv5 authentication is supported. |
31 class NET_EXPORT_PRIVATE SOCKS5ClientSocket : public StreamSocket { | 30 class NET_EXPORT_PRIVATE SOCKS5ClientSocket : public StreamSocket { |
32 public: | 31 public: |
33 // |req_info| contains the hostname and port to which the socket above will | 32 // |req_info| contains the hostname and port to which the socket above will |
34 // communicate to via the SOCKS layer. | 33 // communicate to via the SOCKS layer. |
35 // | 34 // |
36 // Although SOCKS 5 supports 3 different modes of addressing, we will | 35 // Although SOCKS 5 supports 3 different modes of addressing, we will |
37 // always pass it a hostname. This means the DNS resolving is done | 36 // always pass it a hostname. This means the DNS resolving is done |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 HostResolver::RequestInfo host_request_info_; | 153 HostResolver::RequestInfo host_request_info_; |
155 | 154 |
156 NetLogWithSource net_log_; | 155 NetLogWithSource net_log_; |
157 | 156 |
158 DISALLOW_COPY_AND_ASSIGN(SOCKS5ClientSocket); | 157 DISALLOW_COPY_AND_ASSIGN(SOCKS5ClientSocket); |
159 }; | 158 }; |
160 | 159 |
161 } // namespace net | 160 } // namespace net |
162 | 161 |
163 #endif // NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ | 162 #endif // NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ |
OLD | NEW |