Just curious if this is possible. Lets assume i run a pair of irc servers (or anything else) on a system with different ports- i'd like to have something listen into a single port, and forward packets based on hostname - any connections to A.foo.bar should be forwarded to one port, and any connections to B.foo.bar should be forwarded to another. Most proxies seem to be for http, and well, that's not the use case i have in mind.
I'm currently running ubuntu server 9.04 and 10.04, though i'd be willing to switch to another free OS to do this.