I'm a firm believer that Qt is up to darned near any task. With that said I also think the right tool for the right job. Check out the program proxy @
http://sourceforge.net/projects/proxy/
If you are still interested in using Qt, here's a hint on where what would have to be done.
Stat with a QCoreApplication, have it create a QTcpServer, set this up to listen on port 80.
When a connection comes in, create a QTcpSocket and have it connect to the port you want to move the traffic too.
Then just connect signals and slots so the traffic get funneled between the two.
My explaination is very simplistic and may be full of holes that you would have to fill in, things like subclassing the socket objects to make the traffic flow, maybe making it threaded. Possibly other things too. If I got any more detailed than I did, I would write it, and you probably don't want that.
-joe
Bookmarks