3292cc4076b477f12d0b0abc14e218b8e36bf76e
[www.jankratochvil.net.git] / project / tcpoverudp / Index.pm
1 # $Id$
2 # Main page of 'My::Project::tcpoverudp'
3 # Copyright (C) 2007 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; exactly version 2 of June 1991 is required
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
18
19 package project::tcpoverudp::Index;
20 require 5.6.0;  # at least 'use warnings;' but we need some 5.6.0+ modules anyway
21 our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
22 our $CVS_ID=q$Id$;
23 use strict;
24 use warnings;
25
26 use My::Web;
27 Wuse 'project::Lib';
28 Wrequire 'product::Lib';
29
30
31 our @ListItem=(
32                 "name"=>"tcpoverudp",
33                 "platform"=>"unixuser",
34                 "priority"=>555,
35                 "cvs"=>"tcpoverudp",
36                 # FIXME: 'http://cvs.jankratochvil.net/viewcvs/' -> $W->{"project_viewcvs"}
37                 "link-Source file"=>'http://cvs.jankratochvil.net/viewcvs/'."tcpoverudp/tcpoverudp?rev=HEAD",
38                 "summary"=>"Forward TCP connections over UDP without root",
39                 "license"=>"GPL",
40                 "maintenance"=>"ready",
41                 "language"=>"Perl",
42                 "description"=>sub { return <<"HERE"; },
43 <p>Does your link suffer from a high packet loss (up to 70%)?
44 Do you have a UNIX account in public Internet but no root privileges access there?
45 This tool can provide you a reliable fast TCP (web proxy + SSH) connectivity while
46 constantly retrying transmissions on link of any quality.</p>
47 HERE
48                 );
49
50 sub handler
51 {
52 project::Lib->init();
53
54
55 print <<"HERE";
56 <p>Local script:</p>
57 <pre>
58         ./tcpoverudp --udp-server-addr=public.server.com --udp-server-port=8120 \\
59                         --tcp-listen-port=8128 8122
60 </pre>
61 <p>Remote script:</p>
62 <pre>
63         ./tcpoverudp --udp-listen-port=8120 \\
64                         --tcp-forward-addr=public.web.proxy --tcp-forward-port=3128 \\
65                         --tcp-forward-addr=localhost        --tcp-forward-port=22
66 </pre>
67
68 <p>This setup configures a connection:</p>
69 <table border="1" class="margin-center padded">
70         <tr>
71                 <td>:8128 (TCP, for web proxy)</td>
72                 <td>&rarr;</td>
73                 <td rowspan="2">(UDP)&nbsp;&rarr;&nbsp;8120 (UDP)</td>
74                 <td>&rarr;</td>
75                 <td>public.web.proxy:3128 (TCP, parent web proxy)</td>
76         </tr>
77         <tr>
78                 <td>:8122 (TCP, for SSH)</td>
79                 <td>&rarr;</td>
80                 <!---->
81                 <td>&rarr;</td>
82                 <td>localhost:22 (TCP, SSH server)</td>
83         </tr>
84 </table>
85
86 <p>You should also use this <code>~/.ssh/config</code>for transparent SSH access:</p>
87 <pre>
88         Host public-proxy
89         HostName public.server.com
90         HostKeyAlias public.server.com
91         Port 8122
92         ProxyCommand none
93         Host *
94         ProxyCommand ssh public-proxy exec nc %h %p
95 </pre>
96 HERE
97
98
99 exit;
100 }
101 1;