efl_net_dialer_tcp: add SOCKS proxy support.
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Mon, 19 Sep 2016 03:56:18 +0000 (00:56 -0300)
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Mon, 19 Sep 2016 04:18:14 +0000 (01:18 -0300)
commita975bfe1e60da8ef3c38095b537b9aeda33cf0f8
treedb0f6e062f7a314cb5d29aa2f58d12f60ad153bb
parenteb9a1f13a3a6a361cdb1ce254a643e9c39cfc246
efl_net_dialer_tcp: add SOCKS proxy support.

SOCKS is implemented in its own thread using synchronous/blocking
primitives, which simplifies the code a lot -- as well as simulate the
usage of Ecore_Thread as our users will likely do.

Since SOCKSv4a and SOCKSv5 allow name resolution, the whole
getaddrinfo() is done in the same thread, when needed, instead of a
separate thread to do that, which should also save some resources.

Instead of the legacy ECORE_CON_SOCKS_V4 and ECORE_CON_SOCKS_V5, now
we use socks_proxy, all_proxy and no_proxy. This matches our other
dialers http/websocket (which will use http_proxy, all_proxy and
no_proxy). If desired it's easy to add back support for those
variables, but I think we should just deprecate them. (The legacy code
will keep unchanged, thus direct users of ecore_con_server will still
use those -- just the previous users of ecore_con_server will be
converted to use the new API).
src/lib/ecore_con/Ecore_Con_Eo.h
src/lib/ecore_con/ecore_con.c
src/lib/ecore_con/ecore_con_private.h
src/lib/ecore_con/efl_net_dialer.eo
src/lib/ecore_con/efl_net_dialer_tcp.c