[package] sslh: update to 1.9
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 30 Sep 2011 12:49:09 +0000 (12:49 +0000)
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 30 Sep 2011 12:49:09 +0000 (12:49 +0000)
his patch bumps the sslh package to v1.9.

This update brings about some useful changes, including:

* Multiple bind address support
* IPv6 support
* OpenVPN support
* tinc VPN support

Tested and working on ar71xx.

Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/packages@28331 3c298f89-4303-0410-b956-a3cf2f4a3e73

net/sslh/Makefile
net/sslh/files/sslh.config
net/sslh/files/sslh.init
net/sslh/patches/001-no_sslh_select.patch [new file with mode: 0644]
net/sslh/patches/001-no_strip.patch
net/sslh/patches/002-no_strip.patch [new file with mode: 0644]

index b5d32d2..4a568a1 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sslh
-PKG_VERSION:=1.7a
-PKG_RELEASE:=2
+PKG_VERSION:=1.9
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://rutschle.net/tech/
-PKG_MD5SUM:=ee124654412198a5e11fe28acf10634d
+PKG_MD5SUM:=1c0193853ef35f80e3e4b1a744832cd1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -40,7 +40,7 @@ endef
 
 define Package/sslh/install
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/sslh $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/sslh-fork $(1)/usr/sbin/sslh
        $(INSTALL_DIR) $(1)/etc/init.d/
        $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
        $(INSTALL_DIR) $(1)/etc/config
index 3e22c17..e4a21d1 100644 (file)
@@ -4,14 +4,21 @@ config 'sslh' 'default'
        # disable or enable
        option 'enable' '1'
        # listen defaults to '0.0.0.0:443' (all interfaces)
+       # multiple -p arguments may be supplied using a uci list
        # -p <listenaddr>:<listenport>
        option 'listen' ''
        # ssh defaults to 'localhost:22'
-       # -s <sshhost>:<sshport>
+       # --ssh <sshhost>:<sshport>
        option 'ssh' ''
        # ssl defaults to 'localhost:443'
-       # -l <sslhost>:<sslport>
+       # --ssl <sslhost>:<sslport>
        option 'ssl' ''
+       # openvpn defaults to 'localhost:1194'
+       # --openvpn <openvpnhost>:<openvpnport>
+       option 'openvpn' ''
+       # tinc defaults to 'localhost:655'
+       # --tinc <tinchost>:<tincport>
+       option 'tinc' ''
        # timeout (for ssh, then ssl is assumed) defaults to 2
        # -t
        option 'timeout' ''
index 98b7d84..8de2725 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2009-2010 OpenWrt.org
+# Copyright (C) 2009-2011 OpenWrt.org
 
 NAME=sslh
 PROG=/usr/sbin/sslh
@@ -24,18 +24,24 @@ sslh_start()
        local args="-P /var/run/${NAME}.${PIDCOUNT}.pid"
        local val
        # A) listen parameter
-       config_get val "${section}" listen
-       [ -n "${val}" ] && append args "-p ${val}"
+       config_get vals "${section}" listen
+       [ -n "${vals}" ] && for val in $vals; do append args "-p ${val}"; done
        # B) ssh parameter
        config_get val "${section}" ssh
-       [ -n "${val}" ] && append args "-s ${val}"
+       [ -n "${val}" ] && append args "--ssh ${val}"
        # C) ssl parameter
        config_get val "${section}" ssl
-       [ -n "${val}" ] && append args "-l ${val}"
-       # D) timeout (for ssh, then ssl is assumed)
+       [ -n "${val}" ] && append args "--ssl ${val}"
+       # D) openvpn parameter
+        config_get val "${section}" openvpn
+        [ -n "${val}" ] && append args "--openvpn ${val}"
+       # E) tinc parameter
+        config_get val "${section}" tinc
+        [ -n "${val}" ] && append args "--tinc ${val}"
+       # F) timeout (before a connection is considered to be SSH)
        config_get val "${section}" timeout
        [ -n "${val}" ] && append args "-t ${val}"
-       # E) verbose parameter
+       # G) verbose parameter
        local verbosed
        config_get_bool verbosed "${section}" verbose 0
        [ "${verbosed}" -ne 0 ] && append args "-v"
diff --git a/net/sslh/patches/001-no_sslh_select.patch b/net/sslh/patches/001-no_sslh_select.patch
new file mode 100644 (file)
index 0000000..9dd4ef6
--- /dev/null
@@ -0,0 +1,29 @@
+--- a/Makefile
++++ b/Makefile
+@@ -27,16 +27,12 @@
+       $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -c $<
+-sslh: $(OBJS) sslh-fork sslh-select
++sslh: $(OBJS) sslh-fork
+ sslh-fork: $(OBJS) sslh-fork.o Makefile common.h
+       $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh-fork sslh-fork.o $(OBJS) $(LIBS)
+       strip sslh-fork
+-sslh-select: $(OBJS) sslh-select.o Makefile common.h 
+-      $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh-select sslh-select.o $(OBJS) $(LIBS)
+-      strip sslh-select
+-
+ $(MAN): sslh.pod Makefile
+       pod2man --section=8 --release=$(VERSION) --center=" " sslh.pod | gzip -9 - > $(MAN)
+@@ -58,7 +54,7 @@
+       update-rc.d sslh remove
+ clean:
+-      rm -f sslh-fork sslh-select $(MAN) *.o
++      rm -f sslh-fork $(MAN) *.o
+ tags:
+       ctags -T *.[ch]
index cf6e53d..e69de29 100644 (file)
@@ -1,10 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -24,7 +24,6 @@ all: sslh $(MAN)
- sslh: sslh.c Makefile
-       $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh sslh.c $(LIBS)
--      strip sslh
- $(MAN): sslh.pod Makefile
-       pod2man --section=8 --release=$(VERSION) --center=" " sslh.pod | gzip -9 - > $(MAN)
diff --git a/net/sslh/patches/002-no_strip.patch b/net/sslh/patches/002-no_strip.patch
new file mode 100644 (file)
index 0000000..5ca74ee
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/Makefile
++++ b/Makefile
+@@ -31,7 +31,6 @@
+ sslh-fork: $(OBJS) sslh-fork.o Makefile common.h
+       $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh-fork sslh-fork.o $(OBJS) $(LIBS)
+-      strip sslh-fork
+ sslh-select: $(OBJS) sslh-select.o Makefile common.h 
+       $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh-select sslh-select.o $(OBJS) $(LIBS)