[package] sslh: update to 1.9

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
This commit is contained in:
florian 2011-09-30 12:49:09 +00:00
parent a67ec6f2c2
commit d2dc569f99
6 changed files with 65 additions and 23 deletions

View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=sslh PKG_NAME:=sslh
PKG_VERSION:=1.7a PKG_VERSION:=1.9
PKG_RELEASE:=2 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://rutschle.net/tech/ PKG_SOURCE_URL:=http://rutschle.net/tech/
PKG_MD5SUM:=ee124654412198a5e11fe28acf10634d PKG_MD5SUM:=1c0193853ef35f80e3e4b1a744832cd1
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
@ -40,7 +40,7 @@ endef
define Package/sslh/install define Package/sslh/install
$(INSTALL_DIR) $(1)/usr/sbin $(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_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
$(INSTALL_DIR) $(1)/etc/config $(INSTALL_DIR) $(1)/etc/config

View File

@ -4,14 +4,21 @@ config 'sslh' 'default'
# disable or enable # disable or enable
option 'enable' '1' option 'enable' '1'
# listen defaults to '0.0.0.0:443' (all interfaces) # listen defaults to '0.0.0.0:443' (all interfaces)
# multiple -p arguments may be supplied using a uci list
# -p <listenaddr>:<listenport> # -p <listenaddr>:<listenport>
option 'listen' '' option 'listen' ''
# ssh defaults to 'localhost:22' # ssh defaults to 'localhost:22'
# -s <sshhost>:<sshport> # --ssh <sshhost>:<sshport>
option 'ssh' '' option 'ssh' ''
# ssl defaults to 'localhost:443' # ssl defaults to 'localhost:443'
# -l <sslhost>:<sslport> # --ssl <sslhost>:<sslport>
option 'ssl' '' 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 # timeout (for ssh, then ssl is assumed) defaults to 2
# -t # -t
option 'timeout' '' option 'timeout' ''

View File

@ -1,5 +1,5 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
# Copyright (C) 2009-2010 OpenWrt.org # Copyright (C) 2009-2011 OpenWrt.org
NAME=sslh NAME=sslh
PROG=/usr/sbin/sslh PROG=/usr/sbin/sslh
@ -24,18 +24,24 @@ sslh_start()
local args="-P /var/run/${NAME}.${PIDCOUNT}.pid" local args="-P /var/run/${NAME}.${PIDCOUNT}.pid"
local val local val
# A) listen parameter # A) listen parameter
config_get val "${section}" listen config_get vals "${section}" listen
[ -n "${val}" ] && append args "-p ${val}" [ -n "${vals}" ] && for val in $vals; do append args "-p ${val}"; done
# B) ssh parameter # B) ssh parameter
config_get val "${section}" ssh config_get val "${section}" ssh
[ -n "${val}" ] && append args "-s ${val}" [ -n "${val}" ] && append args "--ssh ${val}"
# C) ssl parameter # C) ssl parameter
config_get val "${section}" ssl config_get val "${section}" ssl
[ -n "${val}" ] && append args "-l ${val}" [ -n "${val}" ] && append args "--ssl ${val}"
# D) timeout (for ssh, then ssl is assumed) # 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 config_get val "${section}" timeout
[ -n "${val}" ] && append args "-t ${val}" [ -n "${val}" ] && append args "-t ${val}"
# E) verbose parameter # G) verbose parameter
local verbosed local verbosed
config_get_bool verbosed "${section}" verbose 0 config_get_bool verbosed "${section}" verbose 0
[ "${verbosed}" -ne 0 ] && append args "-v" [ "${verbosed}" -ne 0 ] && append args "-v"

View File

@ -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]

View 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)

View File

@ -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)