Forward configurable local ports to endpoints via tor

In a discussion around #6609 (moved) I got an idea about a feature, that might be quite nice for Vidalia / TBB.

In Vidalia setup there could be another tab Local Relays that would look something like the following:

Local Port Target Port Enabled
30143 sdfkdassfk.onion 143 x
12345 secret.host.com 80
25 mailhjhfgui.onion 25 x

and so on.

The enabled services would open a local listener in the machine TBB is running and incoming connections would be transparently relayed via tor either to normal hosts or to hidden services.

This would enable seamless use of hidden services with software that doesn't support any kind of proxy connections.

Something similar can be implemented using tor-connect (proposed in #6609 (moved)) with inetd or OSX Launch Agent, but implementing this to Vidalia GUI would be a positively cool thing.

Trac:
Username: tri