Function
WebKit2NetworkProxySettingsnew
since: 2.16
Declaration [src]
WebKitNetworkProxySettings*
webkit_network_proxy_settings_new (
const gchar* default_proxy_uri,
const gchar* const* ignore_hosts
)
Description [src]
Create a new WebKitNetworkProxySettings
with the given default_proxy_uri
and ignore_hosts
.
The default proxy URI will be used for any URI that doesn’t match ignore_hosts
, and doesn’t match any
of the schemes added with webkit_network_proxy_settings_add_proxy_for_scheme().
If default_proxy_uri
starts with “socks://”, it will be treated as referring to all three of the
socks5, socks4a, and socks4 proxy types.
ignore_hosts
is a list of hostnames and IP addresses that the resolver should allow direct connections to.
Entries can be in one of 4 formats:
Note that when dealing with Unicode hostnames, the matching is done against the ASCII form of the name.
Also note that hostname exclusions apply only to connections made to hosts identified by name, and IP address exclusions apply only
to connections made to hosts identified by address. That is, if example.com has an address of 192.168.1.1, and ignore_hosts
contains only “192.168.1.1”, then a connection to “example.com” will use the proxy, and a connection to 192.168.1.1” will not.
Available since: 2.16
Parameters
default_proxy_uri
-
Type:
const gchar*
The default proxy URI to use, or
NULL
.The argument can be NULL
.The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. ignore_hosts
-
Type: An array of
gchar*
An optional list of hosts/IP addresses to not use a proxy for.
The argument can be NULL
.The array must be NULL
-terminated.The data is owned by the caller of the function. Each element is a NUL terminated UTF-8 string.
Return value
Type: WebKitNetworkProxySettings
A new WebKitNetworkProxySettings
.
The caller of the function takes ownership of the data, and is responsible for freeing it. |