Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jun 2002 16:14:53 +0400
From:      Sergey Matveychuk <sem@ciam.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/39412: New port: ftp/frox: Transparent FTP proxy with caching support
Message-ID:  <E17JvPJ-000OpX-00@mail.ciam.ru>

next in thread | raw e-mail | index | archive | help

>Number:         39412
>Category:       ports
>Synopsis:       New port: ftp/frox: Transparent FTP proxy with caching support
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 17 05:20:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Matveychuk
>Release:        FreeBSD 4.5-RELEASE i386
>Organization:
>Environment:
System: FreeBSD sem-home.ciam.ru 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Sat Feb 2 17:03:03 MSK 2002 root@sem-home.ciam.ru:/usr/src/sys/compile/SEM-HOME i386

>Description:
This is frox, a transparent ftp proxy by James Hollingshead.

Current features include:
  o rfc959 compliant (I think) transparent proxying of ftp
    connections.
  o active --> passive mode conversion for data connections.
  o Optional caching support either locally or through an external
    HTTP cache.
  o Optional virus scanning
  o Optional non-transparent proxy support by logging in with
    user@host:port.
  o Options to bind to a specific interface, chroot, and drop
    priveleges for security.

WWW: http://www.hollo.org/frox/

>How-To-Repeat:
	
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	frox
#	frox/pkg-plist
#	frox/pkg-descr
#	frox/pkg-comment
#	frox/distinfo
#	frox/Makefile
#	frox/pkg-message
#	frox/files
#	frox/files/patch-aa
#	frox/files/frox.sh
#
echo c - frox
mkdir -p frox > /dev/null 2>&1
echo x - frox/pkg-plist
sed 's/^X//' >frox/pkg-plist << 'END-of-frox/pkg-plist'
Xsbin/frox
Xetc/frox.conf.sample
Xetc/rc.d/frox.sh
X%%PORTDOCS%%share/doc/frox/FAQ
X%%PORTDOCS%%share/doc/frox/SECURITY
X%%PORTDOCS%%share/doc/frox/CREDITS
X%%PORTDOCS%%share/doc/frox/ChangeLog
X%%PORTDOCS%%@dirrm share/doc/frox
END-of-frox/pkg-plist
echo x - frox/pkg-descr
sed 's/^X//' >frox/pkg-descr << 'END-of-frox/pkg-descr'
XThis is frox, a transparent ftp proxy by James Hollingshead.
X
XCurrent features include:
X
X  o rfc959 compliant (I think) transparent proxying of ftp
X    connections.
X  o active --> passive mode conversion for data connections.
X  o Optional caching support either locally or through an external
X    HTTP cache.
X  o Optional virus scanning
X  o Optional non-transparent proxy support by logging in with
X    user@host:port.
X  o Options to bind to a specific interface, chroot, and drop
X    priveleges for security.
X
XWWW: http://www.hollo.org/frox/
END-of-frox/pkg-descr
echo x - frox/pkg-comment
sed 's/^X//' >frox/pkg-comment << 'END-of-frox/pkg-comment'
XTransparent FTP proxy with caching support
END-of-frox/pkg-comment
echo x - frox/distinfo
sed 's/^X//' >frox/distinfo << 'END-of-frox/distinfo'
XMD5 (frox-0.7.4.tar.bz2) = b7f1665635aaf5bc72b82809ee7c4f98
END-of-frox/distinfo
echo x - frox/Makefile
sed 's/^X//' >frox/Makefile << 'END-of-frox/Makefile'
X# New ports collection makefile for:   frox
X# Date created:        11 June 2002
X# Whom:            Sergey Matveychuk <sem@ciam.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	frox
XPORTVERSION=	0.7.4
XCATEGORIES=	ftp
XMASTER_SITES= 	http://www.hollo.org/frox/download/ \
X		http://frox.sourceforge.net/download/
X
XMAINTAINER=	sem@ciam.ru
X
XUSE_BZIP2=      yes
XUSE_GMAKE=	yes
XGNU_CONFIGURE=  yes
X
XMAN1=	frox.1
XMAN5=	frox.conf.5
X
XDOCS=	FAQ SECURITY CREDITS ChangeLog
X
XPKGMESSAGE=     ${WRKDIR}/pkg-message
X
XCONFIGURE_ARGS= --enable-configfile=${PREFIX}/etc/frox.conf
X
X.if defined(WITH_HTTP_CACHE)
XCONFIGURE_ARGS+= --enable-http-cache
X.endif
X.if defined(WITH_IPFILTER)
XCONFIGURE_ARGS+= --enable-ipfilter
X.endif
X.if defined(WITH_CCP)
XCONFIGURE_ARGS+= --enable-ccp
X.endif
X.if defined(RUN_AS_ROOT)
XCONFIGURE_ARGS+= --enable-run-as-root
X.endif
X
Xpre-fetch:
X	@${ECHO} ""
X	@${ECHO} "You can use the following build options:"
X	@${ECHO} ""
X	@${ECHO} "	WITH_HTTP_CACHE=yes	enable http-cache (like squid) using;"
X	@${ECHO} "	WITH_IPFILTER=yes	force use ipfilter instead of ipfw;"
X	@${ECHO} "	WITH_CCP=yes		enable ftp-proxy style command control programs;"
X	@${ECHO} "	RUN_AS_ROOT=yes		allow frox running as root (not recomended)"
X	@${ECHO} "				for using port number <1024."
X	@${ECHO} ""
X
Xpre-patch:
X	@${SED} 's|%%PREFIX%%|${PREFIX}|g' ${PKGDIR}/pkg-message >${PKGMESSAGE}
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/src/frox ${PREFIX}/sbin
X	${INSTALL_DATA} ${WRKSRC}/src/frox.conf ${PREFIX}/etc/frox.conf.sample
X	${INSTALL_MAN} ${WRKSRC}/doc/frox.man ${PREFIX}/man/man1/frox.1
X	${INSTALL_MAN} ${WRKSRC}/doc/frox.conf.man ${PREFIX}/man/man5/frox.conf.5
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X.for file in ${DOCS}
X	${INSTALL_DATA} ${WRKSRC}/doc/${file} ${DOCSDIR}
X.endfor
X.endif
X	@${STRIP_CMD} ${PREFIX}/sbin/frox
X	@if [ ! -f ${PREFIX}/etc/rc.d/${PORTNAME}.sh ]; then \
X		${ECHO_CMD} "Install ${PREFIX}/etc/rc.d/${PORTNAME}.sh startup file."; \
X		${INSTALL_SCRIPT} -m 751 ${FILESDIR}/${PORTNAME}.sh ${PREFIX}/etc/rc.d/${PORTNAME}.sh; \
X	fi
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-frox/Makefile
echo x - frox/pkg-message
sed 's/^X//' >frox/pkg-message << 'END-of-frox/pkg-message'
X**************************************************************************
XNOTES:
XDon't forget to create %%PREFIX%%/etc/frox.conf 
Xfrom %%PREFIX%%/etc/frox.conf.sample and then run frox by 
X%%PREFIX%%/etc/rc.d/frox.sh start
X
XOr you can run frox with inetd this way:
X* uncomment 'FromInetd yes' in your %%PREFIX%%/etc/frox.conf (so frox
Xwould not run on startup by %%PREFIX%%/etc/rc.d/frox.sh)
X* add this line in /etc/inetd.conf:
Xfrox     stream  tcp     nowait  nobody    %%PREFIX%%/sbin/frox    frox
X* and assign port number for frox you want in /etc/services (e.g. 2121):
Xfrox	2121/tcp
X**************************************************************************
END-of-frox/pkg-message
echo c - frox/files
mkdir -p frox/files > /dev/null 2>&1
echo x - frox/files/patch-aa
sed 's/^X//' >frox/files/patch-aa << 'END-of-frox/files/patch-aa'
X--- src/frox.conf.orig	Wed Jun 12 08:01:44 2002
X+++ src/frox.conf	Wed Jun 12 08:12:27 2002
X@@ -18,6 +18,7 @@
X # commented out to listen on all local IPs.
X #
X # Listen firewall.localnet
X+# Change it with your ip!
X Listen 192.168.2.1
X 
X # Port to listen on. Must be supplied.
X@@ -26,7 +27,8 @@
X 
X # If specified then bind to this device
X #
X-BindToDevice eth0
X+# DON'T USE: It's not supported for FreeBSD
X+#BindToDevice eth0
X 
X # Whether to run from inetd. You should still define Port above, but
X # it isn't used for much.
X@@ -39,7 +41,7 @@
X # comment this out and copy resolver libraries into the chroot jail instead.
X # See FAQ section 3.2 for details.
X #
X-ResolvLoadHack wontresolve.doesntexist.abc
X+#ResolvLoadHack wontresolve.doesntexist.abc
X 
X # Another ftp proxy to forward on to. Frox will contact this ftp
X # proxy, and send it a login name of the form "user@host:port" where
X@@ -54,8 +56,8 @@
X # you really want to run as root (not a good idea) you must say so
X # specifically, and have compiled with --enable-run-as-root.
X #
X-# User nobody
X-# Group nogroup
X+User nobody
X+Group nogroup
X 
X # This is frox's working directory - it must be specified. Temporary
X # files and sockets will be created here. If you are using local
X@@ -64,8 +66,8 @@
X # also chroot to this dir on startup. To avoid this you must specifically 
X # set DontChroot to Yes.
X #
X-# WorkingDir /usr/local/lib/frox
X-# DontChroot Yes
X+WorkingDir /tmp
X+DontChroot Yes
X 
X # Logging level. 0=No logging. 5=Critical errors only. 10= All errors. 
X # 15=Errors, other important stuf. 20= Errors, connections, cache
END-of-frox/files/patch-aa
echo x - frox/files/frox.sh
sed 's/^X//' >frox/files/frox.sh << 'END-of-frox/files/frox.sh'
X#!/bin/sh
X
Xif ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
X    echo "$0: Cannot determine the PREFIX" >&2
X    exit 1
Xfi
X
Xcase "$1" in
Xstart)
X	[ -x ${PREFIX}/sbin/frox -a -f ${PREFIX}/etc/frox.conf ]
X	        grep -q '^ *# *FromInetd *yes' ${PREFIX}/etc/frox.conf && \
X		${PREFIX}/sbin/frox && \
X		echo -n ' frox'
X	;;
Xstop)
X	kill `cat /var/run/frox.pid` && echo -n ' frox'
X	;;
X*)
X	echo "Usage: `basename $0` {start|stop}" >&2
X	;;
Xesac
X
Xexit 0
END-of-frox/files/frox.sh
exit



>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E17JvPJ-000OpX-00>