proxy_lookup_sync


Description:

[ CCode ( array_length = false , array_null_terminated = true ) ]
[ Version ( since = "3.12" ) ]
public string[]? proxy_lookup_sync (string uri, Cancellable? cancellable = null) throws Error

Looks into this's SourceProxy extension to determine what proxy, if any, to use to connect to uri.

The returned proxy URIs are of the same form described by lookup .

The proxy extension's method controls how proxy URIs are determined:

When using E_PROXY_METHOD_DEFAULT, the function will defer to the ProxyResolver returned by get_default.

When using E_PROXY_METHOD_MANUAL, the function will configure a SimpleProxyResolver from the HTTP, HTTPS, FTP and SOCKS properties, as well as ignore_hosts.

When using E_PROXY_METHOD_AUTO, the function will execute a proxy auto-config (PAC) file at autoconfig_url.

When using E_PROXY_METHOD_NONE, the function will only return direct://.

If this does not have an SourceProxy extension, the function sets error to G_IO_ERROR_NOT_SUPPORTED and returns null.

Free the returned proxy URIs with strfreev when finished with them.

Parameters:

this

an Source

uri

a URI representing the destination to connect to

cancellable

optional Cancellable object, or null

Returns:

a null-terminated array of proxy URIs, or null