From: Toni Uhlig Date: Tue, 16 Aug 2022 19:29:57 +0000 (+0200) Subject: sslh: install sslh-select X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=49b85f9b5049e11d8bf1141de101212b530124d0;p=feed%2Fpackages.git sslh: install sslh-select Signed-off-by: Toni Uhlig --- diff --git a/net/sslh/Makefile b/net/sslh/Makefile index c8527d157a..cc2b7211a1 100644 --- a/net/sslh/Makefile +++ b/net/sslh/Makefile @@ -30,6 +30,15 @@ define Package/sslh URL:=https://rutschle.net/tech/sslh/README.html endef +define Package/sslh/config + config SSLH_SELECT + bool "Use sslh-select" + depends on PACKAGE_sslh + help + Use sslh-select instead of sslh-fork. + default n +endef + define Package/sslh/conffiles /etc/config/sslh /etc/sslh.conf @@ -40,7 +49,11 @@ MAKE_FLAGS += \ define Package/sslh/install $(INSTALL_DIR) $(1)/usr/sbin +ifeq ($(CONFIG_SSLH_SELECT),y) + $(INSTALL_BIN) $(PKG_BUILD_DIR)/sslh-select $(1)/usr/sbin/sslh +else $(INSTALL_BIN) $(PKG_BUILD_DIR)/sslh-fork $(1)/usr/sbin/sslh +endif $(INSTALL_DIR) $(1)/etc/init.d/ $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) $(INSTALL_DIR) $(1)/etc/config diff --git a/net/sslh/patches/001-configfile-fix.patch b/net/sslh/patches/001-configfile-fix.patch new file mode 100644 index 0000000000..d9344cdaa2 --- /dev/null +++ b/net/sslh/patches/001-configfile-fix.patch @@ -0,0 +1,30 @@ +--- a/basic.cfg ++++ b/basic.cfg +@@ -1,3 +1,7 @@ ++# **** Attention OpenWRT/LEDE Users **** ++# sslh command line arguments override arguments defined in this ++# configuration file (UCI uses command line arguments) ++ + # This is a basic configuration file that should provide + # sensible values for "standard" setup. + +@@ -15,15 +19,16 @@ chroot: "/var/empty"; + # Change hostname with your external address name. + listen: + ( +- { host: "thelonious"; port: "443"; } ++ { host: "0.0.0.0"; port: "443"; }, ++ { host: "[::]"; port: "443"; } + ); + + protocols: + ( + { name: "ssh"; service: "ssh"; host: "localhost"; port: "22"; fork: true; }, + { name: "openvpn"; host: "localhost"; port: "1194"; }, +- { name: "xmpp"; host: "localhost"; port: "5222"; }, +- { name: "http"; host: "localhost"; port: "80"; }, ++# { name: "xmpp"; host: "localhost"; port: "5222"; }, ++# { name: "http"; host: "localhost"; port: "80"; }, + { name: "tls"; host: "localhost"; port: "443"; log_level: 0; }, + { name: "anyprot"; host: "localhost"; port: "443"; } + ); diff --git a/net/sslh/patches/001-no_sslh_select.patch b/net/sslh/patches/001-no_sslh_select.patch deleted file mode 100644 index 0b57757dc6..0000000000 --- a/net/sslh/patches/001-no_sslh_select.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -70,7 +70,7 @@ all: sslh $(MAN) echosrv $(CONDITIONAL_T - version.h: - ./genver.sh >version.h - --sslh: sslh-fork sslh-select -+sslh: sslh-fork - - $(OBJS): version.h common.h collection.h sslh-conf.h gap.h - -@@ -81,10 +81,6 @@ sslh-fork: version.h $(OBJS) sslh-fork.o - $(CC) $(CFLAGS) $(LDFLAGS) -o sslh-fork sslh-fork.o $(OBJS) $(LIBS) - #strip sslh-fork - --sslh-select: version.h $(OBJS) sslh-select.o Makefile -- $(CC) $(CFLAGS) $(LDFLAGS) -o sslh-select sslh-select.o $(OBJS) $(LIBS) -- #strip sslh-select -- - systemd-sslh-generator: systemd-sslh-generator.o - $(CC) $(CFLAGS) $(LDFLAGS) -o systemd-sslh-generator systemd-sslh-generator.o -lconfig - -@@ -133,7 +129,7 @@ distclean: clean - rm -f tags sslh-conf.[ch] echosrv-conf.[ch] cscope.* - - clean: -- rm -f sslh-fork sslh-select echosrv version.h $(MAN) systemd-sslh-generator *.o *.gcov *.gcno *.gcda *.png *.html *.css *.info -+ rm -f sslh-fork echosrv version.h $(MAN) systemd-sslh-generator *.o *.gcov *.gcno *.gcda *.png *.html *.css *.info - - tags: - ctags --globals -T *.[ch] diff --git a/net/sslh/patches/002-configfile-fix.patch b/net/sslh/patches/002-configfile-fix.patch deleted file mode 100644 index d9344cdaa2..0000000000 --- a/net/sslh/patches/002-configfile-fix.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/basic.cfg -+++ b/basic.cfg -@@ -1,3 +1,7 @@ -+# **** Attention OpenWRT/LEDE Users **** -+# sslh command line arguments override arguments defined in this -+# configuration file (UCI uses command line arguments) -+ - # This is a basic configuration file that should provide - # sensible values for "standard" setup. - -@@ -15,15 +19,16 @@ chroot: "/var/empty"; - # Change hostname with your external address name. - listen: - ( -- { host: "thelonious"; port: "443"; } -+ { host: "0.0.0.0"; port: "443"; }, -+ { host: "[::]"; port: "443"; } - ); - - protocols: - ( - { name: "ssh"; service: "ssh"; host: "localhost"; port: "22"; fork: true; }, - { name: "openvpn"; host: "localhost"; port: "1194"; }, -- { name: "xmpp"; host: "localhost"; port: "5222"; }, -- { name: "http"; host: "localhost"; port: "80"; }, -+# { name: "xmpp"; host: "localhost"; port: "5222"; }, -+# { name: "http"; host: "localhost"; port: "80"; }, - { name: "tls"; host: "localhost"; port: "443"; log_level: 0; }, - { name: "anyprot"; host: "localhost"; port: "443"; } - );