mirror of
https://github.com/yrutschle/sslh.git
synced 2025-05-30 07:09:33 +03:00
adapt config format to conf2struct v1.0
This commit is contained in:
parent
12edc3dbca
commit
ed3cd40e23
18
sslhconf.cfg
18
sslhconf.cfg
@ -1,6 +1,8 @@
|
|||||||
header: "sslh-conf.h";
|
header: "sslh-conf.h";
|
||||||
parser: "sslh-conf.c";
|
parser: "sslh-conf.c";
|
||||||
|
|
||||||
|
printer: true;
|
||||||
|
|
||||||
conffile_option: ("F", "conffile");
|
conffile_option: ("F", "conffile");
|
||||||
|
|
||||||
# List of includes to define runtime types
|
# List of includes to define runtime types
|
||||||
@ -18,16 +20,16 @@ config: {
|
|||||||
type: "list",
|
type: "list",
|
||||||
items: (
|
items: (
|
||||||
{ name: "verbose"; type: "int"; default: 0; short: "v"; },
|
{ name: "verbose"; type: "int"; default: 0; short: "v"; },
|
||||||
{ name: "foreground"; type: "boolean"; default: false;
|
{ name: "foreground"; type: "bool"; default: false;
|
||||||
short: "f";
|
short: "f";
|
||||||
description: "Run in foreground instead of as a daemon"; },
|
description: "Run in foreground instead of as a daemon"; },
|
||||||
{ name: "inetd"; type: "boolean"; default: false;
|
{ name: "inetd"; type: "bool"; default: false;
|
||||||
short: "i";
|
short: "i";
|
||||||
description: "Run in inetd mode: use stdin/stdout instead of network listen"; },
|
description: "Run in inetd mode: use stdin/stdout instead of network listen"; },
|
||||||
{ name: "numeric"; type: "boolean"; default: false;
|
{ name: "numeric"; type: "bool"; default: false;
|
||||||
short: "n";
|
short: "n";
|
||||||
description: "Print IP addresses and ports as numbers"; },
|
description: "Print IP addresses and ports as numbers"; },
|
||||||
{ name: "transparent"; type: "boolean"; default: false;
|
{ name: "transparent"; type: "bool"; default: false;
|
||||||
description: "Set up as a transparent proxy"; },
|
description: "Set up as a transparent proxy"; },
|
||||||
{ name: "timeout"; type: "int"; default: 5;
|
{ name: "timeout"; type: "int"; default: 5;
|
||||||
short: "t";
|
short: "t";
|
||||||
@ -53,7 +55,7 @@ config: {
|
|||||||
items: (
|
items: (
|
||||||
{ name: "host"; type: "string"; var: true; },
|
{ name: "host"; type: "string"; var: true; },
|
||||||
{ name: "port"; type: "string"; var: true; },
|
{ name: "port"; type: "string"; var: true; },
|
||||||
{ name: "keepalive"; type: "boolean"; default: false; }
|
{ name: "keepalive"; type: "bool"; default: false; }
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -65,11 +67,11 @@ config: {
|
|||||||
{ name: "host"; type: "string"; var: true; },
|
{ name: "host"; type: "string"; var: true; },
|
||||||
{ name: "port"; type: "string"; var: true; },
|
{ name: "port"; type: "string"; var: true; },
|
||||||
{ name: "service"; type: "string"; optional: true; },
|
{ name: "service"; type: "string"; optional: true; },
|
||||||
{ name: "fork"; type: "boolean"; default: false },
|
{ name: "fork"; type: "bool"; default: false },
|
||||||
{ name: "tfo_ok"; type: "boolean"; default: false;
|
{ name: "tfo_ok"; type: "bool"; default: false;
|
||||||
description: "Set to true if this protocol supports TCP FAST OPEN" },
|
description: "Set to true if this protocol supports TCP FAST OPEN" },
|
||||||
{ name: "log_level"; type: "int"; default: 1 },
|
{ name: "log_level"; type: "int"; default: 1 },
|
||||||
{ name: "keepalive"; type: "boolean"; default: false },
|
{ name: "keepalive"; type: "bool"; default: false },
|
||||||
{ name: "sni_hostnames",
|
{ name: "sni_hostnames",
|
||||||
type: "array",
|
type: "array",
|
||||||
element_type: "string"
|
element_type: "string"
|
||||||
|
2
t
2
t
@ -216,7 +216,7 @@ for my $binary (@binaries) {
|
|||||||
my $sslh_pid;
|
my $sslh_pid;
|
||||||
if (!($sslh_pid = fork)) {
|
if (!($sslh_pid = fork)) {
|
||||||
my $user = (getpwuid $<)[0]; # Run under current username
|
my $user = (getpwuid $<)[0]; # Run under current username
|
||||||
my $cmd = "./$binary -v 3 -f -u $user -Ftest.cfg";
|
my $cmd = "./$binary -v 4 -f -u $user -Ftest.cfg";
|
||||||
verbose_exec $cmd;
|
verbose_exec $cmd;
|
||||||
#exec "valgrind --leak-check=full ./$binary -v 3 -f -u $user --listen localhost:$sslh_port --ssh $ssh_address -ssl $ssl_address -P $pidfile";
|
#exec "valgrind --leak-check=full ./$binary -v 3 -f -u $user --listen localhost:$sslh_port --ssh $ssh_address -ssl $ssl_address -P $pidfile";
|
||||||
exit 0;
|
exit 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user