diff --git a/dist/share/configs/cellframe-node.cfg.tpl b/dist/share/configs/cellframe-node.cfg.tpl index 2f8985f143f5e127d0f86d5e54690cfa0a455809..33e19684b4f1966418732558a5f0038b9e78640d 100644 --- a/dist/share/configs/cellframe-node.cfg.tpl +++ b/dist/share/configs/cellframe-node.cfg.tpl @@ -43,6 +43,12 @@ access_groups=expats,services,admins network_address=10.11.12.0 network_mask=255.255.255.0 +# old VPN server +[vpn_old] +enabled=true +network_address=10.11.11.0 +network_mask=255.255.255.0 + # Console interface server [conserver] enabled=true diff --git a/sources/main.c b/sources/main.c index be00a05d87fd0c2567ba5c87f8288c2a6848bb6c..026fe91f76719cb9ca240511246d18ed0f08ec73 100644 --- a/sources/main.c +++ b/sources/main.c @@ -300,15 +300,14 @@ int main( int argc, const char **argv ) log_it(L_CRITICAL,"Can't init dap chain network service datum pool module"); return -69; } - // vpn server #ifndef _WIN32 - /* + // vpn server if(dap_config_get_item_bool_default(g_config, "vpn", "enabled", false)) { if(dap_chain_net_srv_vpn_init(g_config) != 0) { log_it(L_ERROR, "Can't init dap chain network service vpn module"); return -70; } - }*/ + } // 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"); @@ -423,11 +422,9 @@ int main( int argc, const char **argv ) // VPN channel - - - if (dap_config_get_item_bool_default(g_config,"vpn","enabled",false)){ - dap_stream_ch_vpn_init(dap_config_get_item_str_default(g_config, "vpn", "network_address", NULL), - dap_config_get_item_str_default(g_config, "vpn", "network_mask", NULL)); + if(dap_config_get_item_bool_default(g_config,"vpn_old","enabled",false)){ + dap_stream_ch_vpn_init(dap_config_get_item_str_default(g_config, "vpn_old", "network_address", NULL), + dap_config_get_item_str_default(g_config, "vpn_old", "network_mask", NULL)); }