A <GProxy> handles connecting to a remote host via a
given type of proxy server. It is implemented by the gio-proxy
extension point. The extensions are named after their proxy protocol
name. As an example, a SOCKS5 proxy implementation can be retrieved
with the name socks5 using the function
Gio.IOExtensionPoint.get_extension_by_name.
Given connection to communicate with a proxy (eg, a
<GSocketConnection> that is connected to
the proxy server), this does the necessary handshake to connect to
proxy-address, and if required, wraps the
<GIOStream> to handle proxy payload.
Passed: a <GProxy>.
a <GProxy>
Passed: a <GIOStream>.
Passed: a <GProxyAddress>.
Passed, or left out: a <GCancellable>, or
#f.
Returned: a <GIOStream>.
a <GIOStream> that will replace connection.
This might be the same as connection, in which case a reference
will be added.
Asynchronous version of proxy:connect.
Passed: a <GProxy>.
a <GProxy>
Passed: a <GIOStream>.
Passed: a <GProxyAddress>.
Passed, or left out: a <GCancellable>, or
#f.
Passed, or left out: a procedure, or #f.
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
callback data
See proxy:connect.
Passed: a <GProxy>.
a <GProxy>
Passed: a <GAsyncResult>.
Returned: a <GIOStream>.
a <GIOStream>.
Find the gio-proxy extension point for a proxy implementation
that supports the specified protocol.
Some proxy protocols expect to be passed a hostname, which they will
resolve to an IP address themselves. Others, like SOCKS4, do not allow
this. This function will return #f if self is implementing
such a protocol. When #f is returned, the caller should resolve
the destination hostname first, and then pass a
<GProxyAddress> containing the stringified IP
address to proxy:connect or proxy:connect-async.
Given connection to communicate with a proxy (eg, a
<GSocketConnection> that is connected to
the proxy server), this does the necessary handshake to connect to
proxy-address, and if required, wraps the
<GIOStream> to handle proxy payload.
To override it in a new class, give register-type #:vfuncs
`((connect . ,procedure)). The procedure is called as
(procedure self connection proxy-address cancellable) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GProxy>, or its GType number.
Passed: a <GProxy>.
a <GProxy>
Passed: a <GIOStream>.
Passed: a <GProxyAddress>.
Passed, or left out: a <GCancellable>, or
#f.
Returned: a <GIOStream>.
a <GIOStream> that will replace connection.
This might be the same as connection, in which case a reference
will be added.
Asynchronous version of proxy:connect.
To override it in a new class, give register-type #:vfuncs
`((connect-async . ,procedure)). The procedure is called as
(procedure self connection proxy-address cancellable callback
user-data).
Passed: the class whose implementation to call: a class that implements
<GProxy>, or its GType number.
Passed: a <GProxy>.
a <GProxy>
Passed: a <GIOStream>.
Passed: a <GProxyAddress>.
Passed, or left out: a <GCancellable>, or
#f.
Passed, or left out: a procedure, or #f.
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
callback data
See proxy:connect.
To override it in a new class, give register-type #:vfuncs
`((connect-finish . ,procedure)). The procedure is called as
(procedure self result) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GProxy>, or its GType number.
Passed: a <GProxy>.
a <GProxy>
Passed: a <GAsyncResult>.
Returned: a <GIOStream>.
a <GIOStream>.
Some proxy protocols expect to be passed a hostname, which they will
resolve to an IP address themselves. Others, like SOCKS4, do not allow
this. This function will return #f if self is implementing
such a protocol. When #f is returned, the caller should resolve
the destination hostname first, and then pass a
<GProxyAddress> containing the stringified IP
address to proxy:connect or proxy:connect-async.
To override it in a new class, give register-type #:vfuncs
`((supports-hostname . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.