SocketClient.addApplicationProxy

Enable proxy protocols to be handled by the application. When the indicated proxy protocol is returned by the GProxyResolver, gio.SocketClient 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 Socket.connectionGetRemoteAddress on the returned gio.SocketConnection, and seeing if it's a gio.ProxyAddress 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.

class SocketClient
void
addApplicationProxy
(
string protocol
)

Parameters

protocol string

The proxy protocol