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
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
--- /dev/null
+--- 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"; }
+ );
+++ /dev/null
---- 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]
+++ /dev/null
---- 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"; }
- );