diff options
author | pav <pav@FreeBSD.org> | 2004-10-15 23:47:27 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2004-10-15 23:47:27 +0800 |
commit | 66c0e890e9d6c5a7f027c5b3731ff782da6bce8b (patch) | |
tree | ff81385d4e48870187b7e78854d54c4f76b96e66 /net | |
parent | c9f850e4d707e23046d742c53589640bcb913403 (diff) | |
download | freebsd-ports-gnome-66c0e890e9d6c5a7f027c5b3731ff782da6bce8b.tar.gz freebsd-ports-gnome-66c0e890e9d6c5a7f027c5b3731ff782da6bce8b.tar.zst freebsd-ports-gnome-66c0e890e9d6c5a7f027c5b3731ff782da6bce8b.zip |
Add siproxd, a proxy/masquerading daemon for the SIP protocol.
It handles registrations of SIP clients on a private IP network
and performs rewriting of the SIP message bodies to make SIP
connections possible via a masquerading firewall.
It allows SIP clients (like kphone, linphone) to work behind
an IP masquerading firewall or router.
PR: ports/72691
Submitted by: Frank W. Josellis <frank@dynamical-systems.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/siproxd/Makefile | 46 | ||||
-rw-r--r-- | net/siproxd/distinfo | 2 | ||||
-rw-r--r-- | net/siproxd/files/patch-doc_siproxd.conf.example | 37 | ||||
-rw-r--r-- | net/siproxd/files/patch-src_siproxd.c | 18 | ||||
-rw-r--r-- | net/siproxd/files/patch-src_utils.c | 18 | ||||
-rw-r--r-- | net/siproxd/files/siproxd.sh | 42 | ||||
-rw-r--r-- | net/siproxd/pkg-deinstall | 12 | ||||
-rw-r--r-- | net/siproxd/pkg-descr | 8 | ||||
-rw-r--r-- | net/siproxd/pkg-install | 17 | ||||
-rw-r--r-- | net/siproxd/pkg-plist | 9 |
11 files changed, 210 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index 4401b488a9af..4d0a3d50c3cf 100644 --- a/net/Makefile +++ b/net/Makefile @@ -649,6 +649,7 @@ SUBDIR += silky SUBDIR += simicq SUBDIR += sipp + SUBDIR += siproxd SUBDIR += sipsak SUBDIR += sixxs-heartbeatd SUBDIR += skype diff --git a/net/siproxd/Makefile b/net/siproxd/Makefile new file mode 100644 index 000000000000..2008812257aa --- /dev/null +++ b/net/siproxd/Makefile @@ -0,0 +1,46 @@ +# New ports collection makefile for: siproxd +# Date created: 10 October 2004 +# Whom: Frank W. Josellis <frank@dynamical-systems.org> +# +# $FreeBSD$ +# + +PORTNAME= siproxd +PORTVERSION= 0.5.8 +CATEGORIES= net +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= siproxd + +MAINTAINER= frank@dynamical-systems.org +COMMENT= A proxy/masquerading daemon for the SIP protocol + +LIB_DEPENDS= osip2.2:${PORTSDIR}/net/libosip2 + +USE_GETOPT_LONG=yes +USE_RC_SUBR= yes +HAS_CONFIGURE= yes + +PORTDOCS= AUTHORS ChangeLog README RELNOTES \ + doc/FAQ doc/KNOWN_BUGS doc/RFC3261_compliance.txt \ + doc/sample_cfg_budgetone.txt doc/sample_cfg_x-lite.txt + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} >= 500041 +LIB_DEPENDS+= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt +.endif + +post-install: +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} +.for i in ${PORTDOCS} + ${INSTALL_MAN} ${WRKSRC}/${i} ${DOCSDIR} +.endfor +.endif + PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \ + -e 's|%%RC_SUBR%%|${RC_SUBR}|g' \ + ${FILESDIR}/siproxd.sh > ${PREFIX}/etc/rc.d/siproxd.sh + @${CHMOD} 755 ${PREFIX}/etc/rc.d/siproxd.sh + +.include <bsd.port.post.mk> diff --git a/net/siproxd/distinfo b/net/siproxd/distinfo new file mode 100644 index 000000000000..6a0b1af9d508 --- /dev/null +++ b/net/siproxd/distinfo @@ -0,0 +1,2 @@ +MD5 (siproxd-0.5.8.tar.gz) = b987151719fced722b6df7d16c06f58d +SIZE (siproxd-0.5.8.tar.gz) = 193802 diff --git a/net/siproxd/files/patch-doc_siproxd.conf.example b/net/siproxd/files/patch-doc_siproxd.conf.example new file mode 100644 index 000000000000..bef9561bf5c6 --- /dev/null +++ b/net/siproxd/files/patch-doc_siproxd.conf.example @@ -0,0 +1,37 @@ +--- doc/siproxd.conf.example.orig Sun May 9 14:53:06 2004 ++++ doc/siproxd.conf.example Mon Oct 11 21:25:41 2004 +@@ -9,8 +9,8 @@ + ###################################################################### + # The interface names of INBOUND and OUTBOUND interface. + # +-if_inbound = eth0 +-if_outbound = ppp0 ++if_inbound = ed0 ++if_outbound = tun0 + + + ###################################################################### +@@ -70,20 +70,20 @@ + # user: uid/gid to switch to after startup + # chrootjail: path to chroot to (chroot jail) + user = nobody +-#chrootjail = /var/lib/siproxd/ ++chrootjail = /usr/local/siproxd/ + + ###################################################################### + # Registration file: + # Where to store the current registrations. + # An empty value means we do not save registrations. Make sure that + # the specified directory path does exist! +-registration_file = /var/lib/siproxd/siproxd_registrations ++registration_file = siproxd_registrations + + ###################################################################### + # PID file: + # Where to create the PID file. + # This file holds the PID of the main thread of siproxd. +-pid_file = /var/run/siproxd/siproxd.pid ++pid_file = siproxd.pid + + ###################################################################### + # global switch to control the RTP proxy behaviour diff --git a/net/siproxd/files/patch-src_siproxd.c b/net/siproxd/files/patch-src_siproxd.c new file mode 100644 index 000000000000..661631042921 --- /dev/null +++ b/net/siproxd/files/patch-src_siproxd.c @@ -0,0 +1,18 @@ +--- src/siproxd.c.orig Thu Aug 26 19:32:08 2004 ++++ src/siproxd.c Thu Oct 14 07:18:15 2004 +@@ -179,6 +179,7 @@ + /* + * Init stuff + */ ++ INFO(PACKAGE"-"VERSION"-"BUILDSTR" started"); + + /* read the config file */ + if (read_config(configfile, config_search) == STS_FAILURE) exit(1); +@@ -245,7 +246,6 @@ + /* initialize the registration facility */ + register_init(); + +- INFO(PACKAGE"-"VERSION"-"BUILDSTR" started"); + /* + * silence the log - if so required... + */ diff --git a/net/siproxd/files/patch-src_utils.c b/net/siproxd/files/patch-src_utils.c new file mode 100644 index 000000000000..ea32b78c3bc1 --- /dev/null +++ b/net/siproxd/files/patch-src_utils.c @@ -0,0 +1,18 @@ +--- src/utils.c.orig Sun Aug 22 21:04:37 2004 ++++ src/utils.c Thu Oct 14 07:18:15 2004 +@@ -247,12 +247,12 @@ + * as it loads some dynamic libraries. Once chrootet + * these libraries will *not* be found and gethostbyname() + * calls will simply fail (return NULL pointer and h_errno=0). ++ * Also (at least for FreeBSD) syslog() needs to be called ++ * before chroot()ing - this is done in main() by an INFO(). + * Took me a while to figure THIS one out + */ + struct in_addr dummy; +- DEBUGC(DBCLASS_DNS, "Initializing DNS, the following DNS " +- "failure is normal, don't worry"); +- get_ip_by_host("foobar", &dummy); ++ get_ip_by_host("localhost", &dummy); + DEBUGC(DBCLASS_CONFIG,"chrooting to %s", + configuration.chrootjail); + sts = chroot(configuration.chrootjail); diff --git a/net/siproxd/files/siproxd.sh b/net/siproxd/files/siproxd.sh new file mode 100644 index 000000000000..9d4485646813 --- /dev/null +++ b/net/siproxd/files/siproxd.sh @@ -0,0 +1,42 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: siproxd +# REQUIRE: DAEMON +# KEYWORD: FreeBSD +# +# NOTE for FreeBSD 5.0+: +# If you want this script to start with the base rc scripts +# move siproxd.sh to /etc/rc.d/siproxd + +prefix=%%PREFIX%% + +# Define these siproxd_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/siproxd +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +siproxd_enable=${siproxd_enable:-"NO"} # Enable siproxd +siproxd_flags=${siproxd_flags:-""} # Flags to siproxd program +#siproxd_program="${prefix}/sbin/siproxd" # Location of siproxd + +. %%RC_SUBR%% + +name="siproxd" +rcvar=`set_rcvar` +command="${prefix}/sbin/${name}" + +load_rc_config $name + +case $1 in + start) + run_rc_command "$1" 2> /dev/null + ;; + *) + run_rc_command "$1" + ;; +esac diff --git a/net/siproxd/pkg-deinstall b/net/siproxd/pkg-deinstall new file mode 100644 index 000000000000..054f1061097c --- /dev/null +++ b/net/siproxd/pkg-deinstall @@ -0,0 +1,12 @@ +#!/bin/sh + +PKG_PREFIX=${PKG_PREFIX:=/usr/local} +SIPROXD_HOME=${PKG_PREFIX}/siproxd +SIPROXD_PID=${SIPROXD_HOME}/siproxd.pid + +case $2 in + DEINSTALL) + [ -r ${SIPROXD_PID} ] && kill `cat ${SIPROXD_PID}` + rm -f ${SIPROXD_HOME}/* && rmdir ${SIPROXD_HOME} + ;; +esac diff --git a/net/siproxd/pkg-descr b/net/siproxd/pkg-descr new file mode 100644 index 000000000000..cbba21972801 --- /dev/null +++ b/net/siproxd/pkg-descr @@ -0,0 +1,8 @@ +Siproxd is a proxy/masquerading daemon for the SIP protocol. +It handles registrations of SIP clients on a private IP network +and performs rewriting of the SIP message bodies to make SIP +connections possible via a masquerading firewall. +It allows SIP clients (like kphone, linphone) to work behind +an IP masquerading firewall or router. + +WWW: http://siproxd.sourceforge.net/ diff --git a/net/siproxd/pkg-install b/net/siproxd/pkg-install new file mode 100644 index 000000000000..5d06f32bfd80 --- /dev/null +++ b/net/siproxd/pkg-install @@ -0,0 +1,17 @@ +#!/bin/sh + +SIPROXD_HOME=${PKG_PREFIX}/siproxd +SIPROXD_USER=nobody +SIPROXD_GROUP=nobody + +case $2 in + POST-INSTALL) + mkdir ${SIPROXD_HOME} && \ + chown ${SIPROXD_USER}:${SIPROXD_GROUP} ${SIPROXD_HOME} && \ + chmod 750 ${SIPROXD_HOME} + for i in siproxd.conf.example siproxd_passwd.cfg; do + chgrp ${SIPROXD_GROUP} ${PKG_PREFIX}/etc/${i} + chmod 640 ${PKG_PREFIX}/etc/${i} + done + ;; +esac diff --git a/net/siproxd/pkg-plist b/net/siproxd/pkg-plist new file mode 100644 index 000000000000..b813e5de77a5 --- /dev/null +++ b/net/siproxd/pkg-plist @@ -0,0 +1,9 @@ +etc/rc.d/siproxd.sh +etc/siproxd.conf.example +etc/siproxd_passwd.cfg +sbin/siproxd +%%PORTDOCS%%%%DOCSDIR%%/FAQ +%%PORTDOCS%%%%DOCSDIR%%/KNOWN_BUGS +%%PORTDOCS%%%%DOCSDIR%%/RFC3261_compliance.txt +%%PORTDOCS%%%%DOCSDIR%%/sample_cfg_budgetone.txt +%%PORTDOCS%%%%DOCSDIR%%/sample_cfg_x-lite.txt |