<GProxyResolver> provides synchronous and
asynchronous network proxy resolution.
<GProxyResolver> is used within
<GSocketClient> through the method
socket-connectable:proxy-enumerate.
Implementations of <GProxyResolver> based on
libproxy and GNOME settings
can be found in
glib-networking.
GIO comes with an implementation for use inside Flatpak portals.
Gets the default <GProxyResolver> for the
system.
Returned: a <GProxyResolver>.
the default <GProxyResolver>, which will be
a dummy object if no proxy resolver is available
Checks if self can be used on this system. (This is used
internally;
proxy-resolver-get-default will
only return a proxy resolver that returns #t for this method.)
Passed: a <GProxyResolver>.
Returned: a boolean.
#t if self is supported.
Looks into the system proxy configuration to determine what proxy, if
any, to use to connect to uri. The returned proxy URIs are of the
form <protocol>://[user[:password]@]host[:port] or
direct://, where <protocol> could be http, rtsp, socks or
other proxying protocol.
If you don’t know what network protocol is being used on the socket, you
should use none as the URI protocol. In this case, the resolver
might still return a generic proxy type (such as SOCKS), but would not
return protocol-specific proxy types (such as http).
direct:// is used when no proxy is needed. Direct connection
should not be attempted unless it is part of the returned array of
proxies.
Passed: a <GProxyResolver>.
Passed: a string.
a URI representing the destination to connect to
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable>, or #f
Returned: a vector, each a string.
A NULL-terminated array of proxy URIs. Must be freed with
strfreev.
Asynchronous lookup of proxy. See proxy-resolver:lookup for more details.
Passed: a <GProxyResolver>.
Passed: a string.
a URI representing the destination to connect to
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable>, or #f
Passed, or left out: a procedure, or #f.
callback to call after resolution completes
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
data for callback
Call this function to obtain the array of proxy URIs when
proxy-resolver:lookup-async is
complete. See proxy-resolver:lookup
for more details.
Passed: a <GProxyResolver>.
Passed: a <GAsyncResult>.
the result passed to your
GAsyncReadyCallback
Returned: a vector, each a string.
A NULL-terminated array of proxy URIs. Must be freed with
strfreev.
Checks if self can be used on this system. (This is used
internally;
proxy-resolver-get-default will
only return a proxy resolver that returns #t for this method.)
To override it in a new class, give register-type #:vfuncs
`((is-supported . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GProxyResolver>, or its GType number.
Passed: a <GProxyResolver>.
Returned: a boolean.
#t if self is supported.
Looks into the system proxy configuration to determine what proxy, if
any, to use to connect to uri. The returned proxy URIs are of the
form <protocol>://[user[:password]@]host[:port] or
direct://, where <protocol> could be http, rtsp, socks or
other proxying protocol.
If you don’t know what network protocol is being used on the socket, you
should use none as the URI protocol. In this case, the resolver
might still return a generic proxy type (such as SOCKS), but would not
return protocol-specific proxy types (such as http).
direct:// is used when no proxy is needed. Direct connection
should not be attempted unless it is part of the returned array of
proxies.
To override it in a new class, give register-type #:vfuncs
`((lookup . ,procedure)). The procedure is called as (procedure
self uri cancellable) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GProxyResolver>, or its GType number.
Passed: a <GProxyResolver>.
Passed: a string.
a URI representing the destination to connect to
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable>, or #f
Returned: a vector, each a string.
A NULL-terminated array of proxy URIs. Must be freed with
strfreev.
Asynchronous lookup of proxy. See proxy-resolver:lookup for more details.
To override it in a new class, give register-type #:vfuncs
`((lookup-async . ,procedure)). The procedure is called as
(procedure self uri cancellable callback user-data).
Passed: the class whose implementation to call: a class that implements
<GProxyResolver>, or its GType number.
Passed: a <GProxyResolver>.
Passed: a string.
a URI representing the destination to connect to
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable>, or #f
Passed, or left out: a procedure, or #f.
callback to call after resolution completes
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
data for callback
Call this function to obtain the array of proxy URIs when
proxy-resolver:lookup-async is
complete. See proxy-resolver:lookup
for more details.
To override it in a new class, give register-type #:vfuncs
`((lookup-finish . ,procedure)). The procedure is called as
(procedure self result) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GProxyResolver>, or its GType number.
Passed: a <GProxyResolver>.
Passed: a <GAsyncResult>.
the result passed to your
GAsyncReadyCallback
Returned: a vector, each a string.
A NULL-terminated array of proxy URIs. Must be freed with
strfreev.