Can some one give me an example scenario where this package can be used? http://packages.ubuntu.com/dapper/simpleproxy
2 Answers
I realize this question was posted many years ago, but it still appears at the top of Google results, so I think it'd be helpful to add here. Yes, the manual page is very descriptive, but it doesn't show any examples. The command line usage is a little better (the manpage seems to imply that the -S switch is required, when it's not).
Basic usage:
simpleproxy -L [local port on which you want to listen for remote requests] -R [remote host:remote port for which you want to proxy/tunnel to]
A simple example:
simpleproxy -L 80 -R some.service.com:9999
Running in detached/headless mode (add the -d switch, and you'd probably want to set it up as a startup service if you need the proxy to be persistent):
simpleproxy -d -L 80 -R some.service.com:9999
You can check that it's listening:
lsof -i
You should see a line like:
simplepro 26317 root 3u IPv4 86748140 0t0 TCP *:80 (LISTEN)
Keep in mind, traffic in between the connecting machine and the simpleproxy server could probably be sniffed. If you're connecting to an HTTPS service at the other end, I would advise using stunnel instead. Or you can try adding the -S switch, but I haven't personally used it.
The manual page is very descriptive:
The simpleproxy program acts as a simple tcp proxy. It opens listening socket on local machine and forwards any connection to the remote host.
From this text, and its option, I can imagine some use cases:
- HTTP proxy
- Connection to a machine in the network which can otherwise not be reached from outside because of a firewall (IPtables can do this too, but requires root)