Tizen Native API  7.0
Ecore Connection SOCKS functions

Functions

Ecore_Con_Socksecore_con_socks4_remote_add (const char *ip, int port, const char *username)
 Adds a SOCKS v4 proxy to the proxy list.
Eina_Bool ecore_con_socks4_remote_exists (const char *ip, int port, const char *username)
 Finds a SOCKS v4 proxy in the proxy list.
void ecore_con_socks4_remote_del (const char *ip, int port, const char *username)
 Removes a SOCKS v4 proxy from the proxy list and delete it.
Ecore_Con_Socksecore_con_socks5_remote_add (const char *ip, int port, const char *username, const char *password)
 Adds a SOCKS v5 proxy to the proxy list.
Eina_Bool ecore_con_socks5_remote_exists (const char *ip, int port, const char *username, const char *password)
 Finds a SOCKS v5 proxy in the proxy list.
void ecore_con_socks5_remote_del (const char *ip, int port, const char *username, const char *password)
 Removes a SOCKS v5 proxy from the proxy list and delete it.
void ecore_con_socks_lookup_set (Ecore_Con_Socks *ecs, Eina_Bool enable)
 Sets DNS lookup mode on an existing SOCKS proxy.
Eina_Bool ecore_con_socks_lookup_get (Ecore_Con_Socks *ecs)
 Gets DNS lookup mode on an existing SOCKS proxy.
void ecore_con_socks_bind_set (Ecore_Con_Socks *ecs, Eina_Bool is_bind)
 Enables bind mode on a SOCKS proxy.
Eina_Bool ecore_con_socks_bind_get (Ecore_Con_Socks *ecs)
 Returns bind mode of a SOCKS proxy.
unsigned int ecore_con_socks_version_get (Ecore_Con_Socks *ecs)
 Returns SOCKS version of a SOCKS proxy.
void ecore_con_socks_remote_del (Ecore_Con_Socks *ecs)
 Removes a SOCKS v4 proxy from the proxy list and delete it.
void ecore_con_socks_apply_once (Ecore_Con_Socks *ecs)
 Sets a proxy object to be used with the next server created with ecore_con_server_connect().
void ecore_con_socks_apply_always (Ecore_Con_Socks *ecs)
 Sets a proxy object to be used with all servers created with ecore_con_server_connect().

Typedefs

typedef struct Ecore_Con_Socks Ecore_Con_Socks

Typedef Documentation

An object representing a SOCKS proxy.

Since (EFL) :
1.2

Function Documentation

Ecore_Con_Socks* ecore_con_socks4_remote_add ( const char *  ip,
int  port,
const char *  username 
)

Adds a SOCKS v4 proxy to the proxy list.

Use this to create (or return, if previously added) a SOCKS proxy object which can be used by any ecore_con servers.

Parameters:
ipThe ip address of the proxy. (NOT DOMAIN NAME. IP ADDRESS.)
portThe port to connect to on the proxy.
usernameThe username to use for the proxy. (OPTIONAL)
Returns:
An allocated proxy object, or NULL on failure.
Note:
This object NEVER needs to be explicitly freed.
Since (EFL) :
1.2
Since :
3.0
void ecore_con_socks4_remote_del ( const char *  ip,
int  port,
const char *  username 
)

Removes a SOCKS v4 proxy from the proxy list and delete it.

Use this to remove a SOCKS proxy from the proxy list by checking the list against the parameters given. The proxy will then be deleted.

Parameters:
ipThe ip address of the proxy. (NOT DOMAIN NAME. IP ADDRESS.)
portThe port to connect to on the proxy, or -1 to match the first proxy with ip
usernameThe username used for the proxy. (OPTIONAL)
Note:
This function matches in the same way as ecore_con_socks4_remote_exists().
Warning:
Be aware that deleting a proxy which is being used WILL ruin your life.
Since (EFL) :
1.2
Since :
3.0
Eina_Bool ecore_con_socks4_remote_exists ( const char *  ip,
int  port,
const char *  username 
)

Finds a SOCKS v4 proxy in the proxy list.

Use this to determine if a SOCKS proxy was previously added by checking the proxy list against the parameters given.

Parameters:
ipThe ip address of the proxy. (NOT DOMAIN NAME. IP ADDRESS.)
portThe port to connect to on the proxy, or -1 to match the first proxy with ip
usernameThe username used for the proxy. (OPTIONAL)
Returns:
True only if a proxy exists matching the given params.
Note:
This function matches slightly more loosely than ecore_con_socks4_remote_add(), and ecore_con_socks4_remote_add() should be used to return the actual object.
Since (EFL) :
1.2
Since :
3.0
Ecore_Con_Socks* ecore_con_socks5_remote_add ( const char *  ip,
int  port,
const char *  username,
const char *  password 
)

Adds a SOCKS v5 proxy to the proxy list.

Use this to create (or return, if previously added) a SOCKS proxy object which can be used by any ecore_con servers.

Parameters:
ipThe ip address of the proxy. (NOT DOMAIN NAME. IP ADDRESS.)
portThe port to connect to on the proxy.
usernameThe username to use for the proxy. (OPTIONAL)
passwordThe password to use for the proxy. (OPTIONAL)
Returns:
An allocated proxy object, or NULL on failure.
Note:
This object NEVER needs to be explicitly freed.
Since (EFL) :
1.2
Since :
3.0
void ecore_con_socks5_remote_del ( const char *  ip,
int  port,
const char *  username,
const char *  password 
)

Removes a SOCKS v5 proxy from the proxy list and delete it.

Use this to remove a SOCKS proxy from the proxy list by checking the list against the parameters given. The proxy will then be deleted.

Parameters:
ipThe ip address of the proxy. (NOT DOMAIN NAME. IP ADDRESS.)
portThe port to connect to on the proxy, or -1 to match the first proxy with ip
usernameThe username used for the proxy. (OPTIONAL)
passwordThe password used for the proxy. (OPTIONAL)
Note:
This function matches in the same way as ecore_con_socks4_remote_exists().
Warning:
Be aware that deleting a proxy which is being used WILL ruin your life.
Since (EFL) :
1.2
Since :
3.0
Eina_Bool ecore_con_socks5_remote_exists ( const char *  ip,
int  port,
const char *  username,
const char *  password 
)

Finds a SOCKS v5 proxy in the proxy list.

Use this to determine if a SOCKS proxy was previously added by checking the proxy list against the parameters given.

Parameters:
ipThe ip address of the proxy. (NOT DOMAIN NAME. IP ADDRESS.)
portThe port to connect to on the proxy, or -1 to match the first proxy with ip
usernameThe username used for the proxy. (OPTIONAL)
passwordThe password used for the proxy. (OPTIONAL)
Returns:
True only if a proxy exists matching the given params.
Note:
This function matches slightly more loosely than ecore_con_socks5_remote_add(), and ecore_con_socks5_remote_add() should be used to return the actual object.
Since (EFL) :
1.2
Since :
3.0

Sets a proxy object to be used with all servers created with ecore_con_server_connect().

This function sets a proxy for all ecore_con connections. It will always be used.

Parameters:
ecsThe proxy object.
See also:
ecore_con_socks_apply_once().
Since (EFL) :
1.2
Note:
ecore-con supports setting this through environment variables like so: ECORE_CON_SOCKS_V4=[user@]server-port:lookup ECORE_CON_SOCKS_V5=[user@]server-port:lookup user is the OPTIONAL string that would be passed to the proxy as the username. server is the IP_ADDRESS of the proxy server. port is the port to connect to on the proxy server. lookup is 1 if the proxy should perform all DNS lookups, otherwise 0 or omitted.
Since :
3.0

Sets a proxy object to be used with the next server created with ecore_con_server_connect().

This function sets a proxy for the next ecore_con connection. After the next server is created, the proxy will NEVER be applied again unless explicitly enabled.

Parameters:
ecsThe proxy object
See also:
ecore_con_socks_apply_always()
Since (EFL) :
1.2
Since :
3.0

Returns bind mode of a SOCKS proxy.

Use this function to return bind mode of a proxy (binding a remote port for use with a remote server). For more information, see http://ufasoft.com/doc/socks4_protocol.htm

Parameters:
ecsThe proxy object.
Returns:
If true, the connection established will be a port binding.
Since (EFL) :
1.2
Since :
3.0
void ecore_con_socks_bind_set ( Ecore_Con_Socks ecs,
Eina_Bool  is_bind 
)

Enables bind mode on a SOCKS proxy.

Use this function to enable binding a remote port for use with a remote server. For more information, see http://ufasoft.com/doc/socks4_protocol.htm

Parameters:
ecsThe proxy object.
is_bindIf true, the connection established will be a port binding.
Warning:
Be aware that changing the operation mode of an active proxy may result in undefined behavior
Since (EFL) :
1.2
Since :
3.0

Gets DNS lookup mode on an existing SOCKS proxy.

According to RFC, SOCKS v4 does not require that a proxy perform its own DNS lookups for addresses. SOCKS v4a specifies the protocol for this. SOCKS v5 allows DNS lookups. This function returns whether lookups are enabled on a proxy object.

Parameters:
ecsThe proxy object.
Returns:
If true, the proxy will perform the dns lookup.
Note:
By default, this setting is DISABLED.
Since (EFL) :
1.2
Since :
3.0

Sets DNS lookup mode on an existing SOCKS proxy.

According to RFC, SOCKS v4 does not require that a proxy perform its own DNS lookups for addresses. SOCKS v4a specifies the protocol for this. SOCKS v5 allows DNS lookups. If you want to enable remote DNS lookup and are sure that your proxy supports it, use this function.

Parameters:
ecsThe proxy object.
enableIf true, the proxy will perform the dns lookup.
Note:
By default, this setting is DISABLED.
Since (EFL) :
1.2
Since :
3.0

Removes a SOCKS v4 proxy from the proxy list and delete it.

Use this to remove a SOCKS proxy from the proxy list by directly deleting the object given.

Parameters:
ecsThe proxy object to delete
Warning:
Be aware that deleting a proxy which is being used WILL ruin your life.
Since (EFL) :
1.2
Since :
3.0

Returns SOCKS version of a SOCKS proxy.

Use this function to return the SOCKS protocol version of a proxy.

Parameters:
ecsThe proxy object.
Returns:
0 on error, else 4/5
Since (EFL) :
1.2
Since :
3.0