Gio.SocketClient.prototype.add_application_proxy

function add_application_proxy(protocol: String): void {
    // Gjs wrapper for g_socket_client_add_application_proxy()
}
  

Enable proxy protocols to be handled by the application. When the indicated proxy protocol is returned by the Gio.ProxyResolver, Gio.SocketClient will consider this protocol as supported but will not try to find a Gio.Proxy instance to handle handshaking. The application must check for this case by calling Gio.SocketConnection.prototype.get_remote_address 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.

protocol

The proxy protocol