|
NAMEconnect-tunnel - Create CONNECT tunnels through HTTP proxiesSYNOPSISconnect-tunnel [ -Lv ] [ -A user:pass ] [ -P proxy:port ] [ -C controlport ] [ -T port:host:hostport ]DESCRIPTIONconnect-tunnel sets up tunneled connections to external hosts by redirecting connections to local ports towards thoses hosts/ports through a HTTP proxy.connect-tunnel makes use of the HTTP "CONNECT" method to ask the proxy to create a tunnel to an outside server. Be aware that some proxies are set up to deny outside tunnels (either to ports other than 443 or outside a specified set of outside hosts). OPTIONSThe program follows the usual GNU command line syntax, with long options starting with two dashes.
EXAMPLESTo connect to a SSH server running on "ssh.example.com", on port 443, through the proxy "proxy.company.com", running on port 8080, use the following command:connect-tunnel -P proxy.company.com:8080 -T 22:ssh.example.com:443 And now point your favorite ssh client to the machine running connect-tunnel. You can also emulate a "standard" user-agent: connect-tunnel -U "Mozilla/4.03 [en] (X11; I; Linux 2.1.89 i586)" -P proxy.company.com:8080 -T 22:ssh.example.com:443 connect-tunnel can easily use your proxy credentials to connect outside: connect-tunnel -U "Mozilla/4.03 [en] (X11; I; Linux 2.1.89 i586)" -P proxy.company.com:8080 -T 22:ssh.example.com:443 -A book:s3kr3t But if you don't want anybody else to connect to your tunnels and through the proxy with your credentials, use the --local-only option: connect-tunnel -U "Mozilla/4.03 [en] (X11; I; Linux 2.1.89 i586)" -P proxy.company.com:8080 -T 22:ssh.example.com:443 -A book:s3kr3t -L If you have several destinations, there is no need to run several instances of connect-tunnel: connect-tunnel -U "Mozilla/4.03 [en] (X11; I; Linux 2.1.89 i586)" -P proxy.company.com:8080 -A book:s3kr3t -L -T 22:ssh.example.com:443 -T 222:ssh2.example.com:443 But naturally, you will need to correctly set up the ports in your clients. Mmm, such a long command line would perfectly fit in an alias or a .BAT file. ";-)" ENVIRONMENT VARIABLESThe environment variable "HTTP_PROXY" can be used to provide a proxy definition.The environment variable is overriden by the --proxy option, if passed to connect-tunnel. AUTHORPhilippe "BooK" Bruhat, "<book@cpan.org>".I seem to have re-invented a well-known wheel with that script, but at least, I hope I have added a few interesting options to it. SCRIPT HISTORYThe first version of the script was a quick hack that let me go through a corporate proxy.Version 0.02 and version 0.03 were released on CPAN in 2003. Version 0.04 sits half-finished in a CVS repository at home: I couldn't decypher the spaghetti of my data structures any more. ":-(" Version 0.05 (and higher) are based on "Net::Proxy", and included with the "Net::Proxy" distribution. Even though it's not rocket science, connect-tunnel has been cited in at least one academic works:
COPYRIGHTCopyright 2003-2007, Philippe Bruhat. All rights reserved.LICENSEThis module is free software; you can redistribute it or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |