![]() |
Kurlyk
|
Configuration structure for connecting through a proxy server. More...
#include <ProxyConfig.hpp>
Public Member Functions | |
ProxyConfig () | |
Default constructor. | |
ProxyConfig (std::string server, std::string auth, ProxyType type) | |
Constructs ProxyConfig with server and authentication. | |
void | set_proxy (const std::string &ip, int port, ProxyType type) |
Sets the proxy server address. | |
void | set_proxy (const std::string &ip, int port, const std::string &username, const std::string &password, ProxyType type=ProxyType::HTTP) |
Sets the proxy server address with authentication details and proxy type. | |
void | set_proxy_auth (const std::string &username, const std::string &password) |
Sets proxy authentication credentials. | |
std::string | get_ip () const |
Returns the proxy IP address (host part). | |
int | get_port () const |
Returns the proxy port. | |
std::string | get_username () const |
Returns the proxy username. | |
std::string | get_password () const |
Returns the proxy password. | |
bool | is_valid () const |
Checks if the proxy configuration is valid (server field must not be empty). | |
Public Attributes | |
std::string | proxy_server |
Proxy address in <ip:port> format. | |
std::string | proxy_auth |
Proxy authentication in <username:password> format. | |
ProxyType | proxy_type |
Proxy type (e.g., HTTP, SOCKS5). | |
bool | use = false |
Whether to use proxy for connection. | |
Configuration structure for connecting through a proxy server.
Definition at line 12 of file ProxyConfig.hpp.
|
inline |
Default constructor.
Definition at line 19 of file ProxyConfig.hpp.
|
inline |
Constructs ProxyConfig with server and authentication.
server | Proxy server address. |
auth | Proxy authentication credentials. |
type | Proxy type. |
Definition at line 26 of file ProxyConfig.hpp.
|
inline |
Returns the proxy IP address (host part).
Definition at line 64 of file ProxyConfig.hpp.
|
inline |
Returns the proxy password.
Definition at line 92 of file ProxyConfig.hpp.
|
inline |
Returns the proxy port.
Definition at line 72 of file ProxyConfig.hpp.
|
inline |
Returns the proxy username.
Definition at line 84 of file ProxyConfig.hpp.
|
inline |
Checks if the proxy configuration is valid (server field must not be empty).
Definition at line 100 of file ProxyConfig.hpp.
|
inline |
Sets the proxy server address with authentication details and proxy type.
ip | Proxy server IP address. |
port | Proxy server port. |
username | Proxy username. |
password | Proxy password. |
type | Proxy type. |
Definition at line 44 of file ProxyConfig.hpp.
|
inline |
Sets the proxy server address.
ip | Proxy server IP address. |
port | Proxy server port. |
type | Proxy type. |
Definition at line 33 of file ProxyConfig.hpp.
|
inline |
Sets proxy authentication credentials.
username | Proxy username. |
password | Proxy password. |
Definition at line 58 of file ProxyConfig.hpp.
std::string cryptox::ProxyConfig::proxy_auth |
Proxy authentication in <username:password> format.
Definition at line 14 of file ProxyConfig.hpp.
std::string cryptox::ProxyConfig::proxy_server |
Proxy address in <ip:port> format.
Definition at line 13 of file ProxyConfig.hpp.
ProxyType cryptox::ProxyConfig::proxy_type |
Proxy type (e.g., HTTP, SOCKS5).
Definition at line 15 of file ProxyConfig.hpp.
bool cryptox::ProxyConfig::use = false |
Whether to use proxy for connection.
Definition at line 16 of file ProxyConfig.hpp.