OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::HTTPProxyTransport::Client Class Reference

#include <httpcli.hpp>

Inheritance diagram for openvpn::HTTPProxyTransport::Client:
[legend]
Collaboration diagram for openvpn::HTTPProxyTransport::Client:
[legend]

Classes

struct  ProxyResponseLimit
 

Public Member Functions

void transport_start () override
 
bool transport_send_const (const Buffer &buf) override
 
bool transport_send (BufferAllocated &buf) override
 
bool transport_send_queue_empty () override
 
bool transport_has_send_queue () override
 
void transport_stop_requeueing () override
 
size_t transport_send_queue_size () override
 
void reset_align_adjust (const size_t align_adjust) override
 
void server_endpoint_info (std::string &host, std::string &port, std::string &proto, std::string &ip_addr) const override
 
IP::Addr server_endpoint_addr () const override
 
Protocol transport_protocol () const override
 
void stop () override
 
virtual ~Client ()
 
- Public Member Functions inherited from openvpn::TransportClient
virtual unsigned short server_endpoint_port () const
 
virtual openvpn_io::detail::socket_type native_handle ()
 
- Public Member Functions inherited from openvpn::RC< thread_unsafe_refcount >
 RC () noexcept=default
 
 RC (const RC &)=delete
 
virtual ~RC ()=default
 
RCoperator= (const RC &)=delete
 
olong use_count () const noexcept
 Delegates call to RCImpl and returns the result.
 

Private Types

typedef RCPtr< ClientPtr
 
typedef TCPTransport::TCPLink< openvpn_io::ip::tcp, Client *, false > LinkImpl
 
- Private Types inherited from openvpn::AsyncResolvable< RESOLVER_TYPE >
using resolver_type = RESOLVER_TYPE
 
using results_type = typename RESOLVER_TYPE::results_type
 
using resolver_type = RESOLVER_TYPE
 
using results_type = typename RESOLVER_TYPE::results_type
 
- Private Types inherited from openvpn::RC< thread_unsafe_refcount >
typedef RCPtr< RCPtr
 

Private Member Functions

 Client (openvpn_io::io_context &io_context_arg, ClientConfig *config_arg, TransportClientParent *parent_arg)
 
void transport_reparent (TransportClientParent *parent_arg) override
 
bool send_const (const Buffer &cbuf)
 
bool send (BufferAllocated &buf)
 
void tcp_error_handler (const char *error)
 
void proxy_error (const Error::Type fatal_err, const std::string &what)
 
bool tcp_read_handler (BufferAllocated &buf)
 
void tcp_write_queue_needs_send ()
 
void tcp_eof_handler ()
 
void proxy_read_handler (BufferAllocated &buf)
 
void proxy_connected (BufferAllocated &buf, const bool notify_parent)
 
void proxy_half_connected ()
 
void drain_html (BufferAllocated &buf)
 
HTTPProxy::ProxyAuthenticate::Ptr get_proxy_authenticate_header (const char *type)
 
void proxy_eof_handler ()
 
void basic_auth (HTTPProxy::ProxyAuthenticate &pa)
 
void digest_auth (HTTPProxy::ProxyAuthenticate &pa)
 
std::string get_ntlm_phase_2_response ()
 
void ntlm_auth_phase_1 (HTTPProxy::ProxyAuthenticate &pa)
 
void ntlm_auth_phase_2_pre ()
 
void ntlm_auth_phase_2 ()
 
void ntlm_auth_phase_3 (const std::string &phase_2_response)
 
void gen_headers (std::ostringstream &os)
 
void stop_ ()
 
void resolve_callback (const openvpn_io::error_code &error, results_type results) override
 
void reset ()
 
void reset_partial ()
 
void start_connect_ ()
 
void start_impl_ (const openvpn_io::error_code &error)
 
void http_proxy_send ()
 
void create_http_connect_msg (BufferAllocated &buf)
 
RemoteListremote_list () const
 
RemoteListproxy_remote_list () const
 
- Private Member Functions inherited from openvpn::AsyncResolvable< RESOLVER_TYPE >
 AsyncResolvable (openvpn_io::io_context &io_context_arg)
 
virtual ~AsyncResolvable ()
 
virtual void async_resolve_name (const std::string &host, const std::string &port)
 
void async_resolve_lock ()
 
void async_resolve_cancel ()
 
 AsyncResolvable (openvpn_io::io_context &io_context_arg)
 
virtual void async_resolve_name (const std::string &host, const std::string &port)
 
void async_resolve_lock ()
 
void async_resolve_cancel ()
 
- Private Member Functions inherited from openvpn::RC< thread_unsafe_refcount >
 RC () noexcept=default
 
 RC (const RC &)=delete
 
virtual ~RC ()=default
 
RCoperator= (const RC &)=delete
 
olong use_count () const noexcept
 Delegates call to RCImpl and returns the result.
 

Private Attributes

std::string proxy_host
 
std::string proxy_port
 
std::string server_host
 
std::string server_port
 
openvpn_io::ip::tcp::socket socket
 
ClientConfig::Ptr config
 
TransportClientParentparent
 
LinkImpl::Ptr impl
 
LinkImpl::protocol::endpoint server_endpoint
 
bool halt
 
unsigned int n_transactions
 
ProxyResponseLimit proxy_response_limit
 
bool proxy_established
 
HTTP::ReplyParser::status http_reply_status
 
HTTP::Reply http_reply
 
HTTP::ReplyParser http_parser
 
std::string http_request
 
bool ntlm_phase_2_response_pending
 
size_t drain_content_length
 
std::unique_ptr< HTTP::HTMLSkiphtml_skip
 

Friends

class ClientConfig
 

Additional Inherited Members

- Public Types inherited from openvpn::TransportClient
typedef RCPtr< TransportClientPtr
 
- Public Types inherited from openvpn::RC< thread_unsafe_refcount >
typedef RCPtr< RCPtr
 
- Static Public Member Functions inherited from openvpn::RC< thread_unsafe_refcount >
static constexpr bool is_thread_safe ()
 Delegates call to RCImpl and returns the result.
 
- Static Private Member Functions inherited from openvpn::RC< thread_unsafe_refcount >
static constexpr bool is_thread_safe ()
 Delegates call to RCImpl and returns the result.
 

Detailed Description

Definition at line 236 of file httpcli.hpp.

Member Typedef Documentation

◆ LinkImpl

typedef TCPTransport::TCPLink<openvpn_io::ip::tcp, Client *, false> openvpn::HTTPProxyTransport::Client::LinkImpl
private

Definition at line 240 of file httpcli.hpp.

◆ Ptr

Definition at line 238 of file httpcli.hpp.

Constructor & Destructor Documentation

◆ ~Client()

virtual openvpn::HTTPProxyTransport::Client::~Client ( )
inlinevirtual

Definition at line 350 of file httpcli.hpp.

◆ Client()

openvpn::HTTPProxyTransport::Client::Client ( openvpn_io::io_context &  io_context_arg,
ClientConfig config_arg,
TransportClientParent parent_arg 
)
inlineprivate

Definition at line 374 of file httpcli.hpp.

Member Function Documentation

◆ basic_auth()

void openvpn::HTTPProxyTransport::Client::basic_auth ( HTTPProxy::ProxyAuthenticate pa)
inlineprivate

Definition at line 690 of file httpcli.hpp.

Here is the caller graph for this function:

◆ create_http_connect_msg()

void openvpn::HTTPProxyTransport::Client::create_http_connect_msg ( BufferAllocated buf)
inlineprivate

Definition at line 1030 of file httpcli.hpp.

Here is the caller graph for this function:

◆ digest_auth()

void openvpn::HTTPProxyTransport::Client::digest_auth ( HTTPProxy::ProxyAuthenticate pa)
inlineprivate

Definition at line 705 of file httpcli.hpp.

Here is the caller graph for this function:

◆ drain_html()

void openvpn::HTTPProxyTransport::Client::drain_html ( BufferAllocated buf)
inlineprivate

Definition at line 577 of file httpcli.hpp.

Here is the caller graph for this function:

◆ gen_headers()

void openvpn::HTTPProxyTransport::Client::gen_headers ( std::ostringstream &  os)
inlineprivate

Definition at line 866 of file httpcli.hpp.

Here is the caller graph for this function:

◆ get_ntlm_phase_2_response()

std::string openvpn::HTTPProxyTransport::Client::get_ntlm_phase_2_response ( )
inlineprivate

Definition at line 771 of file httpcli.hpp.

Here is the caller graph for this function:

◆ get_proxy_authenticate_header()

HTTPProxy::ProxyAuthenticate::Ptr openvpn::HTTPProxyTransport::Client::get_proxy_authenticate_header ( const char *  type)
inlineprivate

Definition at line 598 of file httpcli.hpp.

Here is the caller graph for this function:

◆ http_proxy_send()

void openvpn::HTTPProxyTransport::Client::http_proxy_send ( )
inlineprivate

Definition at line 1022 of file httpcli.hpp.

Here is the caller graph for this function:

◆ ntlm_auth_phase_1()

void openvpn::HTTPProxyTransport::Client::ntlm_auth_phase_1 ( HTTPProxy::ProxyAuthenticate pa)
inlineprivate

Definition at line 786 of file httpcli.hpp.

Here is the caller graph for this function:

◆ ntlm_auth_phase_2()

void openvpn::HTTPProxyTransport::Client::ntlm_auth_phase_2 ( )
inlineprivate

Definition at line 815 of file httpcli.hpp.

Here is the caller graph for this function:

◆ ntlm_auth_phase_2_pre()

void openvpn::HTTPProxyTransport::Client::ntlm_auth_phase_2_pre ( )
inlineprivate

Definition at line 804 of file httpcli.hpp.

Here is the caller graph for this function:

◆ ntlm_auth_phase_3()

void openvpn::HTTPProxyTransport::Client::ntlm_auth_phase_3 ( const std::string &  phase_2_response)
inlineprivate

Definition at line 829 of file httpcli.hpp.

Here is the caller graph for this function:

◆ proxy_connected()

void openvpn::HTTPProxyTransport::Client::proxy_connected ( BufferAllocated buf,
const bool  notify_parent 
)
inlineprivate

Definition at line 536 of file httpcli.hpp.

Here is the caller graph for this function:

◆ proxy_eof_handler()

void openvpn::HTTPProxyTransport::Client::proxy_eof_handler ( )
inlineprivate

Definition at line 613 of file httpcli.hpp.

Here is the caller graph for this function:

◆ proxy_error()

void openvpn::HTTPProxyTransport::Client::proxy_error ( const Error::Type  fatal_err,
const std::string &  what 
)
inlineprivate

Definition at line 422 of file httpcli.hpp.

Here is the caller graph for this function:

◆ proxy_half_connected()

void openvpn::HTTPProxyTransport::Client::proxy_half_connected ( )
inlineprivate

Definition at line 569 of file httpcli.hpp.

Here is the caller graph for this function:

◆ proxy_read_handler()

void openvpn::HTTPProxyTransport::Client::proxy_read_handler ( BufferAllocated buf)
inlineprivate

Definition at line 479 of file httpcli.hpp.

Here is the caller graph for this function:

◆ proxy_remote_list()

RemoteList & openvpn::HTTPProxyTransport::Client::proxy_remote_list ( ) const
inlineprivate

Definition at line 1058 of file httpcli.hpp.

Here is the caller graph for this function:

◆ remote_list()

RemoteList & openvpn::HTTPProxyTransport::Client::remote_list ( ) const
inlineprivate

Definition at line 1054 of file httpcli.hpp.

Here is the caller graph for this function:

◆ reset()

void openvpn::HTTPProxyTransport::Client::reset ( )
inlineprivate

Definition at line 943 of file httpcli.hpp.

Here is the caller graph for this function:

◆ reset_align_adjust()

void openvpn::HTTPProxyTransport::Client::reset_align_adjust ( const size_t  align_adjust)
inlineoverridevirtual

Implements openvpn::TransportClient.

Definition at line 314 of file httpcli.hpp.

◆ reset_partial()

void openvpn::HTTPProxyTransport::Client::reset_partial ( )
inlineprivate

Definition at line 952 of file httpcli.hpp.

Here is the caller graph for this function:

◆ resolve_callback()

void openvpn::HTTPProxyTransport::Client::resolve_callback ( const openvpn_io::error_code &  error,
results_type  results 
)
inlineoverrideprivatevirtual

Implements openvpn::AsyncResolvable< RESOLVER_TYPE >.

Definition at line 918 of file httpcli.hpp.

◆ send()

bool openvpn::HTTPProxyTransport::Client::send ( BufferAllocated buf)
inlineprivate

Definition at line 406 of file httpcli.hpp.

Here is the caller graph for this function:

◆ send_const()

bool openvpn::HTTPProxyTransport::Client::send_const ( const Buffer cbuf)
inlineprivate

Definition at line 395 of file httpcli.hpp.

Here is the caller graph for this function:

◆ server_endpoint_addr()

IP::Addr openvpn::HTTPProxyTransport::Client::server_endpoint_addr ( ) const
inlineoverridevirtual

Implements openvpn::TransportClient.

Definition at line 331 of file httpcli.hpp.

Here is the caller graph for this function:

◆ server_endpoint_info()

void openvpn::HTTPProxyTransport::Client::server_endpoint_info ( std::string &  host,
std::string &  port,
std::string &  proto,
std::string &  ip_addr 
) const
inlineoverridevirtual

Implements openvpn::TransportClient.

Definition at line 320 of file httpcli.hpp.

◆ start_connect_()

void openvpn::HTTPProxyTransport::Client::start_connect_ ( )
inlineprivate

Definition at line 963 of file httpcli.hpp.

Here is the caller graph for this function:

◆ start_impl_()

void openvpn::HTTPProxyTransport::Client::start_impl_ ( const openvpn_io::error_code &  error)
inlineprivate

Definition at line 989 of file httpcli.hpp.

◆ stop()

void openvpn::HTTPProxyTransport::Client::stop ( )
inlineoverridevirtual

Implements openvpn::TransportClient.

Definition at line 346 of file httpcli.hpp.

Here is the caller graph for this function:

◆ stop_()

void openvpn::HTTPProxyTransport::Client::stop_ ( )
inlineprivate

Definition at line 904 of file httpcli.hpp.

Here is the caller graph for this function:

◆ tcp_eof_handler()

void openvpn::HTTPProxyTransport::Client::tcp_eof_handler ( )
inlineprivate

Definition at line 459 of file httpcli.hpp.

◆ tcp_error_handler()

void openvpn::HTTPProxyTransport::Client::tcp_error_handler ( const char *  error)
inlineprivate

Definition at line 414 of file httpcli.hpp.

Here is the caller graph for this function:

◆ tcp_read_handler()

bool openvpn::HTTPProxyTransport::Client::tcp_read_handler ( BufferAllocated buf)
inlineprivate

Definition at line 430 of file httpcli.hpp.

◆ tcp_write_queue_needs_send()

void openvpn::HTTPProxyTransport::Client::tcp_write_queue_needs_send ( )
inlineprivate

Definition at line 453 of file httpcli.hpp.

◆ transport_has_send_queue()

bool openvpn::HTTPProxyTransport::Client::transport_has_send_queue ( )
inlineoverridevirtual

Implements openvpn::TransportClient.

Definition at line 297 of file httpcli.hpp.

◆ transport_protocol()

Protocol openvpn::HTTPProxyTransport::Client::transport_protocol ( ) const
inlineoverridevirtual

Implements openvpn::TransportClient.

Definition at line 336 of file httpcli.hpp.

◆ transport_reparent()

void openvpn::HTTPProxyTransport::Client::transport_reparent ( TransportClientParent parent_arg)
inlineoverrideprivatevirtual

Implements openvpn::TransportClient.

Definition at line 390 of file httpcli.hpp.

◆ transport_send()

bool openvpn::HTTPProxyTransport::Client::transport_send ( BufferAllocated buf)
inlineoverridevirtual

Implements openvpn::TransportClient.

Definition at line 284 of file httpcli.hpp.

◆ transport_send_const()

bool openvpn::HTTPProxyTransport::Client::transport_send_const ( const Buffer buf)
inlineoverridevirtual

Implements openvpn::TransportClient.

Definition at line 279 of file httpcli.hpp.

◆ transport_send_queue_empty()

bool openvpn::HTTPProxyTransport::Client::transport_send_queue_empty ( )
inlineoverridevirtual

Implements openvpn::TransportClient.

Definition at line 289 of file httpcli.hpp.

◆ transport_send_queue_size()

size_t openvpn::HTTPProxyTransport::Client::transport_send_queue_size ( )
inlineoverridevirtual

Implements openvpn::TransportClient.

Definition at line 306 of file httpcli.hpp.

◆ transport_start()

void openvpn::HTTPProxyTransport::Client::transport_start ( )
inlineoverridevirtual

Implements openvpn::TransportClient.

Definition at line 246 of file httpcli.hpp.

◆ transport_stop_requeueing()

void openvpn::HTTPProxyTransport::Client::transport_stop_requeueing ( )
inlineoverridevirtual

Implements openvpn::TransportClient.

Definition at line 302 of file httpcli.hpp.

Friends And Related Symbol Documentation

◆ ClientConfig

friend class ClientConfig
friend

Definition at line 242 of file httpcli.hpp.

Member Data Documentation

◆ config

ClientConfig::Ptr openvpn::HTTPProxyTransport::Client::config
private

Definition at line 1070 of file httpcli.hpp.

◆ drain_content_length

size_t openvpn::HTTPProxyTransport::Client::drain_content_length
private

Definition at line 1085 of file httpcli.hpp.

◆ halt

bool openvpn::HTTPProxyTransport::Client::halt
private

Definition at line 1074 of file httpcli.hpp.

◆ html_skip

std::unique_ptr<HTTP::HTMLSkip> openvpn::HTTPProxyTransport::Client::html_skip
private

Definition at line 1087 of file httpcli.hpp.

◆ http_parser

HTTP::ReplyParser openvpn::HTTPProxyTransport::Client::http_parser
private

Definition at line 1081 of file httpcli.hpp.

◆ http_reply

HTTP::Reply openvpn::HTTPProxyTransport::Client::http_reply
private

Definition at line 1080 of file httpcli.hpp.

◆ http_reply_status

HTTP::ReplyParser::status openvpn::HTTPProxyTransport::Client::http_reply_status
private

Definition at line 1079 of file httpcli.hpp.

◆ http_request

std::string openvpn::HTTPProxyTransport::Client::http_request
private

Definition at line 1082 of file httpcli.hpp.

◆ impl

LinkImpl::Ptr openvpn::HTTPProxyTransport::Client::impl
private

Definition at line 1072 of file httpcli.hpp.

◆ n_transactions

unsigned int openvpn::HTTPProxyTransport::Client::n_transactions
private

Definition at line 1076 of file httpcli.hpp.

◆ ntlm_phase_2_response_pending

bool openvpn::HTTPProxyTransport::Client::ntlm_phase_2_response_pending
private

Definition at line 1084 of file httpcli.hpp.

◆ parent

TransportClientParent* openvpn::HTTPProxyTransport::Client::parent
private

Definition at line 1071 of file httpcli.hpp.

◆ proxy_established

bool openvpn::HTTPProxyTransport::Client::proxy_established
private

Definition at line 1078 of file httpcli.hpp.

◆ proxy_host

std::string openvpn::HTTPProxyTransport::Client::proxy_host
private

Definition at line 1063 of file httpcli.hpp.

◆ proxy_port

std::string openvpn::HTTPProxyTransport::Client::proxy_port
private

Definition at line 1064 of file httpcli.hpp.

◆ proxy_response_limit

ProxyResponseLimit openvpn::HTTPProxyTransport::Client::proxy_response_limit
private

Definition at line 1077 of file httpcli.hpp.

◆ server_endpoint

LinkImpl::protocol::endpoint openvpn::HTTPProxyTransport::Client::server_endpoint
private

Definition at line 1073 of file httpcli.hpp.

◆ server_host

std::string openvpn::HTTPProxyTransport::Client::server_host
private

Definition at line 1066 of file httpcli.hpp.

◆ server_port

std::string openvpn::HTTPProxyTransport::Client::server_port
private

Definition at line 1067 of file httpcli.hpp.

◆ socket

openvpn_io::ip::tcp::socket openvpn::HTTPProxyTransport::Client::socket
private

Definition at line 1069 of file httpcli.hpp.


The documentation for this class was generated from the following file: