Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
celllframe-node
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Code
Merge requests
17
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Show more breadcrumbs
cellframe
celllframe-node
Commits
80f08a3a
Commit
80f08a3a
authored
6 years ago
by
Dmitriy A. Gerasimov
Browse files
Options
Downloads
Patches
Plain Diff
[*] Fixed configs for listen server
parent
2246e1a2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dist/etc/networks/kelvin-dev.cfg
+4
-5
4 additions, 5 deletions
dist/etc/networks/kelvin-dev.cfg
dist/share/kelvin-node.cfg.tpl
+17
-9
17 additions, 9 deletions
dist/share/kelvin-node.cfg.tpl
sources/main.c
+8
-3
8 additions, 3 deletions
sources/main.c
with
29 additions
and
17 deletions
dist/etc/networks/kelvin-dev.cfg
+
4
−
5
View file @
80f08a3a
# Kelvin
Blockchain: development network
# General
section
[general]
[general]
name=kelvin
name=kelvin
type=development
type=development
node-role=full
# Possible values: light, full, archive, master, root
# Possible
values: light, full, archive, master, root
default-wallet=node-wallet
node-role=full
[resources]
wallets=/opt/kelvin-node/db/kelvin-dev/wallets
This diff is collapsed.
Click to expand it.
dist/share/kelvin-node.cfg.tpl
+
17
−
9
View file @
80f08a3a
# General section
# General section
[general]
[general]
network-name=kelvin-test # Network config name (without trailing .cfg )
# Network config name (without trailing .cfg )
network-role=light # Possible values: light,full,archive,master,root
network-name=kelvin-dev
# Possible values: light,full,archive,master,root
network-role=root
# Server part
# Server part
[server]
[server]
enabled=false # By default you don't need to open you to the world
# By default you don't need to open you to the world
listen_address=127.0.0.1
enabled=true
listen_address=0.0.0.0
listen_port_tcp=8079
listen_port_tcp=8079
# VPN stream channel processing module
# VPN stream channel processing module
[vpn]
[vpn]
enabled=false # Turn to true if you want to share VPN service from you node
# Turn to true if you want to share VPN service from you node
access_groups=expats,services,admins # list of loca security access groups. Built in: expats,admins,services,nobody,everybody
enabled=false
# List of loca security access groups. Built in: expats,admins,services,nobody,everybody
access_groups=expats,services,admins
network_address=10.0.0.0
network_address=10.0.0.0
network_mask=255.255.255.0
network_mask=255.255.255.0
# Application Resources
[resources]
[resources]
threads_cnt=0 # 0 means auto detect
# 0 means auto detect
threads_cnt=0
pid_path=/opt/kelvin-node/var/run/kelvin-node.pid
pid_path=/opt/kelvin-node/var/run/kelvin-node.pid
log_file=/opt/kelvin-node/var/log/kelvin-node.log
log_file=/opt/kelvin-node/var/log/kelvin-node.log
# Small built
in WWW server
# Small builtin WWW server
[www]
[www]
enabled=false # Really who need this??
# Really who need this??
enabled=false
www_root=/opt/dapserver/www
www_root=/opt/dapserver/www
url=/
url=/
This diff is collapsed.
Click to expand it.
sources/main.c
+
8
−
3
View file @
80f08a3a
...
@@ -41,8 +41,8 @@
...
@@ -41,8 +41,8 @@
#define LOCAL_PID_FILE_PATH SYSTEM_PREFIX"/run/"DAP_APP_NAME".pid"
#define LOCAL_PID_FILE_PATH SYSTEM_PREFIX"/run/"DAP_APP_NAME".pid"
#define ENC_HTTP_URL "/enc_init"
#define ENC_HTTP_URL "/enc_init"
#define STREAM_URL "/stream
_url
"
#define STREAM_URL "/stream"
#define STREAM_CTL_URL "/stream_
ur
l"
#define STREAM_CTL_URL "/stream_
ct
l"
#define SLIST_URL "/nodelist"
#define SLIST_URL "/nodelist"
#define MAIN_URL "/"
#define MAIN_URL "/"
...
@@ -134,6 +134,9 @@ int main(int argc, const char * argv[])
...
@@ -134,6 +134,9 @@ int main(int argc, const char * argv[])
"pid_path"
,
"pid_path"
,
SYSTEM_PREFIX
"/run/dapserver.pid"
));
SYSTEM_PREFIX
"/run/dapserver.pid"
));
log_it
(
L_DEBUG
,
"config server->enabled =
\"
%s
\"
"
,
dap_config_get_item_str_default
(
g_config
,
"server"
,
"enabled"
,
false
)
);
if
(
dap_config_get_item_bool_default
(
g_config
,
"server"
,
"enabled"
,
false
)
)
{
if
(
dap_config_get_item_bool_default
(
g_config
,
"server"
,
"enabled"
,
false
)
)
{
int32_t
l_port
=
dap_config_get_item_int32_default
(
g_config
,
"server"
,
"listen_port_tcp"
,
-
1
);
// TODO Default listen port
int32_t
l_port
=
dap_config_get_item_int32_default
(
g_config
,
"server"
,
"listen_port_tcp"
,
-
1
);
// TODO Default listen port
...
@@ -144,7 +147,9 @@ int main(int argc, const char * argv[])
...
@@ -144,7 +147,9 @@ int main(int argc, const char * argv[])
"0.0.0.0"
)),
"0.0.0.0"
)),
l_port
,
l_port
,
DAP_SERVER_TCP
);
DAP_SERVER_TCP
);
}
}
else
log_it
(
L_WARNING
,
"Server is enabled but no port is defined"
);
}
}
if
(
l_server
)
{
// If listener server is initialized
if
(
l_server
)
{
// If listener server is initialized
...
...
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