mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Added new Addon sslh Deamon for ssh/ssl proxy on red
This commit is contained in:
3
config/rootfiles/packages/sslh
Normal file
3
config/rootfiles/packages/sslh
Normal file
@@ -0,0 +1,3 @@
|
||||
usr/local/bin/sslh
|
||||
#usr/local/share/man/man8/sslh.8.gz
|
||||
etc/rc.d/init.d/sslh
|
||||
@@ -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
|
||||
|
||||
83
lfs/sslh
Normal file
83
lfs/sslh
Normal file
@@ -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)
|
||||
1
make.sh
1
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
|
||||
|
||||
49
src/initscripts/init.d/sslh
Normal file
49
src/initscripts/init.d/sslh
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user