This is a simple proxy daemon that allows you to forward TCP requests hitting a specified port on a local host to a different port on another host. It is written in ANSI C so it takes a very little space and can be used on embedded devices.
This is a simple proxy daemon that allows you to forward TCP requests hitting a specified port on a local host to a different port on another host. It is written in ANSI C so it takes a very little space and can be used on embedded devices.
2. INSTALLATION
2. INSTALLATION
On Linux compile the software using "make". On Windows use "make" from Cygwin (http://cygwin.com).
On Linux compile the software using "make". On Windows use "make" from Cygwin (http://cygwin.com).
To build an executable for Tomato firmware (http://www.polarcloud.com/tomato) you need to have the mipsel toolchain installed. Fetch it with git:
To build an executable for Tomato firmware (http://www.polarcloud.com/tomato) you need to have the mipsel toolchain installed. Fetch it with git:
git clone git://repo.or.cz/tomato.git tomato
git clone git://repo.or.cz/tomato.git tomato
and follow instructions in the "tools/README.TXT" file.
and follow instructions in the "tools/README.TXT" file.
Suppose you want to open port 8080 on a public host and forward all TCP packets to port 80 on machine 192.168.1.2 in the local network. In this case you install proxy on a public host and run it the following command:
Suppose you want to open port 8080 on a public host and forward all TCP packets to port 80 on machine 192.168.1.2 in the local network. In this case you install proxy on a public host and run it the following command:
proxy -l 8080 -h 192.168.1.2 -p 80
proxy -l 8080 -h 192.168.1.2 -p 80
Input parser and output parser are commands through which incoming and outgoing packets can be forwarded. For example to use a "tee" command to log all incoming http data to incoming.txt file you can start proxy with the following options:
Input parser and output parser are commands through which incoming and outgoing packets can be forwarded. For example to use a "tee" command to log all incoming http data to incoming.txt file you can start proxy with the following options:
The parser command will receive data from socket to its standard input and should send parsed data to the standard output. It should also flush its output at a reasonable rate to not withhold network communication.
The parser command will receive data from socket to its standard input and should send parsed data to the standard output. It should also flush its output at a reasonable rate to not withhold network communication.