AppleOpenSource/WebKit2-7609.3.5.1.3/UIProcess/API/glib/WebKitNetworkProxySettings.cpp
/**
 * webkit_network_proxy_settings_new:
 * @default_proxy_uri: (allow-none): the default proxy URI to use, or %NULL.
 * @ignore_hosts: (allow-none) (array zero-terminated=1): an optional list of hosts/IP addresses to not use a proxy for.
 *
 * 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:
 * <itemizedlist>
 * <listitem><para>
 * A hostname, such as "example.com", ".example.com", or "*.example.com", any of which match "example.com" or
 * any subdomain of it.
 * </para></listitem>
 * <listitem><para>
 * An IPv4 or IPv6 address, such as "192.168.1.1", which matches only that address.
 * </para></listitem>
 * <listitem><para>
 * A hostname or IP address followed by a port, such as "example.com:80", which matches whatever the hostname or IP
 * address would match, but only for URLs with the (explicitly) indicated port. In the case of an IPv6 address, the address
 * part must appear in brackets: "[::1]:443"
 * </para></listitem>
 * <listitem><para>
 * An IP address range, given by a base address and prefix length, such as "fe80::/10", which matches any address in that range.
 * </para></listitem>
 * </itemizedlist>
 *
 * 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.
 *
 * Returns: (transfer full): A new #WebKitNetworkProxySettings.
 *
 * Since: 2.16
 */
@default_proxy_uri: (allow-none): the default proxy URI to use, or %NULL.
@ignore_hosts: (allow-none) (array zero-terminated=1): an optional list of hosts/IP addresses to not use a proxy for.

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.

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.

(transfer full): A new #WebKitNetworkProxySettings.


@default_proxy_uri : ( allow - none ) : the default proxy URI to use or %NULL . @ignore_hosts : ( allow - none ) ( array zero - terminated = 1 ) : an optional list of hosts / IP addresses to not use a proxy for . 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 . 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 . ( transfer full ) : A new #WebKitNetworkProxySettings .
WebKitNetworkProxySettings* webkit_network_proxy_settings_new(const char* defaultProxyURI, const char* const* ignoreHosts)
{
    WebKitNetworkProxySettings* proxySettings = static_cast<WebKitNetworkProxySettings*>(fastMalloc(sizeof(WebKitNetworkProxySettings)));
    new (proxySettings) WebKitNetworkProxySettings;
    if (defaultProxyURI)
        proxySettings->settings.defaultProxyURL = defaultProxyURI;
    if (ignoreHosts)
        proxySettings->settings.ignoreHosts.reset(g_strdupv(const_cast<char**>(ignoreHosts)));
    return proxySettings;
}
WebKitNetworkProxySettings * webkit_network_proxy_settings_new ( const char * defaultProxyURI , const char * const * ignoreHosts ) { WebKitNetworkProxySettings * proxySettings = static_cast < WebKitNetworkProxySettings * > ( fastMalloc ( sizeof ( WebKitNetworkProxySettings ) ) ) ; new ( proxySettings ) WebKitNetworkProxySettings ; if ( defaultProxyURI ) proxySettings -> settings . defaultProxyURL = defaultProxyURI ; if ( ignoreHosts ) proxySettings -> settings . ignoreHosts . reset ( g_strdupv ( const_cast < char * * > ( ignoreHosts ) ) ) ; return proxySettings ; }
webkit_network_proxy_settings_new:
 @default_proxy_uri: (allow-none): the default proxy URI to use, or %NULL.
webkit_network_proxy_settings_new : @default_proxy_uri : ( allow - none ) : the default proxy URI to use or %NULL .