# $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", "link-See also Duat"=>"http://code.google.com/p/duat/", "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;