|
datapipe_http
datapipe_http is based on the original version of datapipe developed on the Linux platform in the year 1995 by Todd Vierling that allows a local port (localport) to be opened in order to pipe a connection to another port (remoteport) on local/remote machines. 'localport' accepts connections on the machine running datapipe, which will connect to 'remoteport' on 'remotehost'. It creates a data pipe between a "listen" port on the machine it's being run on and another port on a local/remote machine. Fairly standard 500 xxxx extended errors are displayed in case something drastic happens.
For example, executing datapipe_http as below
datapipe_http 2222 somehost.com 23
------------- ---- ------------ --
| | |____ Local/Remote Port
| |
| |____ Local/Remote Host
|
|____ Local Port
would create a TCP port 2222 on the local machine that, if telnetted to, would be the same as telnetting to port 23 on somehost.com. This can be used for a variety of purposes: redirecting IRC connections so that identd shows the username of the datapipe process; redirecting sendmail direct connections for the same reason; even for use on a firewall machine to give access to an internal service (ftpd, for instance). Cascaded datapipes make for interesting traceback dilemmas.
Enhancement by Net-Square
- Ported on Win32:
Unlike the original verison of datapipe, datapipe_http by Net-Square is also available for the Win32 platform.
- datapipe using HTTP CONNECT method
The original datapipe did not have HTTP CONNECT support. Normally firewalls are configured to allow only HTTP traffic which usually runs on ports 80 & 443. In such cases, the original datapipe won't work for other ports. We have implemented HTTP CONNECT support for datapipe. It is hacked up to connect via HTTP proxies. Essentially, it opens up a connection with the HTTP proxy server, and uses the 'CONNECT remotehost:remoteport HTTP/1.0' technique to open a plain bi-directional TCP connection to the destination server. The TCP connection is then handed off to the program that connects to the incoming datapipe listener port.
For example, www.somemail.com is a public mail server providing pop access (TCP Port 110) via host pop.somemail.com. Most networks have firewalls in place (you may also use the word enabled), where only HTTP traffic is allowed to pass through. Users from behind a firewall, will therefore, be unable to access pop.somemail.com. But by using datapipe_http in conjunction with the public proxy server that allows HTTP CONNECT method, users can make connections to the host pop.somemail.com
This can be done by running datapipe_http as shown in the example below:
Example:
datapipe_http 2222 pop.somemail.com 110 -proxy openproxy.com:80
This would open TCP port 2222 on the local machine where datapipe_http is executed. datapipe_http will use HTTP CONNECT method to connect to TCP port 80 of openproxy.com. All requests sent to TCP port 2222 on the local machine are directed to pop.somemail.com. Thus a plain bi-directional TCP connection pipe is created between the localhost and pop.somemail.com.
Downloads datapipe_http 1.0: (released on 03/02/2006)
| platform |
ver |
url |
md5 |
| Win32 cmd line |
1.0 |
[download] |
6d3949d9a649960e8358163a7b18208b |
| Linux |
1.0 |
[download] |
f6fcf8ee7ffb243e7b93ea9195cb71cf |
Usage:
datapipe_http <localport> <remotehost> <remoteport> [-proxy host:port]
| <localport> |
|
Specify a local port number for datapipe_http to listen on. |
| <remotehost> |
|
Specify the remote hostname. |
| <remoteport> |
|
Specify remote port number of the remote hostname. |
| -proxy <host:port> |
|
Supply a proxy server host and port to build a pipe using HTTP:CONNECT method. Default TCP portis 80. |
Examples:
datapipe_http 8080 www.abc.com 80
datapipe_http 8080 10.0.0.2 21
datapipe_http 8080 www.abc.com 80 -proxy 10.0.0.1:8888
Source Code:
datapipe_http.cpp contains the entire source code of datapipe_http. To compile on WIN32 environment, run "compile.bat" from the console. For Linux, run "compile.sh" from the shell prompt. Click here to download the source code. MD5: 75ca0fcaa646f82b0102a79fadffc16a
Credits:
The original datapipe program was by Todd Vierling, 1995
Please report bugs, send us feedback at
|