syslog connections when specifying probes on the command line

This commit is contained in:
yrutschle 2020-06-19 23:38:33 +02:00
parent 408c5741f8
commit 9e2cc93973
3 changed files with 30 additions and 11 deletions

View File

@ -1,5 +1,5 @@
/* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README)
* on Sun Jan 26 21:17:47 2020.
* on Fri Jun 19 23:36:04 2020.
# conf2struct: generate libconf parsers that read to structs
# Copyright (C) 2018-2019 Yves Rutschle
@ -781,6 +781,7 @@ static struct compound_cl_target sslhcfg_socks5_targets [] = {
{ & table_sslhcfg_protocols[0], 0, .value.def_string = "socks5" },
{ & table_sslhcfg_protocols[1], 1, .value.def_string = "0" },
{ & table_sslhcfg_protocols[2], 2, .value.def_string = "0" },
{ & table_sslhcfg_protocols[6], 0, .value.def_int = 1 },
{ 0 }
};
@ -788,6 +789,7 @@ static struct compound_cl_target sslhcfg_adb_targets [] = {
{ & table_sslhcfg_protocols[0], 0, .value.def_string = "adb" },
{ & table_sslhcfg_protocols[1], 1, .value.def_string = "0" },
{ & table_sslhcfg_protocols[2], 2, .value.def_string = "0" },
{ & table_sslhcfg_protocols[6], 0, .value.def_int = 1 },
{ 0 }
};
@ -795,6 +797,7 @@ static struct compound_cl_target sslhcfg_http_targets [] = {
{ & table_sslhcfg_protocols[0], 0, .value.def_string = "http" },
{ & table_sslhcfg_protocols[1], 1, .value.def_string = "0" },
{ & table_sslhcfg_protocols[2], 2, .value.def_string = "0" },
{ & table_sslhcfg_protocols[6], 0, .value.def_int = 1 },
{ 0 }
};
@ -802,6 +805,7 @@ static struct compound_cl_target sslhcfg_xmpp_targets [] = {
{ & table_sslhcfg_protocols[0], 0, .value.def_string = "xmpp" },
{ & table_sslhcfg_protocols[1], 1, .value.def_string = "0" },
{ & table_sslhcfg_protocols[2], 2, .value.def_string = "0" },
{ & table_sslhcfg_protocols[6], 0, .value.def_int = 1 },
{ 0 }
};
@ -809,6 +813,7 @@ static struct compound_cl_target sslhcfg_tinc_targets [] = {
{ & table_sslhcfg_protocols[0], 0, .value.def_string = "openvpn" },
{ & table_sslhcfg_protocols[1], 1, .value.def_string = "0" },
{ & table_sslhcfg_protocols[2], 2, .value.def_string = "0" },
{ & table_sslhcfg_protocols[6], 0, .value.def_int = 1 },
{ & table_sslhcfg_protocols[5], 0, .value.def_bool = 1 },
{ 0 }
};
@ -817,6 +822,7 @@ static struct compound_cl_target sslhcfg_openvpn_targets [] = {
{ & table_sslhcfg_protocols[0], 0, .value.def_string = "openvpn" },
{ & table_sslhcfg_protocols[1], 1, .value.def_string = "0" },
{ & table_sslhcfg_protocols[2], 2, .value.def_string = "0" },
{ & table_sslhcfg_protocols[6], 0, .value.def_int = 1 },
{ & table_sslhcfg_protocols[5], 0, .value.def_bool = 1 },
{ 0 }
};
@ -825,6 +831,7 @@ static struct compound_cl_target sslhcfg_tls_targets [] = {
{ & table_sslhcfg_protocols[0], 0, .value.def_string = "tls" },
{ & table_sslhcfg_protocols[1], 1, .value.def_string = "0" },
{ & table_sslhcfg_protocols[2], 2, .value.def_string = "0" },
{ & table_sslhcfg_protocols[6], 0, .value.def_int = 1 },
{ & table_sslhcfg_protocols[5], 0, .value.def_bool = 1 },
{ 0 }
};
@ -834,6 +841,7 @@ static struct compound_cl_target sslhcfg_ssh_targets [] = {
{ & table_sslhcfg_protocols[1], 1, .value.def_string = "0" },
{ & table_sslhcfg_protocols[2], 2, .value.def_string = "0" },
{ & table_sslhcfg_protocols[4], 0, .value.def_bool = 1 },
{ & table_sslhcfg_protocols[6], 0, .value.def_int = 1 },
{ & table_sslhcfg_protocols[5], 0, .value.def_bool = 1 },
{ 0 }
};
@ -1518,6 +1526,7 @@ static void sslhcfg_protocols_fprint(
struct sslhcfg_protocols_item* sslhcfg_protocols,
int depth)
{
int i;
indent(out, depth);
fprintf(out, "name: %s", sslhcfg_protocols->name);
fprintf(out, "\n");
@ -1546,19 +1555,19 @@ static void sslhcfg_protocols_fprint(
fprintf(out, "\n");
indent(out, depth);
fprintf(out, "sni_hostnames [%zu]:\n", sslhcfg_protocols->sni_hostnames_len);
for (int i = 0; i < sslhcfg_protocols->sni_hostnames_len; i++) {
for (i = 0; i < sslhcfg_protocols->sni_hostnames_len; i++) {
indent(out, depth+1);
fprintf(out, "%d:\t%s\n", i, sslhcfg_protocols->sni_hostnames[i]);
}
indent(out, depth);
fprintf(out, "alpn_protocols [%zu]:\n", sslhcfg_protocols->alpn_protocols_len);
for (int i = 0; i < sslhcfg_protocols->alpn_protocols_len; i++) {
for (i = 0; i < sslhcfg_protocols->alpn_protocols_len; i++) {
indent(out, depth+1);
fprintf(out, "%d:\t%s\n", i, sslhcfg_protocols->alpn_protocols[i]);
}
indent(out, depth);
fprintf(out, "regex_patterns [%zu]:\n", sslhcfg_protocols->regex_patterns_len);
for (int i = 0; i < sslhcfg_protocols->regex_patterns_len; i++) {
for (i = 0; i < sslhcfg_protocols->regex_patterns_len; i++) {
indent(out, depth+1);
fprintf(out, "%d:\t%s\n", i, sslhcfg_protocols->regex_patterns[i]);
}
@ -1574,6 +1583,7 @@ static void sslhcfg_listen_fprint(
struct sslhcfg_listen_item* sslhcfg_listen,
int depth)
{
indent(out, depth);
fprintf(out, "host: %s", sslhcfg_listen->host);
fprintf(out, "\n");
@ -1590,6 +1600,7 @@ void sslhcfg_fprint(
struct sslhcfg_item* sslhcfg,
int depth)
{
int i;
indent(out, depth);
fprintf(out, "verbose: %d", sslhcfg->verbose);
fprintf(out, "\n");
@ -1632,13 +1643,13 @@ void sslhcfg_fprint(
indent(out, depth);
fprintf(out, "listen [%zu]:\n", sslhcfg->listen_len);
for (int i = 0; i < sslhcfg->listen_len; i++) {
for (i = 0; i < sslhcfg->listen_len; i++) {
sslhcfg_listen_fprint(out, &sslhcfg->listen[i], depth+1);
}
indent(out, depth);
fprintf(out, "protocols [%zu]:\n", sslhcfg->protocols_len);
for (int i = 0; i < sslhcfg->protocols_len; i++) {
for (i = 0; i < sslhcfg->protocols_len; i++) {
sslhcfg_protocols_fprint(out, &sslhcfg->protocols[i], depth+1);
}
}

View File

@ -1,5 +1,5 @@
/* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README)
* on Sun Jan 26 21:17:47 2020.
* on Fri Jun 19 23:36:04 2020.
# conf2struct: generate libconf parsers that read to structs
# Copyright (C) 2018-2019 Yves Rutschle

View File

@ -129,6 +129,7 @@ cl_groups: (
{ path: "host"; value: "$1" },
{ path: "port"; value: "$2" },
{ path: "fork"; value: 1 },
{ path: "log_level"; value: 1 },
{ path: "tfo_ok"; value: 1 }
);
},
@ -140,6 +141,7 @@ cl_groups: (
{ path: "name"; value: "tls" },
{ path: "host"; value: "$1" },
{ path: "port"; value: "$2" },
{ path: "log_level"; value: 1 },
{ path: "tfo_ok"; value: 1 }
);
},
@ -151,6 +153,7 @@ cl_groups: (
{ path: "name"; value: "openvpn" },
{ path: "host"; value: "$1" },
{ path: "port"; value: "$2" },
{ path: "log_level"; value: 1 },
{ path: "tfo_ok"; value: 1 }
);
},
@ -162,6 +165,7 @@ cl_groups: (
{ path: "name"; value: "openvpn" },
{ path: "host"; value: "$1" },
{ path: "port"; value: "$2" },
{ path: "log_level"; value: 1 },
{ path: "tfo_ok"; value: 1 }
);
},
@ -172,7 +176,8 @@ cl_groups: (
targets: (
{ path: "name"; value: "xmpp" },
{ path: "host"; value: "$1" },
{ path: "port"; value: "$2" }
{ path: "port"; value: "$2" },
{ path: "log_level"; value: 1 }
);
},
{ name: "http"; pattern: "(.+):(\w+)"; description: "Set up HTTP (plain) target";
@ -182,7 +187,8 @@ cl_groups: (
targets: (
{ path: "name"; value: "http" },
{ path: "host"; value: "$1" },
{ path: "port"; value: "$2" }
{ path: "port"; value: "$2" },
{ path: "log_level"; value: 1 }
);
},
{ name: "adb"; pattern: "(.+):(\w+)"; description: "Set up ADB (Android Debug) target";
@ -192,7 +198,8 @@ cl_groups: (
targets: (
{ path: "name"; value: "adb" },
{ path: "host"; value: "$1" },
{ path: "port"; value: "$2" }
{ path: "port"; value: "$2" },
{ path: "log_level"; value: 1 }
);
},
{ name: "socks5"; pattern: "(.+):(\w+)"; description: "Set up socks5 target";
@ -202,7 +209,8 @@ cl_groups: (
targets: (
{ path: "name"; value: "socks5" },
{ path: "host"; value: "$1" },
{ path: "port"; value: "$2" }
{ path: "port"; value: "$2" },
{ path: "log_level"; value: 1 }
);
}
)