tor_api: CreateConnection() interface
In ticket:26653#comment:8 I mentioned it may be nice if there was an easier way of requesting a new connection other than via a SOCKS connection. Adding an interface for creating a connection when roughly the same parameters Tor receives from the SOCKS handshake. In fact, I wonder if providing this as a wrapper around a default SOCKS client implementation may be an easy way of doing this.
Something like:
/**
* Tells Tor to open a socket for a client connection to the requested
* destination. Return the socket.
*/
SOCKS_SOCKET tor_main_create_connection(tor_main_configuration_t *cfg,
const char * hostname,
uint16_t port,
const char * stream_isolation);
Note, we don't need this for Tor Browser for Android. This is simply a more general idea.