From: lace <> Date: Tue, 27 Mar 2007 10:37:18 +0000 (+0000) Subject: +project tcpoverudp X-Git-Url: http://git.jankratochvil.net/?p=www.jankratochvil.net.git;a=commitdiff_plain;h=5b92fe2c10c9facc72254ce7d54b3aafedc13a86 +project tcpoverudp --- diff --git a/configure.ac b/configure.ac index af4386d..5e5b711 100644 --- a/configure.ac +++ b/configure.ac @@ -129,6 +129,7 @@ Makefile ./project/xbelnormalize/Makefile ./project/inetdmx/Makefile ./project/staticbuild/Makefile +./project/tcpoverudp/Makefile ]) echo done. diff --git a/project/Makefile.am b/project/Makefile.am index d491573..f0d4a1f 100644 --- a/project/Makefile.am +++ b/project/Makefile.am @@ -91,7 +91,8 @@ SUBDIRS= \ netdnsspoof \ xbelnormalize \ inetdmx \ - staticbuild + staticbuild \ + tcpoverudp SUBDIRS: Makefile @echo $(SUBDIRS) >$@ diff --git a/project/tcpoverudp/Index.pm b/project/tcpoverudp/Index.pm new file mode 100644 index 0000000..3292cc4 --- /dev/null +++ b/project/tcpoverudp/Index.pm @@ -0,0 +1,101 @@ +# $Id$ +# Main page of 'My::Project::tcpoverudp' +# Copyright (C) 2007 Jan Kratochvil +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; exactly version 2 of June 1991 is required +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +package project::tcpoverudp::Index; +require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway +our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; +our $CVS_ID=q$Id$; +use strict; +use warnings; + +use My::Web; +Wuse 'project::Lib'; +Wrequire 'product::Lib'; + + +our @ListItem=( + "name"=>"tcpoverudp", + "platform"=>"unixuser", + "priority"=>555, + "cvs"=>"tcpoverudp", + # FIXME: 'http://cvs.jankratochvil.net/viewcvs/' -> $W->{"project_viewcvs"} + "link-Source file"=>'http://cvs.jankratochvil.net/viewcvs/'."tcpoverudp/tcpoverudp?rev=HEAD", + "summary"=>"Forward TCP connections over UDP without root", + "license"=>"GPL", + "maintenance"=>"ready", + "language"=>"Perl", + "description"=>sub { return <<"HERE"; }, +

Does your link suffer from a high packet loss (up to 70%)? +Do you have a UNIX account in public Internet but no root privileges access there? +This tool can provide you a reliable fast TCP (web proxy + SSH) connectivity while +constantly retrying transmissions on link of any quality.

+HERE + ); + +sub handler +{ +project::Lib->init(); + + +print <<"HERE"; +

Local script:

+
+	./tcpoverudp --udp-server-addr=public.server.com --udp-server-port=8120 \\
+			--tcp-listen-port=8128 8122
+
+

Remote script:

+
+	./tcpoverudp --udp-listen-port=8120 \\
+			--tcp-forward-addr=public.web.proxy --tcp-forward-port=3128 \\
+			--tcp-forward-addr=localhost        --tcp-forward-port=22
+
+ +

This setup configures a connection:

+ + + + + + + + + + + + + + + +
:8128 (TCP, for web proxy)(UDP) → 8120 (UDP)public.web.proxy:3128 (TCP, parent web proxy)
:8122 (TCP, for SSH)localhost:22 (TCP, SSH server)
+ +

You should also use this ~/.ssh/configfor transparent SSH access:

+
+	Host public-proxy
+	HostName public.server.com
+	HostKeyAlias public.server.com
+	Port 8122
+	ProxyCommand none
+	Host *
+	ProxyCommand ssh public-proxy exec nc %h %p
+
+HERE + + +exit; +} +1; diff --git a/project/tcpoverudp/Makefile.am b/project/tcpoverudp/Makefile.am new file mode 100644 index 0000000..f4f737d --- /dev/null +++ b/project/tcpoverudp/Makefile.am @@ -0,0 +1,23 @@ +# $Id$ +# automake source for the Makefile of project/tcpoverudp/ subdir +# Copyright (C) 2007 Jan Kratochvil +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; exactly version 2 of June 1991 is required +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +include $(top_srcdir)/Makefile-head.am + +MODPERL_PM+= \ + Index.pm +