![]() | ![]() | ![]() | GTcpSocket Library Manual | ![]() |
---|
Proxy Support — Functions for determining proxy support.
enum GTcpProxyType; gboolean gtcp_proxy_get_use_proxy (GTcpProxyType type, const gchar *address);
The GTcpSocket library automatically forwards outgoing connections through configured proxy servers. The configuration is stored in GConf, and GTcpSocket reads the same configuration as GnomeVFS, and by extension, the GNOME Desktop.
The GConf keys used to store proxy settings are:
Key | Type | Description |
---|---|---|
/system/http_proxy/use_http_proxy | Boolean | Use a proxy server to connect to HTTP servers. |
/system/http_proxy/host | String | The hostname of the HTTP proxy server. |
/system/http_proxy/port | Integer | The port of the HTTP proxy server defined in /system/http_proxy/host. |
/system/http_proxy/use_authentication | Boolean | Authenticate when using the HTTP proxy server. |
/system/http_proxy/authentication_user | String | The username to use when authenticating with the HTTP proxy server defined in /system/http_proxy/host. |
/system/http_proxy/authentication_password | String | The password to use when authenticating with the HTTP proxy server defined in /system/http_proxy/host. |
/system/proxy/ftp_host | String | The hostname of the FTP proxy server. |
/system/proxy/ftp_port | Integer | The port of the FTP proxy server defined in /system/proxy/ftp_host. |
/system/proxy/ssl_host | String | The hostname of the SSL proxy server. |
/system/proxy/ssl_port | Integer | The port of the SSL proxy server defined in /system/proxy/ssl_host. |
/system/proxy/socks_host | String | The hostname of the SOCKS proxy server. |
/system/proxy/socks_port | Integer | The port of the SOCKS proxy server defined in /system/proxy/socks_host. |
/system/proxy/socks_is_v5 | Boolean | The SOCKS proxy server defined in /system/proxy/socks_host uses SOCKS version 5. |
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_HTTP | use an HTTP proxy. |
GTCP_PROXY_FTP | use an FTP proxy (not implemented). |
GTCP_PROXY_OTHER | use a SOCKS proxy of some type (this will be determined from the proxy configuration). |
GTCP_PROXY_SSL | use an SSL proxy (HTTPS should use HTTP proxies) (not implemented). |
GTCP_PROXY_SOCKS4 | use a SOCKS version 4 server. |
GTCP_PROXY_SOCKS5 | use a SOCKS version 5 server. |
Since 1.0.
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
<< DNS Lookups | Error Reporting >> |