aboutsummaryrefslogtreecommitdiff
path: root/www/httptunnel
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2000-03-21 01:18:06 +0000
committerBrian Somers <brian@FreeBSD.org>2000-03-21 01:18:06 +0000
commit71ab0b0f58ecae26f7e013bea35692ebfdcaa852 (patch)
treeb52235910cb54d7c08fef1e8ec01071f9061e80c /www/httptunnel
parent2529568003d897722d74f162fbc4d8db3bdf8bd8 (diff)
downloadports-71ab0b0f58ecae26f7e013bea35692ebfdcaa852.tar.gz
ports-71ab0b0f58ecae26f7e013bea35692ebfdcaa852.zip
An implementation of TCP/IP over HTTP with local modifications to allow
binding the server to a single IP number.
Notes
Notes: svn path=/head/; revision=26889
Diffstat (limited to 'www/httptunnel')
-rw-r--r--www/httptunnel/Makefile25
-rw-r--r--www/httptunnel/distinfo1
-rw-r--r--www/httptunnel/files/httptunnel.sh36
-rw-r--r--www/httptunnel/files/patch-aa48
-rw-r--r--www/httptunnel/files/patch-ab11
-rw-r--r--www/httptunnel/files/patch-ac14
-rw-r--r--www/httptunnel/pkg-comment1
-rw-r--r--www/httptunnel/pkg-descr22
-rw-r--r--www/httptunnel/pkg-plist3
9 files changed, 161 insertions, 0 deletions
diff --git a/www/httptunnel/Makefile b/www/httptunnel/Makefile
new file mode 100644
index 000000000000..2e2bafb37152
--- /dev/null
+++ b/www/httptunnel/Makefile
@@ -0,0 +1,25 @@
+# New ports collection makefile for: httptunnel
+# Version required: 3.0
+# Date created: March 20 2000
+# Whom: Brian Somers <brian@Awfulhak.org>
+#
+# $FreeBSD$
+#
+
+DISTNAME= httptunnel-3.0
+CATEGORIES= net
+MASTER_SITES= http://www.Awfulhak.org/httptunnel/ \
+ ftp://ftp.nocrew.org/pub/nocrew/unix/ \
+ http://www.nocrew.org/software/httptunnel/
+
+MAINTAINER= brian@Awfulhak.org
+
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS= --quiet
+MAN1= hts.1 htc.1
+
+post-install:
+ [ -f ${PREFIX}/etc/rc.d/httptunnel.sh ] || \
+ ${INSTALL_SCRIPT} ${FILESDIR}/httptunnel.sh ${PREFIX}/etc/rc.d/.
+
+.include <bsd.port.mk>
diff --git a/www/httptunnel/distinfo b/www/httptunnel/distinfo
new file mode 100644
index 000000000000..1e0c0a9397b5
--- /dev/null
+++ b/www/httptunnel/distinfo
@@ -0,0 +1 @@
+MD5 (httptunnel-3.0.tar.gz) = 066cb6583d73442eb1b7309940545c00
diff --git a/www/httptunnel/files/httptunnel.sh b/www/httptunnel/files/httptunnel.sh
new file mode 100644
index 000000000000..153c3faa8754
--- /dev/null
+++ b/www/httptunnel/files/httptunnel.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+HTSPORT= # [host:]port to listen for htc connection
+HTSFORWARD= # Talk to this socket
+HTSDEVICE= # *or* talk to this device
+
+HTCPORT= # host:port where hts is running
+HTCFORWARD= # Talk to this socket
+HTCDEVICE= # *or* talk to this device
+
+HTCPROXY= # host:port of proxy to talk to hts via
+HTCPROXYAUTH= # user:password to pass to proxy
+HTCPROXYBUFFER=1K # Buffer size for buffered proxies
+HTCBROWSER='Mozilla/4.7 [en] (X11; I; Linux 2.2.12 i386)' # Pretend to be this
+HTCARGS=-S # Any other arguments required
+
+if [ -n "$HTSPORT" -a -x /usr/local/bin/hts ]; then
+ [ -n "$HTSFORWARD" ] && args="-F $HTSFORWARD"
+ [ -n "$HTSDEVICE" ] && args="-d $HTSDEVICE"
+ /usr/local/bin/hts $args $HTSPORT && echo -n ' hts'
+fi
+
+if [ -n "$HTCPORT" -a -x /usr/local/bin/htc ]; then
+ set --
+ [ -n "$HTCFORWARD" ] && set -- -F $HTCFORWARD
+ [ -n "$HTCDEVICE" ] && set -- -d $HTCDEVICE
+ [ -n "$HTCBROWSER" ] && set -- -U "$HTCBROWSER" "$@"
+ if [ -n "$HTCPROXY" ]; then
+ [ -n "$HTCPROXYBUFFER" ] && set -- -B $HTCPROXYBUFFER "$@"
+ [ -n "$HTCPROXYAUTH" ] && set -- -A $HTCPROXYAUTH "$@"
+ set -- -P $HTCPROXY "$@"
+ fi
+ /usr/local/bin/htc "$@" $HTCARGS $HTCPORT && echo -n ' htc'
+fi
diff --git a/www/httptunnel/files/patch-aa b/www/httptunnel/files/patch-aa
new file mode 100644
index 000000000000..43c47a9a45b6
--- /dev/null
+++ b/www/httptunnel/files/patch-aa
@@ -0,0 +1,48 @@
+--- common.c.orig Wed Dec 15 06:39:03 1999
++++ common.c Thu Mar 16 02:48:06 2000
+@@ -115,7 +115,7 @@
+ #endif
+
+ int
+-server_socket (int port, int backlog)
++server_socket (struct in_addr addr, int port, int backlog)
+ {
+ struct sockaddr_in address;
+ int i, s;
+@@ -131,10 +131,12 @@
+ strerror (errno));
+ }
+
++ memset(&address, '\0', sizeof address);
++ address.sin_len = sizeof address;
+ address.sin_family = PF_INET;
+ address.sin_port = htons ((short)port);
+- address.sin_addr.s_addr = INADDR_ANY;
+-
++ address.sin_addr = addr;
++
+ if (bind (s, (struct sockaddr *)&address, sizeof (address)) == -1)
+ {
+ close (s);
+@@ -153,8 +155,10 @@
+ int
+ set_address (struct sockaddr_in *address, const char *host, int port)
+ {
+- address->sin_family = PF_INET;
+- address->sin_port = htons ((short)port);
++ memset(address, '\0', sizeof *address);
++ address->sin_len = sizeof *address;
++ address->sin_family = AF_INET;
++ address->sin_port = htons((u_short)port);
+ address->sin_addr.s_addr = inet_addr (host);
+
+ if (address->sin_addr.s_addr == INADDR_NONE)
+@@ -334,7 +338,7 @@
+ p = strchr (*name, ':');
+ if (p != NULL)
+ {
+- *port = atoi (p + 1);
++ *port = atoi(p + 1);
+ *p = '\0';
+ }
+ }
diff --git a/www/httptunnel/files/patch-ab b/www/httptunnel/files/patch-ab
new file mode 100644
index 000000000000..1dc1360287ff
--- /dev/null
+++ b/www/httptunnel/files/patch-ab
@@ -0,0 +1,11 @@
+--- common.h.orig Thu Mar 16 00:41:09 2000
++++ common.h Thu Mar 16 00:42:56 2000
+@@ -58,7 +58,7 @@
+ static inline void log_annoying () {}
+ #endif
+
+-extern int server_socket (int port, int backlog);
++extern int server_socket (struct in_addr addr, int port, int backlog);
+ extern int set_address (struct sockaddr_in *address,
+ const char *host, int port);
+ extern int open_device (char *device);
diff --git a/www/httptunnel/files/patch-ac b/www/httptunnel/files/patch-ac
new file mode 100644
index 000000000000..d0c5db9e3584
--- /dev/null
+++ b/www/httptunnel/files/patch-ac
@@ -0,0 +1,14 @@
+--- htc.c.orig Thu Mar 16 00:27:51 2000
++++ htc.c Thu Mar 16 00:43:21 2000
+@@ -408,7 +408,10 @@
+
+ if (arg.forward_port != -1)
+ {
+- s = server_socket (arg.forward_port, 0);
++ struct in_addr addr;
++
++ addr.s_addr = INADDR_ANY;
++ s = server_socket (addr, arg.forward_port, 0);
+ log_debug ("server_socket (%d) = %d", arg.forward_port, s);
+ if (s == -1)
+ {
diff --git a/www/httptunnel/pkg-comment b/www/httptunnel/pkg-comment
new file mode 100644
index 000000000000..be1cfc5188ff
--- /dev/null
+++ b/www/httptunnel/pkg-comment
@@ -0,0 +1 @@
+Tunnel a tcp/ip connection through a http/tcp/ip connection
diff --git a/www/httptunnel/pkg-descr b/www/httptunnel/pkg-descr
new file mode 100644
index 000000000000..bb1500b64bae
--- /dev/null
+++ b/www/httptunnel/pkg-descr
@@ -0,0 +1,22 @@
+Maintained under FreeBSD by: brian@awfulhak.org
+
+httptunnel creates a bidirectional virtual data path tunnelled in HTTP
+requests. The requests can be sent via an HTTP proxy if so desired.
+
+This can be useful for users behind restrictive firewalls. If WWW
+access is allowed through an HTTP proxy, it's possible to use
+httptunnel and, say, telnet or PPP to connect to a computer outside
+the firewall.
+
+If you still don't understand what this is all about, maybe you
+can find some useful information in the FAQ file.
+
+This program is mostly intended for technically oriented users.
+They should know what to do.
+
+httptunnel is free software. See COPYING for terms and conditions.
+If you like it, I would appreciate if you sent a post card to:
+ Lars Brinkhoff
+ Kopmansgatan 2
+ 411 13 Goteborg
+ Sweden
diff --git a/www/httptunnel/pkg-plist b/www/httptunnel/pkg-plist
new file mode 100644
index 000000000000..0ed52c93d29f
--- /dev/null
+++ b/www/httptunnel/pkg-plist
@@ -0,0 +1,3 @@
+bin/hts
+bin/htc
+etc/rc.d/httptunnel.sh