Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-chain-net-srv-vpn
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
cellframe
libdap-chain-net-srv-vpn
Commits
deeb68c6
Commit
deeb68c6
authored
5 years ago
by
Dmitriy A. Gerasimov
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://gitlab.demlabs.net/cellframe/libdap-chain-net-srv-vpn
parents
ba17b3c2
0f6da86f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+11
-9
11 additions, 9 deletions
CMakeLists.txt
dap_chain_net_srv_vpn_cdb.c
+4
-0
4 additions, 0 deletions
dap_chain_net_srv_vpn_cdb.c
dap_chain_net_srv_vpn_cdb_server_list.c
+1
-1
1 addition, 1 deletion
dap_chain_net_srv_vpn_cdb_server_list.c
with
16 additions
and
10 deletions
CMakeLists.txt
+
11
−
9
View file @
deeb68c6
...
...
@@ -3,25 +3,22 @@ project (dap_chain_net_srv_vpn)
set
(
DAP_CHAIN_NET_SRV_VPN_SRCS
dap_chain_net_srv_vpn.c
dap_chain_net_srv_vpn_cdb.c
dap_chain_net_srv_vpn_cdb_server_list.c
dap_chain_net_srv_vpn_cdb.c
dap_chain_net_srv_vpn_cdb_server_list.c
dap_chain_net_vpn_client.c
dap_chain_net_vpn_client_tun.c
)
set
(
DAP_CHAIN_NET_SRV_VPN_HEADERS
dap_chain_net_srv_vpn.h
dap_chain_net_srv_vpn_cdb.h
dap_chain_net_srv_vpn_cdb_server_list.h
dap_chain_net_srv_vpn_cdb.h
dap_chain_net_srv_vpn_cdb_server_list.h
dap_chain_net_vpn_client.h
dap_chain_net_vpn_client_tun.h
)
if
(
WIN32
)
include_directories
(
../libdap/src/win32/
)
include_directories
(
../3rdparty/libmemcached/
)
include_directories
(
../3rdparty/libmemcached/win32/
)
include_directories
(
../3rdparty/wepoll/include/
)
include_directories
(
../3rdparty/uthash/src/
)
include_directories
(
../3rdparty/libjson-c/
)
...
...
@@ -32,8 +29,13 @@ endif()
add_library
(
${
PROJECT_NAME
}
STATIC
${
DAP_CHAIN_NET_SRV_VPN_SRCS
}
${
DAP_CHAIN_NET_SRV_VPN_HEADERS
}
)
target_link_libraries
(
dap_chain_net_srv_vpn dap_core dap_crypto dap_chain dap_chain_crypto dap_chain_net dap_chain_net_srv dap_server_http_db dap_server_http_db_auth
)
target_include_directories
(
dap_chain_net_srv_vpn INTERFACE .
)
target_link_libraries
(
${
PROJECT_NAME
}
dap_core dap_crypto dap_chain dap_chain_crypto dap_chain_net dap_chain_net_srv
)
if
(
NOT ANDROID
)
target_link_libraries
(
${
PROJECT_NAME
}
dap_server_http_db_auth dap_server_http_db
)
endif
()
target_include_directories
(
${
PROJECT_NAME
}
INTERFACE .
)
set
(
${
PROJECT_NAME
}
_DEFINITIONS CACHE INTERNAL
"
${
PROJECT_NAME
}
: Definitions"
FORCE
)
...
...
This diff is collapsed.
Click to expand it.
dap_chain_net_srv_vpn_cdb.c
+
4
−
0
View file @
deeb68c6
...
...
@@ -29,10 +29,12 @@
#include
"dap_enc_base64.h"
#include
"dap_http.h"
#ifndef __ANDROID__
#include
"db_core.h"
#include
"db_auth.h"
#include
"db_http.h"
#include
"db_http_file.h"
#endif
#include
"dap_chain.h"
#include
"dap_chain_net.h"
...
...
@@ -244,6 +246,7 @@ void dap_chain_net_srv_vpn_cdb_deinit()
*/
static
void
s_auth_callback
(
enc_http_delegate_t
*
a_delegate
,
void
*
a_arg
)
{
#ifndef __ANDROID__
db_auth_info_t
*
l_auth_info
=
(
db_auth_info_t
*
)
a_arg
;
log_it
(
L_DEBUG
,
"Authorized, now need to create conditioned transaction if not present"
);
...
...
@@ -324,4 +327,5 @@ static void s_auth_callback(enc_http_delegate_t* a_delegate, void * a_arg)
if
(
l_client_key
)
DAP_DELETE
(
l_client_key
);
#endif
}
This diff is collapsed.
Click to expand it.
dap_chain_net_srv_vpn_cdb_server_list.c
+
1
−
1
View file @
deeb68c6
...
...
@@ -110,7 +110,7 @@ static void s_http_simple_proc(dap_http_simple_t *a_http_simple, void *a_arg)
char
l_node_ext_ipv6_str
[
INET6_ADDRSTRLEN
]
=
{
0
};
if
(
l_node_info
->
hdr
.
ext_addr_v4
.
s_addr
)
inet_ntop
(
AF_INET
,
&
l_node_info
->
hdr
.
ext_addr_v4
,
l_node_ext_ipv4_str
,
sizeof
(
l_node_ext_ipv4_str
));
if
(
*
((
uint128_t
*
)
l_node_info
->
hdr
.
ext_addr_v6
.
__in6_u
.
__u
6_addr
8
)
)
if
(
*
((
uint128_t
*
)
l_node_info
->
hdr
.
ext_addr_v6
.
s
6_addr
)
)
inet_ntop
(
AF_INET6
,
&
l_node_info
->
hdr
.
ext_addr_v6
,
l_node_ext_ipv6_str
,
sizeof
(
l_node_ext_ipv6_str
));
dap_string_append_printf
(
l_reply_str
,
" {
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment