|
Electroneum
|
Client support for socks connect and resolve commands. More...
#include <socks.h>

Classes | |
| struct | async_close |
| struct | completed |
| struct | read |
| struct | write |
Public Types | |
| using | stream_type = boost::asio::ip::tcp |
Public Member Functions | |
| client (stream_type::socket &&proxy, socks::version ver) | |
| client (const client &)=delete | |
| virtual | ~client () |
| client & | operator= (const client &)=delete |
| stream_type::socket | take_socket () |
| socks::version | socks_version () const noexcept |
| epee::span< const std::uint8_t > | buffer () const noexcept |
| void | clear_command () noexcept |
| bool | set_connect_command (const epee::net_utils::ipv4_network_address &address) |
Try to set address as remote connection request. More... | |
| bool | set_connect_command (boost::string_ref domain, std::uint16_t port) |
Try to set domain + port as remote connection request. More... | |
| bool | set_connect_command (const net::tor_address &address) |
Try to set address as remote Tor hidden service connection request. More... | |
| bool | set_connect_command (const net::i2p_address &address) |
Try to set address as remote i2p hidden service connection request. More... | |
| bool | set_resolve_command (boost::string_ref domain) |
Try to set domain as remote DNS A record lookup request. More... | |
Static Public Member Functions | |
| static bool | connect_and_send (std::shared_ptr< client > self, const stream_type::endpoint &proxy_address) |
| static bool | send (std::shared_ptr< client > self) |
| using net::socks::client::stream_type = boost::asio::ip::tcp |
|
explicit |
| proxy | ownership is passed into this. Does not have to be in connected state. |
| ver | socks version for the connection. |
Definition at line 223 of file socks.cpp.
|
delete |
|
inlinenoexcept |
|
inlinenoexcept |
|
static |
Asynchronously connect to proxy_address then issue command in buffer(). The done(...) method will be invoked upon completion with self and potential errors.
self->set_*_command calls before using this function. async_close can be invoked on self until the done callback is invoked.| self | ownership of object is given to function. |
| proxy_address | of the socks server. |
Definition at line 294 of file socks.cpp.

Assume existing connection to proxy server; asynchronously issue command in buffer(). The done(...) method will be invoked upon completion with self and potential errors.
self->set_*_command calls before using the function. async_close can be invoked on self until the done callback is invoked.| self | ownership of object is given to function. |
Definition at line 305 of file socks.cpp.


| bool net::socks::client::set_connect_command | ( | const epee::net_utils::ipv4_network_address & | address | ) |
Try to set address as remote connection request.
Definition at line 229 of file socks.cpp.


| bool net::socks::client::set_connect_command | ( | boost::string_ref | domain, |
| std::uint16_t | port | ||
| ) |
Try to set domain + port as remote connection request.
Definition at line 253 of file socks.cpp.

| bool net::socks::client::set_connect_command | ( | const net::tor_address & | address | ) |
Try to set address as remote Tor hidden service connection request.
Definition at line 270 of file socks.cpp.

| bool net::socks::client::set_connect_command | ( | const net::i2p_address & | address | ) |
Try to set address as remote i2p hidden service connection request.
Definition at line 277 of file socks.cpp.

| bool net::socks::client::set_resolve_command | ( | boost::string_ref | domain | ) |
Try to set domain as remote DNS A record lookup request.
Definition at line 284 of file socks.cpp.

|
inlinenoexcept |
|
inline |