From: maniacikarus Date: Sun, 25 Jan 2009 10:19:06 +0000 (+0100) Subject: Added new Addon sslh Deamon for ssh/ssl proxy on red X-Git-Tag: v2.5-beta1~201 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0515b01f7ced53d877109d1ad7fb5edac78cda2;p=people%2Fpmueller%2Fipfire-2.x.git Added new Addon sslh Deamon for ssh/ssl proxy on red --- diff --git a/config/rootfiles/packages/sslh b/config/rootfiles/packages/sslh new file mode 100644 index 0000000000..19b7265253 --- /dev/null +++ b/config/rootfiles/packages/sslh @@ -0,0 +1,3 @@ +usr/local/bin/sslh +#usr/local/share/man/man8/sslh.8.gz +etc/rc.d/init.d/sslh \ No newline at end of file diff --git a/lfs/initscripts b/lfs/initscripts index bceea2c4e2..77f81471c0 100644 --- a/lfs/initscripts +++ b/lfs/initscripts @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# Copyright (C) 2009 Michael Tremer & Christian Schmidt # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -138,6 +138,9 @@ $(TARGET) : ln -sf ../init.d/mediatomb /etc/rc.d/rc3.d/S98mediatomb ln -sf ../init.d/mediatomb /etc/rc.d/rc0.d/K02mediatomb ln -sf ../init.d/mediatomb /etc/rc.d/rc6.d/K02mediatomb + ln -sf ../init.d/sslh /etc/rc.d/rc3.d/S98sslh + ln -sf ../init.d/sslh /etc/rc.d/rc0.d/K02sslh + ln -sf ../init.d/sslh /etc/rc.d/rc6.d/K02sslh ln -sf ../init.d/mountkernfs /etc/rc.d/rcsysinit.d/S00mountkernfs ln -sf ../init.d/modules /etc/rc.d/rcsysinit.d/S05modules diff --git a/lfs/sslh b/lfs/sslh new file mode 100644 index 0000000000..7454a6d78e --- /dev/null +++ b/lfs/sslh @@ -0,0 +1,83 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2009 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 1.6g + +THISAPP = sslh-$(VER) +DL_FILE = $(THISAPP).tar.gz +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) +PROG = sslh +PAK_VER = 1 + +DEPS = "" + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = dc27a0fbcc9b3e434c203df7bc3c283a + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +dist: + @$(PAK) + +############################################################################### +# Downloading, checking, md5sum +############################################################################### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + @$(LOAD) + +$(subst %,%_MD5,$(objects)) : + @$(MD5) + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && make install + cp $(DIR_APP)/sslh /usr/local/bin + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/make.sh b/make.sh index 5efdee7ae8..1e962ea8d9 100755 --- a/make.sh +++ b/make.sh @@ -590,6 +590,7 @@ buildipfire() { ipfiremake sqlite ipfiremake taglib ipfiremake mediatomb + ipfiremake sslh echo Build on $HOSTNAME > $BASEDIR/build/var/ipfire/firebuild cat /proc/version >> $BASEDIR/build/var/ipfire/firebuild echo >> $BASEDIR/build/var/ipfire/firebuild diff --git a/src/initscripts/init.d/sslh b/src/initscripts/init.d/sslh new file mode 100644 index 0000000000..9c15213b8f --- /dev/null +++ b/src/initscripts/init.d/sslh @@ -0,0 +1,49 @@ +#!/bin/sh +# Begin $rc_base/init.d/sslh + +# Based on sysklogd script from LFS-3.1 and earlier. +# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org + +#$LastChangedBy: bdubbs $ +#$Date: 2006-09-10 19:41:47 -0500 (Sun, 10 Sep 2006) $ + +. /etc/sysconfig/rc +. $rc_functions + +case "$1" in + start) + boot_mesg "Starting SSLH Deamon..." + loadproc /usr/local/bin/sslh -u nobody -p `cat /var/ipfire/red/local-ipaddress`:443 -s localhost:222 -l localhost:444 + evaluate_retval + + if ! grep -q "443:443" /var/ipfire/xtaccess/config ; then + echo "tcp,0.0.0.0/0,443:443,on,0.0.0.0,SSLH" >> /var/ipfire/xtaccess/config + /usr/local/bin/setxtaccess + fi + + + ;; + + stop) + boot_mesg "Stopping SSLH Deamon..." + killproc /usr/local/bin/sslh + evaluate_retval + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + status) + statusproc /usr/local/bin/sslh + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +# End $rc_base/init.d/sslh