Proxy Support

Proxy Support — Functions for determining proxy support.

Synopsis




enum        GTcpProxyType;
gboolean    gtcp_proxy_get_use_proxy        (GTcpProxyType type,
                                             const gchar *address);

Description

Included below are the GConf keys used by LibGTcpSocket for determining proxy configuration, and also a function for determining if a proxy will be used for a connection to a particular host.

Details

enum GTcpProxyType

typedef enum					/* < prefix=GTCP_PROXY > */
{
	GTCP_PROXY_HTTP = GTCP_CONNECTION_HTTP,
	GTCP_PROXY_FTP = GTCP_CONNECTION_FTP,
	GTCP_PROXY_OTHER = GTCP_CONNECTION_OTHER,

	GTCP_PROXY_SSL,
	GTCP_PROXY_SOCKS4,
	GTCP_PROXY_SOCKS5
}
GTcpProxyType;

The proxy type to use for a particular address. See also: GTcpConnectionStyle.

GTCP_PROXY_HTTPUse an HTTP proxy.
GTCP_PROXY_FTPUse an FTP proxy (not implemented).
GTCP_PROXY_OTHERUse a SOCKS proxy of some type (this will be determined from the proxy configuration).
GTCP_PROXY_SSLUse an SSL proxy (HTTPS should use HTTP proxies) (not implemented).
GTCP_PROXY_SOCKS4Use a SOCKS version 4 server.
GTCP_PROXY_SOCKS5Use a SOCKS version 5 server.

gtcp_proxy_get_use_proxy ()

gboolean    gtcp_proxy_get_use_proxy        (GTcpProxyType type,
                                             const gchar *address);

This function checks GTcpProxyType & the address, and returns TRUE if a proxy will be used, or FALSE, if one won't. This is useful if you need to check to see if you can create a GTcpServer without problems.

type : the GTcpProxyType for this connection.
address : the remote address to check the proxy for.
Returns : a gboolean if a proxy will be used for this connection.

Since 1.0