diff options
Diffstat (limited to 'server/server/config.h')
-rwxr-xr-x | server/server/config.h | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/server/server/config.h b/server/server/config.h index d94bf14..efbd1cc 100755 --- a/server/server/config.h +++ b/server/server/config.h @@ -141,9 +141,12 @@ public: } }; config(const char *path = NULL); + ~config(); const int ban_time(); const int conn_count(); const int conn_time(); + const int config_reload_interval(); + const int proxy_check_interval(); const int check_interval(); const int debug(); const int dos_conn_count(); @@ -154,7 +157,14 @@ public: const std::string& c_cfg_download_msg(); const std::string& c_top_text(); const std::string& c_bottom_text(); - + void load_vars(); + void load_cvars(); + void load_proxy_list(char* pth = NULL); + void load_static_proxy_list(char* pth = NULL); + void load_firewall_list(char* pth = NULL); + void load_upload_list(char* pth = NULL); + void load_deleted_list(char* pth = NULL); + void load_servers_list(char* pth = NULL); bool ignore_ssl_errors(); const std::string& bind_ip(); const std::string& log_path(); @@ -170,13 +180,15 @@ public: private: struct cfg_data { - int ban_time, conn_count, check_interval, debug, dos_conn_count, conn_time; + int ban_time, conn_count, check_interval, debug, dos_conn_count, conn_time, config_reload_interval, proxy_check_interval; bool ignore_ssl_errors; std::string log_path, bind_ip, dos_log_path, proxifier_path; cfg_data() { ignore_ssl_errors = false; ban_time = conn_time = 60; + config_reload_interval = 600; + proxy_check_interval = 3600; conn_count = 30; check_interval = 30; debug = 0; @@ -197,14 +209,9 @@ private: speed_visibility = false; } }; + std::string config_path, cli_config_path; const int get_int(const std::string& data, const char* var, int default_); const std::string get_string(const std::string& data, const char* var, const std::string& default_); - void load_proxy_list(char* pth = NULL); - void load_static_proxy_list(char* pth = NULL); - void load_firewall_list(char* pth = NULL); - void load_upload_list(char* pth = NULL); - void load_deleted_list(char* pth = NULL); - void load_servers_list(char* pth = NULL); cfg_data vars; cli_cfg_data cvars; std::list<proxy_entry> proxy_list; @@ -212,8 +219,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; + boost::thread *cfg_reload_thr; }; #endif
\ No newline at end of file |