mirror of
https://github.com/yrutschle/sslh.git
synced 2025-04-13 07:37:15 +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";
|
||||
parser: "sslh-conf.c";
|
||||
|
||||
printer: true;
|
||||
|
||||
conffile_option: ("F", "conffile");
|
||||
|
||||
# List of includes to define runtime types
|
||||
@ -18,16 +20,16 @@ config: {
|
||||
type: "list",
|
||||
items: (
|
||||
{ name: "verbose"; type: "int"; default: 0; short: "v"; },
|
||||
{ name: "foreground"; type: "boolean"; default: false;
|
||||
{ name: "foreground"; type: "bool"; default: false;
|
||||
short: "f";
|
||||
description: "Run in foreground instead of as a daemon"; },
|
||||
{ name: "inetd"; type: "boolean"; default: false;
|
||||
{ name: "inetd"; type: "bool"; default: false;
|
||||
short: "i";
|
||||
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";
|
||||
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"; },
|
||||
{ name: "timeout"; type: "int"; default: 5;
|
||||
short: "t";
|
||||
@ -53,7 +55,7 @@ config: {
|
||||
items: (
|
||||
{ name: "host"; 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: "port"; type: "string"; var: true; },
|
||||
{ name: "service"; type: "string"; optional: true; },
|
||||
{ name: "fork"; type: "boolean"; default: false },
|
||||
{ name: "tfo_ok"; type: "boolean"; default: false;
|
||||
{ name: "fork"; type: "bool"; default: false },
|
||||
{ name: "tfo_ok"; type: "bool"; default: false;
|
||||
description: "Set to true if this protocol supports TCP FAST OPEN" },
|
||||
{ name: "log_level"; type: "int"; default: 1 },
|
||||
{ name: "keepalive"; type: "boolean"; default: false },
|
||||
{ name: "keepalive"; type: "bool"; default: false },
|
||||
{ name: "sni_hostnames",
|
||||
type: "array",
|
||||
element_type: "string"
|
||||
|
2
t
2
t
@ -216,7 +216,7 @@ for my $binary (@binaries) {
|
||||
my $sslh_pid;
|
||||
if (!($sslh_pid = fork)) {
|
||||
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;
|
||||
#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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user