]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Added new Addon sslh Deamon for ssh/ssl proxy on red
authormaniacikarus <maniacikarus@ipfire.org>
Sun, 25 Jan 2009 10:19:06 +0000 (11:19 +0100)
committermaniacikarus <maniacikarus@ipfire.org>
Sun, 25 Jan 2009 10:19:06 +0000 (11:19 +0100)
config/rootfiles/packages/sslh [new file with mode: 0644]
lfs/initscripts
lfs/sslh [new file with mode: 0644]
make.sh
src/initscripts/init.d/sslh [new file with mode: 0644]

diff --git a/config/rootfiles/packages/sslh b/config/rootfiles/packages/sslh
new file mode 100644 (file)
index 0000000..19b7265
--- /dev/null
@@ -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
index bceea2c4e2ef445daf0ab23ea922350fc0b2eb35..77f81471c055ffa646ffa21fd7ac83c2b20ae958 100644 (file)
@@ -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 (file)
index 0000000..7454a6d
--- /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 <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# 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 5efdee7ae84cd4fde5be7f6043f0e779e82da1ce..1e962ea8d986ca56c44a0fb790ad08c1b720d44e 100755 (executable)
--- 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 (file)
index 0000000..9c15213
--- /dev/null
@@ -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