OpenVPN 3 Core Library
|
#include <httpcli.hpp>
Classes | |
struct | AsioProtocol |
Public Types | |
typedef RCPtr< HTTPCore > | Ptr |
using | results_type = openvpn_io::ip::tcp::resolver::results_type |
Public Member Functions | |
HTTPCore (openvpn_io::io_context &io_context_arg, Config::Ptr config_arg) | |
virtual | ~HTTPCore () |
void | override_timeouts (TimeoutOverride to_arg) |
bool | is_alive () const |
bool | is_link_active () |
bool | is_alt_routing_reset () const |
void | check_ready () const |
void | start_request () |
void | start_request_after (const Time::Duration dur) |
void | stop (const bool shutdown) |
void | abort (const std::string &message, const int status=Status::E_ABORTED) |
const HTTP::Reply & | reply () const |
std::string | remote_endpoint_str () const |
bool | remote_ip_port (IP::Addr &addr, unsigned int &port) const |
Host | host_hint () |
bool | host_match (const std::string &host_arg) const |
AsioPolySock::Base * | get_socket () |
void | alter_general_timeout_for_streaming () |
void | streaming_start () |
void | streaming_restart () |
bool | is_streaming_restartable () const |
bool | is_streaming_hold () const |
virtual Host | http_host ()=0 |
virtual Request | http_request ()=0 |
virtual ContentInfo | http_content_info () |
virtual BufferPtr | http_content_out () |
virtual void | http_content_out_needed () |
virtual void | http_headers_received () |
virtual void | http_headers_sent (const Buffer &buf) |
virtual void | http_mutate_resolver_results (results_type &results) |
virtual void | http_content_in (BufferAllocated &buf)=0 |
virtual void | http_done (const int status, const std::string &description)=0 |
virtual void | http_keepalive_close (const int status, const std::string &description) |
virtual void | http_post_connect (AsioPolySock::Base &sock) |
![]() | |
void | rr_reset () |
void | reset () |
bool | is_ready () const |
bool | is_websocket () const |
bool | is_deferred () const |
bool | http_in_started () const |
bool | http_out_started () const |
const REQUEST_REPLY::State & | request_reply () const |
const HTTP::HeaderList & | headers () const |
olong | content_length () const |
std::string | ssl_handshake_details () const |
bool | ssl_did_full_handshake () const |
void | ssl_no_cache () |
const CONFIG & | http_config () const |
void | set_async_out (const bool async_out_arg) |
void | http_content_out_finish (BufferPtr buf) |
void | reduce_max_content_bytes (const CONTENT_LENGTH_TYPE new_max_content_bytes) |
![]() | |
virtual | ~TransportClientParent ()=default |
Public Attributes | |
friend | Base |
Private Types | |
typedef TCPTransport::TCPLink< AsioProtocol, HTTPCore *, false > | LinkImpl |
Private Member Functions | |
void | verify_frame () |
void | activity (const bool init) |
void | handle_request () |
void | resolve_callback (const openvpn_io::error_code &error, results_type results) |
void | handle_tcp_connect (const openvpn_io::error_code &error, const openvpn_io::ip::tcp::endpoint &endpoint) |
void | do_connect (const bool use_link) |
void | set_connect_timeout (unsigned int connect_timeout) |
void | bind_local_addr (AsioPolySock::TCP *s) |
void | schedule_keepalive_timer () |
void | cancel_keepalive_timer () |
void | reset_general_timeout (const unsigned int seconds, const bool register_activity_on_input_only_arg) |
void | cancel_general_timeout () |
void | general_timeout_handler (const openvpn_io::error_code &e) |
void | connect_timeout_handler (const openvpn_io::error_code &e) |
void | set_default_stats () |
void | generate_request () |
void | generate_request_http (std::ostream &os, const Request &req) |
void | generate_request_websocket (std::ostream &os, const Request &req) |
void | generate_basic_auth_headers (std::ostream &os, const Request &req) |
void | asio_error_handler (int errcode, const char *func_name, const openvpn_io::error_code &error) |
void | handle_exception (const char *func_name, const std::exception &e) |
void | error_handler (const int errcode, const std::string &err) |
bool | tcp_read_handler (BufferAllocated &b) |
void | tcp_write_queue_needs_send () |
void | tcp_eof_handler () |
void | tcp_error_handler (const char *error) |
BufferPtr | base_http_content_out () |
void | base_http_content_out_needed () |
void | base_http_out_eof () |
bool | base_http_headers_received () |
void | base_http_content_in (BufferAllocated &buf) |
bool | base_link_send (BufferAllocated &buf) |
bool | base_send_queue_empty () |
void | base_http_done_handler (BufferAllocated &residual, const bool parent_handoff) |
void | base_error_handler (const int errcode, const std::string &err) |
bool | transport_is_openvpn_protocol () override |
void | transport_recv (BufferAllocated &buf) override |
void | transport_needs_send () override |
std::string | err_fmt (const Error::Type fatal_err, const std::string &err_text) |
void | transport_error (const Error::Type fatal_err, const std::string &err_text) override |
void | proxy_error (const Error::Type fatal_err, const std::string &err_text) override |
void | transport_pre_resolve () override |
void | transport_wait_proxy () override |
void | transport_wait () override |
bool | is_keepalive_enabled () const override |
void | disable_keepalive (unsigned int &keepalive_ping, unsigned int &keepalive_timeout) override |
void | transport_connecting () override |
Private Attributes | |
openvpn_io::io_context & | io_context |
TimeoutOverride | to |
AsioPolySock::Base::Ptr | socket |
openvpn_io::ip::tcp::resolver | resolver |
Host | host |
LinkImpl::Ptr | link |
TransportClient::Ptr | transcli |
AsioTimerSafe | connect_timer |
AsioTimerSafe | general_timer |
std::unique_ptr< AsioTimerSafe > | req_timer |
std::unique_ptr< AsioTimerSafe > | keepalive_timer |
Time::Duration | general_timeout_duration |
CoarseTime | general_timeout_coarse |
bool | register_activity_on_input_only = false |
bool | content_out_hold = true |
bool | alive = false |
Additional Inherited Members | |
![]() | |
HTTPBase (const typename CONFIG::Ptr &config_arg) | |
void | http_out_begin () |
void | http_out () |
void | tcp_in (BufferAllocated &b) |
![]() | |
bool | halt = false |
bool | ready = true |
bool | async_out = false |
bool | websocket = false |
CONFIG::Ptr | config |
CONTENT_INFO | content_info |
SSLAPI::Ptr | ssl_sess |
BufferPtr | outbuf |
Frame::Ptr | frame |
SessionStats::Ptr | stats |
Definition at line 349 of file httpcli.hpp.
|
private |
Definition at line 625 of file httpcli.hpp.
Definition at line 358 of file httpcli.hpp.
using openvpn::WS::Client::HTTPCore::results_type = openvpn_io::ip::tcp::resolver::results_type |
Definition at line 360 of file httpcli.hpp.
|
inline |
Definition at line 368 of file httpcli.hpp.
|
inlinevirtual |
Definition at line 384 of file httpcli.hpp.
|
inline |
Definition at line 481 of file httpcli.hpp.
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inlineprivate |
Definition at line 1331 of file httpcli.hpp.
|
inlineprivate |
Definition at line 1279 of file httpcli.hpp.
|
inlineprivate |
Definition at line 1251 of file httpcli.hpp.
|
inlineprivate |
Definition at line 1256 of file httpcli.hpp.
|
inlineprivate |
Definition at line 1314 of file httpcli.hpp.
|
inlineprivate |
Definition at line 1271 of file httpcli.hpp.
|
inlineprivate |
Definition at line 1262 of file httpcli.hpp.
|
inlineprivate |
Definition at line 1284 of file httpcli.hpp.
|
inlineprivate |
Definition at line 1306 of file httpcli.hpp.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inlineprivate |
Definition at line 1068 of file httpcli.hpp.
|
inlineoverrideprivatevirtual |
Implements openvpn::TransportClientParent.
Definition at line 1389 of file httpcli.hpp.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Definition at line 1062 of file httpcli.hpp.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
Definition at line 540 of file httpcli.hpp.
|
inlineprivate |
|
inlineprivate |
Definition at line 671 of file httpcli.hpp.
|
inlineprivate |
Definition at line 851 of file httpcli.hpp.
|
inline |
Definition at line 516 of file httpcli.hpp.
|
inline |
Definition at line 532 of file httpcli.hpp.
|
pure virtual |
Implemented in openvpn::WS::Client::HTTPDelegate< PARENT >.
|
inlinevirtual |
Reimplemented in openvpn::WS::Client::HTTPDelegate< PARENT >.
Definition at line 586 of file httpcli.hpp.
|
inlinevirtual |
Reimplemented in openvpn::WS::Client::HTTPDelegate< PARENT >.
Definition at line 591 of file httpcli.hpp.
|
inlinevirtual |
Reimplemented in openvpn::WS::Client::HTTPDelegate< PARENT >.
Definition at line 596 of file httpcli.hpp.
|
pure virtual |
Implemented in openvpn::WS::Client::HTTPDelegate< PARENT >.
|
inlinevirtual |
Reimplemented in openvpn::WS::Client::HTTPDelegate< PARENT >.
Definition at line 600 of file httpcli.hpp.
|
inlinevirtual |
Reimplemented in openvpn::WS::Client::HTTPDelegate< PARENT >.
Definition at line 604 of file httpcli.hpp.
|
pure virtual |
Implemented in openvpn::WS::Client::HTTPDelegate< PARENT >.
|
inlinevirtual |
Reimplemented in openvpn::WS::Client::HTTPDelegate< PARENT >.
Definition at line 616 of file httpcli.hpp.
|
inlinevirtual |
Reimplemented in openvpn::WS::Client::HTTPDelegate< PARENT >.
Definition at line 608 of file httpcli.hpp.
|
inlinevirtual |
Reimplemented in openvpn::WS::Client::HTTPDelegate< PARENT >.
Definition at line 620 of file httpcli.hpp.
|
pure virtual |
Implemented in openvpn::WS::Client::HTTPDelegate< PARENT >.
|
inline |
Definition at line 395 of file httpcli.hpp.
|
inline |
Definition at line 407 of file httpcli.hpp.
|
inlineoverrideprivatevirtual |
Implements openvpn::TransportClientParent.
Definition at line 1384 of file httpcli.hpp.
|
inline |
Definition at line 400 of file httpcli.hpp.
|
inline |
Definition at line 575 of file httpcli.hpp.
|
inline |
Definition at line 570 of file httpcli.hpp.
|
inline |
Definition at line 390 of file httpcli.hpp.
|
inlineoverrideprivatevirtual |
Implements openvpn::TransportClientParent.
Definition at line 1367 of file httpcli.hpp.
|
inline |
|
inline |
Definition at line 505 of file httpcli.hpp.
|
inline |
|
inlineprivate |
|
inlineprivate |
Definition at line 810 of file httpcli.hpp.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
Definition at line 424 of file httpcli.hpp.
|
inline |
Definition at line 433 of file httpcli.hpp.
|
inline |
|
inline |
Definition at line 562 of file httpcli.hpp.
|
inline |
Definition at line 554 of file httpcli.hpp.
|
inlineprivate |
Definition at line 1226 of file httpcli.hpp.
|
inlineprivate |
Definition at line 1242 of file httpcli.hpp.
|
inlineprivate |
|
inlineprivate |
|
inlineoverrideprivatevirtual |
Implements openvpn::TransportClientParent.
Definition at line 1394 of file httpcli.hpp.
|
inlineoverrideprivatevirtual |
Implements openvpn::TransportClientParent.
Definition at line 1362 of file httpcli.hpp.
|
inlineoverrideprivatevirtual |
Implements openvpn::TransportClientParent.
Definition at line 1338 of file httpcli.hpp.
|
inlineoverrideprivatevirtual |
Implements openvpn::TransportClientParent.
Definition at line 1348 of file httpcli.hpp.
|
inlineoverrideprivatevirtual |
Implements openvpn::TransportClientParent.
Definition at line 1372 of file httpcli.hpp.
|
inlineoverrideprivatevirtual |
Implements openvpn::TransportClientParent.
Definition at line 1343 of file httpcli.hpp.
|
inlineoverrideprivatevirtual |
Implements openvpn::TransportClientParent.
Definition at line 1380 of file httpcli.hpp.
|
inlineoverrideprivatevirtual |
Implements openvpn::TransportClientParent.
Definition at line 1376 of file httpcli.hpp.
|
inlineprivate |
|
private |
Definition at line 1427 of file httpcli.hpp.
friend openvpn::WS::Client::HTTPCore::Base |
Definition at line 356 of file httpcli.hpp.
|
private |
Definition at line 1417 of file httpcli.hpp.
|
private |
Definition at line 1426 of file httpcli.hpp.
|
private |
Definition at line 1423 of file httpcli.hpp.
|
private |
Definition at line 1422 of file httpcli.hpp.
|
private |
Definition at line 1418 of file httpcli.hpp.
|
private |
Definition at line 1411 of file httpcli.hpp.
|
private |
Definition at line 1399 of file httpcli.hpp.
|
private |
Definition at line 1420 of file httpcli.hpp.
|
private |
Definition at line 1413 of file httpcli.hpp.
|
private |
Definition at line 1424 of file httpcli.hpp.
|
private |
Definition at line 1419 of file httpcli.hpp.
|
private |
Definition at line 1406 of file httpcli.hpp.
|
private |
Definition at line 1403 of file httpcli.hpp.
|
private |
Definition at line 1401 of file httpcli.hpp.
|
private |
Definition at line 1415 of file httpcli.hpp.