diff options
author | miwi <miwi@FreeBSD.org> | 2006-11-09 03:33:45 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2006-11-09 03:33:45 +0800 |
commit | 3172941d906378863a8ccb2df0290d592dbd5fd0 (patch) | |
tree | 0faa28043c05b16b429693f52b08aa9b6ca4c1d4 /net | |
parent | 0f393ab8864ad8c384af861408ff30fb850de28f (diff) | |
download | freebsd-ports-graphics-3172941d906378863a8ccb2df0290d592dbd5fd0.tar.gz freebsd-ports-graphics-3172941d906378863a8ccb2df0290d592dbd5fd0.tar.zst freebsd-ports-graphics-3172941d906378863a8ccb2df0290d592dbd5fd0.zip |
Initially UProxy has been designed to allow playing
Unreal Tournament matches over Internet on computers
connected by a LAN sharing a dial up connection, but
it could be used to play other games (such as Quake)
and by every program using a UDP protocol where clients
don't have to bind a fixed port (not only games!).
WWW: http://www.geocities.com/SiliconValley/Vista/8155/uproxy/
PR: ports/104697
Submitted by: Alexander Logvinov <ports@logvinov.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/uproxy/Makefile | 38 | ||||
-rw-r--r-- | net/uproxy/distinfo | 3 | ||||
-rw-r--r-- | net/uproxy/files/patch-uproxy.c | 24 | ||||
-rw-r--r-- | net/uproxy/files/uproxy.in | 54 | ||||
-rw-r--r-- | net/uproxy/pkg-descr | 8 |
6 files changed, 128 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index c6124253a35..b481ba66fe5 100644 --- a/net/Makefile +++ b/net/Makefile @@ -822,6 +822,7 @@ SUBDIR += unison SUBDIR += unix2tcp SUBDIR += uplog + SUBDIR += uproxy SUBDIR += urelay SUBDIR += urlendec SUBDIR += utftpd diff --git a/net/uproxy/Makefile b/net/uproxy/Makefile new file mode 100644 index 00000000000..35cbaed632c --- /dev/null +++ b/net/uproxy/Makefile @@ -0,0 +1,38 @@ +# New ports collection makefile for: uproxy +# Date created: 19 October 2006 +# Whom: Alexander Logvinov <ports@logvinov.com> +# +# $FreeBSD$ +# + +PORTNAME= uproxy +PORTVERSION= 0.91 +CATEGORIES= net +MASTER_SITES= http://www.geocities.com/SiliconValley/Vista/8155/uproxy/ +DISTNAME= ${PORTNAME} + +MAINTAINER= ports@logvinov.com +COMMENT= Proxy for UDP protocols + +USE_ZIP= yes +NO_WRKSUBDIR= yes +USE_RC_SUBR= ${PORTNAME} +PORTDOCS= index.html +PLIST_FILES= sbin/${PORTNAME} + +pre-patch: + @${CAT} ${WRKSRC}/${DISTNAME}.c | ${SED} "s/`printf '\r'`//" > ${WRKSRC}/${DISTNAME}.c + +do-build: + (cd ${WRKSRC} && ${CC} ${CFLAGS} -o t${PORTNAME} ${DISTNAME}.c) + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/t${PORTNAME} ${PREFIX}/sbin/${PORTNAME} +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +.for i in ${PORTDOCS} + ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} +.endfor +.endif + +.include <bsd.port.mk> diff --git a/net/uproxy/distinfo b/net/uproxy/distinfo new file mode 100644 index 00000000000..12dae6674f6 --- /dev/null +++ b/net/uproxy/distinfo @@ -0,0 +1,3 @@ +MD5 (uproxy.zip) = 9a484a9d328bf8baf79cfdbc99ccb285 +SHA256 (uproxy.zip) = 960f61dbce2d83a856726a223136f6e5ac2dc31d75958e36ac01cdf17a589645 +SIZE (uproxy.zip) = 17541 diff --git a/net/uproxy/files/patch-uproxy.c b/net/uproxy/files/patch-uproxy.c new file mode 100644 index 00000000000..e5343ad7e2f --- /dev/null +++ b/net/uproxy/files/patch-uproxy.c @@ -0,0 +1,24 @@ +--- uproxy.c.orig Thu Aug 10 11:05:10 2006 ++++ uproxy.c Fri Oct 20 13:17:01 2006 +@@ -25,11 +25,11 @@ + #include <winsock.h> + #else + #include <sys/ioctl.h> ++ #include <sys/types.h> + #include <sys/socket.h> + #include <netinet/in.h> + #include <arpa/inet.h> + #include <sys/time.h> +- #include <sys/types.h> + #include <unistd.h> + #include <stdlib.h> + #endif +@@ -50,7 +50,7 @@ + + SOCKET ProxySocket; + struct sockaddr_in ProxySAddr, ClientSAddr, TargetSAddr; +-struct sockaddr AnySAddr={AF_INET, {INADDR_ANY}}; ++struct sockaddr AnySAddr={AF_INET, INADDR_ANY}; + struct ClientList + { + SOCKET sock; diff --git a/net/uproxy/files/uproxy.in b/net/uproxy/files/uproxy.in new file mode 100644 index 00000000000..d21c7f2379f --- /dev/null +++ b/net/uproxy/files/uproxy.in @@ -0,0 +1,54 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# +# PROVIDE: uproxy +# REQUIRE: NETWORKING +# +# Add the following line to /etc/rc.conf to enable uproxy +# +# uproxy_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable uproxy. +# uproxy_connections (str): Name for each uproxy connection. +# uproxy_connectionname_options (str): Commandline for each uproxy connection. +# + +. %%RC_SUBR%% + +name="uproxy" +rcvar=${name}_enable + +load_rc_config $name + +: ${uproxy_enable="NO"} + +command="/usr/local/sbin/${name}" +start_cmd="uproxy_startcmd" + +uproxy_startcmd() +{ + if [ -z "$rc_fast" -a -n "$rc_pid" ]; then + echo "${name} already running? (pid=$rc_pid)." + return 1 + fi + if [ -z "${uproxy_connections}" ]; then + err 1 "can't find uproxy_connections in /etc/rc.conf" + fi + echo Starting ${name}. + for connection in ${uproxy_connections}; do + eval options=\$uproxy_${connection}_options + if [ -z "${options}" ]; then + continue + fi + command_args="${options}" + cmd="${command} ${command_args}" + if [ -n "$uproxy_user" ]; then + cmd="su -m $uproxy_user -c '$cmd'" + fi + eval "$cmd > /dev/null &" + sleep 1 + done +} + +run_rc_command "$1" diff --git a/net/uproxy/pkg-descr b/net/uproxy/pkg-descr new file mode 100644 index 00000000000..4327194167a --- /dev/null +++ b/net/uproxy/pkg-descr @@ -0,0 +1,8 @@ +Initially UProxy has been designed to allow playing +Unreal Tournament matches over Internet on computers +connected by a LAN sharing a dial up connection, but +it could be used to play other games (such as Quake) +and by every program using a UDP protocol where clients +don't have to bind a fixed port (not only games!). + +WWW: http://www.geocities.com/SiliconValley/Vista/8155/uproxy/ |