diff options
Diffstat (limited to 'server/server/config.h')
-rwxr-xr-x | server/server/config.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/server/server/config.h b/server/server/config.h index 90b9d27..d94bf14 100755 --- a/server/server/config.h +++ b/server/server/config.h @@ -8,13 +8,15 @@ class config { public: + enum proxy_type {UNKNOWN = -1, HTTP, HTTPS, SOCKS4, SOCKS5}; struct proxy_entry { std::string host, login, password, country, state, city; int port; - proxy_entry(): port(0) + proxy_type type; + proxy_entry(): port(0), type(UNKNOWN) {} - proxy_entry (std::string login_, std::string password_, std::string host_, int port_, std::string country_, std::string state_, std::string city_) + proxy_entry (std::string login_, std::string password_, std::string host_, int port_, std::string country_, std::string state_, std::string city_, proxy_type t) { login = login_; password = password_; @@ -23,15 +25,15 @@ public: country = country_; state = state_; city = city_; + type = t; } }; - enum p_proxy_type {UNKNOWN = -1, HTTPS, SOCKS4, SOCKS5}; struct p_proxy_entry { std::string host, login, password; int port, id, options; bool enable_auth; - p_proxy_type type; + proxy_type type; p_proxy_entry() { port = 3128; @@ -68,9 +70,10 @@ public: int port, position; uint64_t speed; std::string host, login, password, label; - static_proxy_entry(): port(0), position(0), speed(0) + proxy_type type; + static_proxy_entry(): port(0), position(0), speed(0), type(UNKNOWN) {} - static_proxy_entry(std::string login_, std::string password_, std::string host_, int port_, std::string label_, int position_) + static_proxy_entry(std::string login_, std::string password_, std::string host_, int port_, std::string label_, int position_, proxy_type t) { login = login_; password = password_; @@ -78,6 +81,7 @@ public: port = port_; label = label_; position = position_; + type = t; } }; @@ -162,6 +166,7 @@ public: std::list<std::string> *get_deleted_list(); std::list<upload_entry> *get_upload_list(); std::list<conn_server> *get_server_list(); + std::list<p_proxy_entry> *make_p_proxy_list(); private: struct cfg_data { @@ -207,6 +212,8 @@ private: std::list<std::string> firewall_list, deleted_list; std::list<upload_entry> upload_list; std::list<conn_server> servers_list; + + std::list<p_proxy_entry> p_proxy_list; }; #endif
\ No newline at end of file |