+Duat link
[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                 "link-Extension of this one"=>"http://code.google.com/p/duat/",
43                 "description"=>sub { return <<"HERE"; },
44 <p>Does your link suffer from a high packet loss (up to 70%)?
45 Do you have a UNIX account in public Internet but no root privileges access there?
46 This tool can provide you a reliable fast TCP (web proxy + SSH) connectivity while
47 constantly retrying transmissions on link of any quality.</p>
48 HERE
49                 );
50
51 sub handler
52 {
53 project::Lib->init();
54
55
56 print <<"HERE";
57 <p>Local script:</p>
58 <pre>
59         ./tcpoverudp --udp-server-addr=public.server.com --udp-server-port=8120 \\
60                         --tcp-listen-port=8128 8122
61 </pre>
62 <p>Remote script:</p>
63 <pre>
64         ./tcpoverudp --udp-listen-port=8120 \\
65                         --tcp-forward-addr=public.web.proxy --tcp-forward-port=3128 \\
66                         --tcp-forward-addr=localhost        --tcp-forward-port=22
67 </pre>
68
69 <p>This setup configures a connection:</p>
70 <table border="1" class="margin-center padded">
71         <tr>
72                 <td>:8128 (TCP, for web proxy)</td>
73                 <td>&rarr;</td>
74                 <td rowspan="2">(UDP)&nbsp;&rarr;&nbsp;8120 (UDP)</td>
75                 <td>&rarr;</td>
76                 <td>public.web.proxy:3128 (TCP, parent web proxy)</td>
77         </tr>
78         <tr>
79                 <td>:8122 (TCP, for SSH)</td>
80                 <td>&rarr;</td>
81                 <!---->
82                 <td>&rarr;</td>
83                 <td>localhost:22 (TCP, SSH server)</td>
84         </tr>
85 </table>
86
87 <p>You should also use this <code>~/.ssh/config</code>for transparent SSH access:</p>
88 <pre>
89         Host public-proxy
90         HostName public.server.com
91         HostKeyAlias public.server.com
92         Port 8122
93         ProxyCommand none
94         Host *
95         ProxyCommand ssh public-proxy exec nc %h %p
96 </pre>
97 HERE
98
99
100 exit;
101 }
102 1;