Add ss5 3.6.1, SOCKS v4/v5 application layer gateway with many features

PR:		ports/111187
Submitted by:	Raffaele De Lorenzo <raffaele.delorenzo at libero.it>
This commit is contained in:
Rong-En Fan 2007-04-16 11:59:08 +00:00
parent 3783392432
commit fcd0f472f0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=190116
7 changed files with 264 additions and 0 deletions

View File

@ -803,6 +803,7 @@
SUBDIR += spoofer
SUBDIR += spread
SUBDIR += spread-j
SUBDIR += ss5
SUBDIR += ssldump
SUBDIR += ssltunnel-client
SUBDIR += ssltunnel-server

40
net/ss5/Makefile Normal file
View File

@ -0,0 +1,40 @@
# New ports collection makefile for: ss5
# Date created: 25 August 2006
# Whom: Raffaele De Lorenzo - raffaele.delorenzo@libero.it
#
# $FreeBSD$
#
PORTNAME= ss5
PORTVERSION= 3.6.1
CATEGORIES= net security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ss5
DISTNAME= ${PORTNAME}-${PORTVERSION}-1
MAINTAINER= raffaele.delorenzo@libero.it
COMMENT= SOCKS v4/v5 application layer gateway with many features
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USE_OPENLDAP= yes
USE_RC_SUBR= ${PORTNAME}
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-binpathbase=${PREFIX}/sbin \
--with-docpathbase=${PREFIX}/share/doc \
--with-confpathbase=${PREFIX}/etc \
--with-libpath=${PREFIX}/lib
MAKE_ENV= DATADIR=${DATADIR} EXAMPLESDIR=${EXAMPLESDIR}
MAN1= ss5.1
MAN5= ss5.conf.5 ss5.pam.5 ss5.passwd.5 ss5.peers.5
MANCOMPRESSED= yes
post-patch:
@${REINPLACE_CMD} -e 's,/usr/local,${PREFIX},g' ${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's,/usr/local/etc/opt/ss5,${PREFIX}/etc/ss5,' \
${WRKSRC}/include/config.h.in
.include <bsd.port.mk>

3
net/ss5/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (ss5-3.6.1-1.tar.gz) = f86699139f6d1ac457b7cb96a2056924
SHA256 (ss5-3.6.1-1.tar.gz) = d5af69ce5a426e1d9893cf22a3e7df7c7e87a7884273d0eba10cd13f6b97dd03
SIZE (ss5-3.6.1-1.tar.gz) = 386642

View File

@ -0,0 +1,162 @@
--- Makefile.in.orig Thu Sep 7 17:29:01 2006
+++ Makefile.in Mon Apr 16 19:56:30 2007
@@ -10,6 +10,18 @@
log_path_base = @log_path_base@
trc_path_base = @trc_path_base@
+# FreeBSD changes for correct pathname
+
+#ss5_pam = /usr/local/etc/pam.d/ss5
+#ss5_share = /usr/local/share/ss5
+#ss5_examples = /usr/local/share/examples/ss5
+#ss5_man = /usr/local/share/man
+
+ss5_pam = ${PREFIX}/etc/pam.d/ss5
+ss5_share = ${DATADIR}
+ss5_examples = ${EXAMPLESDIR}
+ss5_man = ${MANPREFIX}/man
+
SSOBJ = SS5Main.o \
SS5Core.o \
SS5Server.o \
@@ -42,10 +54,21 @@
@( if [ ! -d $(dst_dir)$(lib_path_base)/ss5 ]; then mkdir -p $(dst_dir)$(lib_path_base)/ss5; fi )
@( find modules -name *.so -exec cp {} $(dst_dir)$(lib_path_base)/ss5/ \; )
- @( cp modules/mod_statistics/statmgr.cgi $(dst_dir)$(lib_path_base)/ss5/ )
- @( cp modules/mod_balance/balamgr.cgi $(dst_dir)$(lib_path_base)/ss5/ )
- @( cp modules/mod_statistics/SS5Logo.jpg $(dst_dir)$(lib_path_base)/ss5/ )
- @( cp modules/mod_balance/SS5Logo.jpg $(dst_dir)$(lib_path_base)/ss5/ )
+
+ @( if [ ! -d $(ss5_share) ] && [ $(OS) = "FreeBSD" ]; then mkdir -p $(ss5_share); fi )
+ @( if [ $(OS) = "FreeBSD" ]; then \
+ cp modules/mod_statistics/statmgr.cgi $(ss5_share)/ ; \
+ cp modules/mod_balance/balamgr.cgi $(ss5_share)/ ; \
+ cp modules/mod_statistics/SS5Logo.jpg $(ss5_share)/ ; \
+ cp modules/mod_balance/SS5Logo.jpg $(ss5_share)/ ; \
+ fi )
+
+ @( if [ $(OS) = "Linux" ] || [ $(OS) = "SunOS" ]; then \
+ cp modules/mod_statistics/statmgr.cgi $(dst_dir)$(lib_path_base)/ss5/ ; \
+ cp modules/mod_balance/balamgr.cgi $(dst_dir)$(lib_path_base)/ss5/ ; \
+ cp modules/mod_statistics/SS5Logo.jpg $(dst_dir)$(lib_path_base)/ss5/ ; \
+ cp modules/mod_balance/SS5Logo.jpg $(dst_dir)$(lib_path_base)/ss5/ ; \
+ fi )
@( if [ $(OS) = "Linux" ]; then \
if [ ! -d $(dst_dir)/etc/rc.d/init.d ]; then mkdir -p $(dst_dir)/etc/rc.d/init.d; fi ; \
@@ -61,10 +84,6 @@
if [ ! -f $(dst_dir)/etc/init.d/ss5 ]; then cp conf/ss5.init $(dst_dir)/etc/init.d/ss5; \
else cp conf/ss5.init $(dst_dir)/etc/init.d/ss5.rpmnew ; fi ; \
fi )
- @( if [ $(OS) = "FreeBSD" ]; then \
- if [ ! -f /usr/local/etc/rc.d/ss5 ]; then cp conf/ss5.init /usr/local/etc/rc.d/ss5; \
- else cp conf/ss5.init /usr/local/etc/rc.d/ss5.rpmnew ; fi ; \
- fi )
@( if [ ! -d $(dst_dir)$(doc_path_base)/ss5 ]; then mkdir -p $(dst_dir)$(doc_path_base)/ss5; fi )
@( cp License $(dst_dir)$(doc_path_base)/ss5 )
@@ -74,27 +93,40 @@
@( cp modules/mod_balance/README.balamgr $(dst_dir)$(doc_path_base)/ss5 )
@( if [ ! -d $(dst_dir)$(man_path_base)/man1 ]; then mkdir -p $(dst_dir)$(man_path_base)/man1; fi )
- @( cp man/$(OS)/ss5.1* $(dst_dir)$(man_path_base)/man1 )
- @( if [ ! -d $(dst_dir)$(man_path_base)/man5 ]; then mkdir -p $(dst_dir)$(man_path_base)/man5; fi )
- @( cp man/$(OS)/ss5.passwd.5* $(dst_dir)$(man_path_base)/man5 )
- @( cp man/$(OS)/ss5.peers.5* $(dst_dir)$(man_path_base)/man5 )
- @( cp man/$(OS)/ss5.pam.5* $(dst_dir)$(man_path_base)/man5 )
- @( cp man/$(OS)/ss5.conf.5* $(dst_dir)$(man_path_base)/man5 )
+ @( if [ $(OS) = "FreeBSD" ] && [ ! -d $(ss5_man)/man1 ]; then mkdir -p $(ss5_man)/man1; fi )
+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5.1* $(ss5_man)/man1/; \
+ else cp man/$(OS)/ss5.1* $(dst_dir)$(man_path_base)/man1/; fi )
+ @( if [ ! -d $(dst_dir)$(man_path_base)/man5 ]; then mkdir -p $(dst_dir)$(man_path_base)/man5/; fi )
+ @( if [ $(OS) = "FreeBSD" ] && [ ! -d $(ss5_man)/man5 ]; then mkdir -p $(ss5_man)/man5; fi )
+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5.passwd.5* $(ss5_man)/man5/; \
+ else cp man/$(OS)/ss5.passwd.5* $(dst_dir)$(man_path_base)/man5/; fi )
+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5.peers.5* $(ss5_man)/man5/; \
+ else cp man/$(OS)/ss5.peers.5* $(dst_dir)$(man_path_base)/man5/; fi )
+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5.pam.5* $(ss5_man)/man5/; \
+ else cp man/$(OS)/ss5.pam.5* $(dst_dir)$(man_path_base)/man5/; fi )
+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5.conf.5* $(ss5_man)/man5/; \
+ else cp man/$(OS)/ss5.conf.5* $(dst_dir)$(man_path_base)/man5/; fi )
@( if [ ! -d $(dst_dir)$(conf_path_base) ]; then mkdir -p $(dst_dir)$(conf_path_base); fi )
@( if [ ! -d $(dst_dir)$(conf_path_base)/ss5 ]; then mkdir -p $(dst_dir)$(conf_path_base)/ss5; fi )
@( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.conf ]; then cp conf/ss5.conf $(dst_dir)$(conf_path_base)/ss5; \
else cp conf/ss5.conf $(dst_dir)$(conf_path_base)/ss5/ss5.conf.rpmnew ; fi )
- @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.passwd ]; then cp conf/ss5.passwd $(dst_dir)$(conf_path_base)/ss5; \
- else cp conf/ss5.passwd $(dst_dir)$(conf_path_base)/ss5/ss5.passwd.rpmnew ; fi )
+ @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.passwd ]; then cp conf/ss5.passwd $(dst_dir)$(conf_path_base)/ss5; fi)
- @( if [ $(OS) = "Linux" ] || [ $(OS) = "FreeBSD" ]; then \
+ @( if [ $(OS) = "Linux" ]; then \
if [ ! -d $(dst_dir)/etc/pam.d ]; then mkdir -p $(dst_dir)/etc/pam.d; fi ; \
fi )
- @( if [ $(OS) = "Linux" ] || [ $(OS) = "FreeBSD" ]; then \
+ @( if [ $(OS) = "Linux" ]; then \
if [ ! -f $(dst_dir)/etc/pam.d/ss5 ]; then cp doc/pam/examples/ss5.pam $(dst_dir)/etc/pam.d/ss5; \
else cp doc/pam/examples/ss5.pam $(dst_dir)/etc/pam.d/ss5.rpmnew ; fi ; \
fi )
+ @( if [ $(OS) = "FreeBSD" ]; then \
+ if [ ! -d $(ss5_examples) ]; then mkdir -p $(ss5_examples); fi; \
+ if [ ! -f $(ss5_examples) ]; then cp doc/pam/examples/ss5.pam $(ss5_examples); \
+ cp doc/ldap/examples/* $(ss5_examples); \
+ rm -rf /usr/local/share/doc/ss5/examples/; \
+ fi; \
+ fi )
.PHONY : uninstall
@@ -108,29 +140,48 @@
@( if [ -d $(dst_dir)$(doc_path_base)/ss5 ]; then rm -rf $(dst_dir)$(doc_path_base)/ss5; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man1/ss5.1 ]; then rm -f $(dst_dir)$(man_path_base)/man1/ss5.1; fi )
+ @( if [ -f $(ss5_man)/man1/ss5.1 ]; then rm -f $(ss5_man)/man1/ss5.1; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5; fi )
- @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.peers.5 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.peers.5; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.passwd.5 ]; then rm -f $(ss5_man)/man5/ss5.passwd.5; fi )
+ @( if [ -f $(man_path_base)/man5/ss5.peers.5 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.peers.5; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.peers.5 ]; then rm -f $(ss5_man)/man5/ss5.peers.5; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.conf.5 ]; then rm -f $(ss5_man)/man5/ss5.conf.5; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.pam.5 ]; then rm -f $(ss5_man)/man5/ss5.pam.5; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man1/ss5.1.gz ]; then rm -f $(dst_dir)$(man_path_base)/man1/ss5.1.gz; fi )
+ @( if [ -f $(ss5_man)/man1/ss5.1.gz ]; then rm -f $(ss5_man)/man1/ss5.1.gz; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5.gz ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5.gz; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.passwd.5.gz ]; then rm -f $(ss5_man)/man5/ss5.passwd.5.gz; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.peers.5.gz ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.peers.5.gz; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.peers.5.gz ]; then rm -f $(ss5_man)/man5/ss5.peers.5.gz; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5.gz ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5.gz; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.conf.5.gz ]; then rm -f $(ss5_man)/man5/ss5.conf.5.gz; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5.gz ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5.gz; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.pam.5.gz ]; then rm -f $(ss5_man)/man5/ss5.pam.5.gz; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man1/ss5.1.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man1/ss5.1.bz2; fi )
+ @( if [ -f $(ss5_man)/man1/ss5.1.bz2 ]; then rm -f $(ss5_man)/man1/ss5.1.bz2; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5.bz2; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.passwd.5.bz2 ]; then rm -f $(ss5_man)/man5/ss5.passwd.5.bz2; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.peers.5.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.peers.5.bz2; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.peers.5.bz2 ]; then rm -f $(ss5_man)/man5/ss5.peers.5.bz2; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5.bz2; fi )
- @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5.bz2; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.conf.5.bz2 ]; then rm -f $(ss5_man)/man5/ss5.conf.5.bz2; fi )
+ @( if [ -f $(man_path_base)/man5/ss5.pam.5.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5.bz2; fi )
+ @( if [ -f $(ss5_man)/man5/ss5.pam.5.bz2 ]; then rm -f $(ss5_man)/man5/ss5.pam.5.bz2; fi )
@( if [ -d $(dst_dir)$(conf_path_base)/ss5 ]; then rm -rf $(dst_dir)$(conf_path_base)/ss5; fi )
- @( if [ $(OS) = "Linux" ] || [ $(OS) = "FreeBSD" ]; then \
+ @( if [ $(OS) = "Linux" ] ; then \
if [ -f $(dst_dir)/etc/pam.d/ss5 ]; then rm -f $(dst_dir)/etc/pam.d/ss5; fi ; \
fi )
+ @( if [ $(OS) = "FreeBSD" ]; then \
+ if [ -d $(ss5_examples) ]; then rm -rf $(ss5_examples); fi ; \
+ fi )
+
@( if [ $(OS) = "Linux" ] || [ $(OS) = "FreeBSD" ]; then \
- if [ -f $(dst_dir)$(boot_path_base)/ss5 ]; then rm -f $(dst_dir)$(boot_path_base)/ss5; fi; \
+ if [ -f $(dst_dir)$(boot_path_base)/ss5 ]; then rm -rf $(dst_dir)$(boot_path_base)/ss5; fi; \
fi )
@( if [ $(OS) = "Linux" ]; then \

25
net/ss5/files/ss5.in Normal file
View File

@ -0,0 +1,25 @@
#!/bin/sh
# PROVIDE: ss5
# REQUIRE: LOGIN
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# ss5_enable (bool): Set to NO by default.
# Set it to YES to enable ss5.
#
. %%RC_SUBR%%
name="ss5"
rcvar=${name}_enable
command=%%PREFIX%%/sbin/${name}
load_rc_config $name
: ${ss5_enable="NO"}
: ${ss5_flags="-t"}
run_rc_command "$1"

3
net/ss5/pkg-descr Normal file
View File

@ -0,0 +1,3 @@
SS5 is a socks server that implements the SOCKS v4 and v5 protocol.
WWW: http://ss5.sourceforge.net/

30
net/ss5/pkg-plist Normal file
View File

@ -0,0 +1,30 @@
etc/ss5/ss5.conf
etc/ss5/ss5.passwd
lib/ss5/mod_authentication.so
lib/ss5/mod_authorization.so
lib/ss5/mod_balance.so
lib/ss5/mod_bandwidth.so
lib/ss5/mod_dump.so
lib/ss5/mod_filter.so
lib/ss5/mod_log.so
lib/ss5/mod_proxy.so
lib/ss5/mod_socks4.so
lib/ss5/mod_socks5.so
lib/ss5/mod_statistics.so
sbin/ss5
%%DATADIR%%/SS5Logo.jpg
%%DATADIR%%/balamgr.cgi
%%DATADIR%%/statmgr.cgi
%%EXAMPLESDIR%%/entries.ldif
%%EXAMPLESDIR%%/slapd.conf
%%EXAMPLESDIR%%/ss5.pam
%%DOCSDIR%%/License
%%DOCSDIR%%/README.balamgr
%%DOCSDIR%%/README.ldap
%%DOCSDIR%%/README.pam
%%DOCSDIR%%/README.statmgr
@dirrm %%DATADIR%%
@dirrm %%DOCSDIR%%
@dirrm %%EXAMPLESDIR%%
@dirrmtry etc/ss5
@dirrm lib/ss5