ProxyResolverT

gio.proxy_resolver.ProxyResolver provides synchronous and asynchronous network proxy resolution. gio.proxy_resolver.ProxyResolver is used within gio.socket_client.SocketClient through the method gio.socket_connectable.SocketConnectable.proxyEnumerate.

Implementations of gio.proxy_resolver.ProxyResolver based on libproxy and GNOME settings can be found in glib-networking. GIO comes with an implementation for use inside Flatpak portals.

Members

Functions

isSupported
bool isSupported()

Checks if resolver can be used on this system. (This is used internally; gio.proxy_resolver.ProxyResolver.getDefault will only return a proxy resolver that returns true for this method.)

lookup
string[] lookup(string uri, gio.cancellable.Cancellable cancellable)

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.

lookupAsync
void lookupAsync(string uri, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Asynchronous lookup of proxy. See gio.proxy_resolver.ProxyResolver.lookup for more details.

lookupFinish
string[] lookupFinish(gio.async_result.AsyncResult result)

Call this function to obtain the array of proxy URIs when gio.proxy_resolver.ProxyResolver.lookupAsync is complete. See gio.proxy_resolver.ProxyResolver.lookup for more details.