From f8684fc9d69c82c54c33098879f49af426dab601 Mon Sep 17 00:00:00 2001 From: Yves Rutschle Date: Fri, 1 Apr 2022 19:35:16 +0200 Subject: [PATCH] add resolve_on_forward to c2s files (fix #326) --- echosrv-conf.c | 2 +- echosrv-conf.h | 2 +- sslh-conf.c | 43 +++++++++++++++++++++++++++++++------------ sslh-conf.h | 3 ++- 4 files changed, 35 insertions(+), 15 deletions(-) diff --git a/echosrv-conf.c b/echosrv-conf.c index 581c61e..25fddf4 100644 --- a/echosrv-conf.c +++ b/echosrv-conf.c @@ -1,5 +1,5 @@ /* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README) - * on Sun Sep 19 21:54:08 2021. + * on Fri Apr 1 19:34:31 2022. # conf2struct: generate libconf parsers that read to structs # Copyright (C) 2018-2021 Yves Rutschle diff --git a/echosrv-conf.h b/echosrv-conf.h index cfc9cc8..a8ecc3f 100644 --- a/echosrv-conf.h +++ b/echosrv-conf.h @@ -1,5 +1,5 @@ /* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README) - * on Sun Sep 19 21:54:08 2021. + * on Fri Apr 1 19:34:31 2022. # conf2struct: generate libconf parsers that read to structs # Copyright (C) 2018-2021 Yves Rutschle diff --git a/sslh-conf.c b/sslh-conf.c index 3dd5345..0d3268e 100644 --- a/sslh-conf.c +++ b/sslh-conf.c @@ -1,5 +1,5 @@ /* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README) - * on Sat Oct 2 09:01:25 2021. + * on Fri Apr 1 19:34:30 2022. # conf2struct: generate libconf parsers that read to structs # Copyright (C) 2018-2021 Yves Rutschle @@ -479,7 +479,7 @@ struct arg_file* sslhcfg_conffile; struct arg_str* sslhcfg_anyprot; struct arg_end* sslhcfg_end; - + static struct config_desc table_sslhcfg_protocols[] = { @@ -627,6 +627,22 @@ static struct config_desc table_sslhcfg_protocols[] = { /* default_val*/ .default_val.def_bool = 0 }, + { + /* name */ "resolve_on_forward", + /* type */ CFG_BOOL, + /* sub_group*/ NULL, + /* arg_cl */ NULL, + /* base_addr */ NULL, + /* offset */ offsetof(struct sslhcfg_protocols_item, resolve_on_forward), + /* offset_len */ 0, + /* offset_present */ 0, + /* size */ sizeof(int), + /* array_type */ -1, + /* mandatory */ 0, + /* optional */ 0, + /* default_val*/ .default_val.def_bool = 0 + }, + { /* name */ "log_level", /* type */ CFG_INT, @@ -1202,7 +1218,7 @@ static struct compound_cl_target sslhcfg_anyprot_targets [] = { { & table_sslhcfg_protocols[0], 0, .value.def_string = "anyprot" }, { & table_sslhcfg_protocols[1], 1, .value.def_string = "0" }, { & table_sslhcfg_protocols[2], 2, .value.def_string = "0" }, - { & table_sslhcfg_protocols[9], 0, .value.def_int = 1 }, + { & table_sslhcfg_protocols[10], 0, .value.def_int = 1 }, { 0 } }; @@ -1210,7 +1226,7 @@ static struct compound_cl_target sslhcfg_syslog_targets [] = { { & table_sslhcfg_protocols[0], 0, .value.def_string = "syslog" }, { & table_sslhcfg_protocols[1], 1, .value.def_string = "0" }, { & table_sslhcfg_protocols[2], 2, .value.def_string = "0" }, - { & table_sslhcfg_protocols[9], 0, .value.def_int = 1 }, + { & table_sslhcfg_protocols[10], 0, .value.def_int = 1 }, { 0 } }; @@ -1218,7 +1234,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[9], 0, .value.def_int = 1 }, + { & table_sslhcfg_protocols[10], 0, .value.def_int = 1 }, { 0 } }; @@ -1226,7 +1242,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[9], 0, .value.def_int = 1 }, + { & table_sslhcfg_protocols[10], 0, .value.def_int = 1 }, { 0 } }; @@ -1234,7 +1250,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[9], 0, .value.def_int = 1 }, + { & table_sslhcfg_protocols[10], 0, .value.def_int = 1 }, { 0 } }; @@ -1242,7 +1258,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[9], 0, .value.def_int = 1 }, + { & table_sslhcfg_protocols[10], 0, .value.def_int = 1 }, { 0 } }; @@ -1250,7 +1266,7 @@ static struct compound_cl_target sslhcfg_tinc_targets [] = { { & table_sslhcfg_protocols[0], 0, .value.def_string = "tinc" }, { & table_sslhcfg_protocols[1], 1, .value.def_string = "0" }, { & table_sslhcfg_protocols[2], 2, .value.def_string = "0" }, - { & table_sslhcfg_protocols[9], 0, .value.def_int = 1 }, + { & table_sslhcfg_protocols[10], 0, .value.def_int = 1 }, { & table_sslhcfg_protocols[7], 0, .value.def_bool = 1 }, { 0 } }; @@ -1259,7 +1275,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[9], 0, .value.def_int = 1 }, + { & table_sslhcfg_protocols[10], 0, .value.def_int = 1 }, { & table_sslhcfg_protocols[7], 0, .value.def_bool = 1 }, { 0 } }; @@ -1268,7 +1284,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[9], 0, .value.def_int = 1 }, + { & table_sslhcfg_protocols[10], 0, .value.def_int = 1 }, { & table_sslhcfg_protocols[7], 0, .value.def_bool = 1 }, { 0 } }; @@ -1278,7 +1294,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[6], 0, .value.def_bool = 1 }, - { & table_sslhcfg_protocols[9], 0, .value.def_int = 1 }, + { & table_sslhcfg_protocols[10], 0, .value.def_int = 1 }, { & table_sslhcfg_protocols[7], 0, .value.def_bool = 1 }, { 0 } }; @@ -2200,6 +2216,9 @@ static void sslhcfg_protocols_fprint( fprintf(out, "transparent: %d", sslhcfg_protocols->transparent); fprintf(out, "\n"); indent(out, depth); + fprintf(out, "resolve_on_forward: %d", sslhcfg_protocols->resolve_on_forward); + fprintf(out, "\n"); + indent(out, depth); fprintf(out, "log_level: %d", sslhcfg_protocols->log_level); fprintf(out, "\n"); indent(out, depth); diff --git a/sslh-conf.h b/sslh-conf.h index e284232..527b7fa 100644 --- a/sslh-conf.h +++ b/sslh-conf.h @@ -1,5 +1,5 @@ /* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README) - * on Sat Oct 2 09:01:25 2021. + * on Fri Apr 1 19:34:30 2022. # conf2struct: generate libconf parsers that read to structs # Copyright (C) 2018-2021 Yves Rutschle @@ -58,6 +58,7 @@ struct sslhcfg_protocols_item { int fork; int tfo_ok; int transparent; + int resolve_on_forward; int log_level; int keepalive; size_t sni_hostnames_len;