Method

GioSocketClientadd_application_proxy

Declaration [src]

void
g_socket_client_add_application_proxy (
  GSocketClient* client,
  const gchar* protocol
)

Description [src]

Enable proxy protocols to be handled by the application. When the indicated proxy protocol is returned by the GProxyResolver, GSocketClient will consider this protocol as supported but will not try to find a GProxy instance to handle handshaking. The application must check for this case by calling g_socket_connection_get_remote_address() on the returned GSocketConnection, and seeing if it’s a GProxyAddress of the appropriate type, to determine whether or not it needs to handle the proxy handshaking itself.

This should be used for proxy protocols that are dialects of another protocol such as HTTP proxy. It also allows cohabitation of proxy protocols that are reused between protocols. A good example is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also be use as generic socket proxy through the HTTP CONNECT method.

When the proxy is detected as being an application proxy, TLS handshake will be skipped. This is required to let the application do the proxy specific handshake.

Parameters

protocol

Type: const gchar*

The proxy protocol.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.