From b1517f27a8de7f6ee4970647fbb636ec9ee62d10 Mon Sep 17 00:00:00 2001 From: g1franc Date: Thu, 31 Mar 2022 00:06:48 +0200 Subject: [PATCH 1/3] Update README.MacOSX Should be *tls* as argument here instead of old *ssl* --- doc/README.MacOSX | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/README.MacOSX b/doc/README.MacOSX index 2e70a7b..0f69ed2 100644 --- a/doc/README.MacOSX +++ b/doc/README.MacOSX @@ -33,7 +33,7 @@ with launchctl or simply reboot. 0.0.0.0:443 --ssh localhost:22 - --ssl + --tls localhost:443 QueueDirectories From 5def70dff5a19f2b2678ef649bdfa56d1c1e8235 Mon Sep 17 00:00:00 2001 From: Yves Rutschle Date: Fri, 1 Apr 2022 19:34:25 +0200 Subject: [PATCH 2/3] fix dependencies so conf2struct gets called before sslh-conf.h is used --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d8ed217..e470246 100644 --- a/Makefile +++ b/Makefile @@ -28,9 +28,9 @@ CFLAGS ?=-Wall -DLIBPCRE -g $(CFLAGS_COV) LIBS=-lm -lpcre2-8 OBJS=sslh-conf.o common.o log.o sslh-main.o probe.o tls.o argtable3.o collection.o gap.o -FORK_OBJS=sslh-fork.o $(OBJS) -SELECT_OBJS=sslh-select.o $(OBJS) processes.o udp-listener.o -EV_OBJS=sslh-ev.o $(OBJS) processes.o udp-listener.o +FORK_OBJS=$(OBJS) sslh-fork.o +SELECT_OBJS=$(OBJS) processes.o udp-listener.o sslh-select.o +EV_OBJS=$(OBJS) processes.o udp-listener.o sslh-ev.o CONDITIONAL_TARGETS= From f8684fc9d69c82c54c33098879f49af426dab601 Mon Sep 17 00:00:00 2001 From: Yves Rutschle Date: Fri, 1 Apr 2022 19:35:16 +0200 Subject: [PATCH 3/3] 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;