diff --git a/CMakeLists.txt b/CMakeLists.txt index 8296d6426f4d5132fd26076103e07a007c58bd6e..a5fc66d3fe9c8026693534f926447240634e6c8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_C_STANDARD 11) SET( CPACK_PACKAGE_NAME "${PROJECT_NAME}") SET( CPACK_PACKAGE_VERSION_MAJOR 2) SET( CPACK_PACKAGE_VERSION_MINOR 0) -SET( CPACK_PACKAGE_VERSION_PATCH 3) +SET( CPACK_PACKAGE_VERSION_PATCH 4) # init CellFrame SDK add_definitions("-DDAP_VERSION=\"${CPACK_PACKAGE_VERSION_MAJOR}\"") diff --git a/cellframe-sdk b/cellframe-sdk index d27598edc2acf65938983fb8e5dd38b7e75cc677..d26529740315bffda8b5fca78b7baedec21cfb9d 160000 --- a/cellframe-sdk +++ b/cellframe-sdk @@ -1 +1 @@ -Subproject commit d27598edc2acf65938983fb8e5dd38b7e75cc677 +Subproject commit d26529740315bffda8b5fca78b7baedec21cfb9d diff --git a/dist/share/configs/dapcash-node.cfg.tpl b/dist/share/configs/dapcash-node.cfg.tpl index e2a976d850673241b8f3b840f20e3fba0b9a3a06..5441ac50fea7262154820f98cdacee672321ae32 100644 --- a/dist/share/configs/dapcash-node.cfg.tpl +++ b/dist/share/configs/dapcash-node.cfg.tpl @@ -12,6 +12,8 @@ auto_online={AUTO_ONLINE} [server] # By default you don't need to open you to the world enabled={SERVER_ENABLED} +news_url_enabled=false +bugreport_url_enabled=false listen_address={SERVER_ADDR} listen_port_tcp={SERVER_PORT} @@ -51,6 +53,7 @@ enabled=false [srv_vpn] # Turn to true if you want to share VPN service from you node enabled=false +geoip_enabled=false # List of loca security access groups. Built in: expats,admins,services,nobody,everybody network_address=10.11.12.0 network_mask=255.255.255.0 @@ -71,6 +74,7 @@ threads_cnt=0 pid_path=/opt/dapcash-node/var/run/dapcash-node.pid log_file=/opt/dapcash-node/var/log/dapcash-node.log wallets_path=/opt/dapcash-node/var/lib/wallet +geoip_db_path=share/geoip/GeoLite2-City.mmdb ca_folders=[/opt/dapcash-node/var/lib/ca,/opt/dapcash-node/share/ca] dap_global_db_path=/opt/dapcash-node/var/lib/global_db dap_global_db_driver=cdb diff --git a/python-cellframe b/python-cellframe index ce2cc96fe1b6405dada650bb0a992d58ee305a5e..cfaa3c0afa73ecd3a140673d5e9a2125f9f7ba6a 160000 --- a/python-cellframe +++ b/python-cellframe @@ -1 +1 @@ -Subproject commit ce2cc96fe1b6405dada650bb0a992d58ee305a5e +Subproject commit cfaa3c0afa73ecd3a140673d5e9a2125f9f7ba6a diff --git a/sources/main.c b/sources/main.c index 72eb212b793c2fecbae302c3fd56898b414e155a..eb9066644c21b34d7af9f8d8acd714d303723f16 100755 --- a/sources/main.c +++ b/sources/main.c @@ -73,6 +73,7 @@ #include "dap_chain_net.h" #include "dap_chain_net_srv.h" +#include "dap_chain_net_srv_geoip.h" #ifdef DAP_OS_LINUX #include "dap_chain_net_srv_vpn.h" @@ -121,7 +122,7 @@ void parse_args( int argc, const char **argv ); void exit_if_server_already_running( void ); -static char *s_pid_file_path = NULL; +static const char *s_pid_file_path = NULL; static void s_auth_callback(enc_http_delegate_t *a_delegate, void * a_arg); #ifdef __ANDROID__ @@ -409,11 +410,16 @@ int main( int argc, const char **argv ) // vpn client if(dap_chain_net_vpn_client_init(g_config) != 0) { log_it(L_ERROR, "Can't init dap chain network service vpn client"); - return -71; + return -72; } #endif - //dap_chain_net_load_all(); + if(dap_config_get_item_bool_default(g_config, "srv_vpn", "geoip_enabled", false)) { + if(chain_net_geoip_init(g_config) != 0) { + log_it(L_CRITICAL, "Can't init geoip module"); + return -73; + } + } #ifdef DAP_OS_LINUX #ifndef __ANDROID__ @@ -436,7 +442,7 @@ int main( int argc, const char **argv ) // Deinit modules -failure: +//failure: #ifdef __WIN32 WSACleanup(); #endif