gi-webkit2-4.0.29: WebKit2 bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.WebKit2.Structs.NetworkProxySettings

Description

Configures network proxies.

WebKitNetworkProxySettings can be used to provide a custom proxy configuration to a WebContext. You need to call webContextSetNetworkProxySettings with NetworkProxyModeCustom and a WebKitNetworkProxySettings.

Since: 2.16

Synopsis

Exported types

newtype NetworkProxySettings Source #

Memory-managed wrapper type.

Constructors

NetworkProxySettings (ManagedPtr NetworkProxySettings) 

Instances

Instances details
Eq NetworkProxySettings Source # 
Instance details

Defined in GI.WebKit2.Structs.NetworkProxySettings

GBoxed NetworkProxySettings Source # 
Instance details

Defined in GI.WebKit2.Structs.NetworkProxySettings

ManagedPtrNewtype NetworkProxySettings Source # 
Instance details

Defined in GI.WebKit2.Structs.NetworkProxySettings

TypedObject NetworkProxySettings Source # 
Instance details

Defined in GI.WebKit2.Structs.NetworkProxySettings

Methods

glibType :: IO GType

HasParentTypes NetworkProxySettings Source # 
Instance details

Defined in GI.WebKit2.Structs.NetworkProxySettings

IsGValue (Maybe NetworkProxySettings) Source #

Convert NetworkProxySettings to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.WebKit2.Structs.NetworkProxySettings

type ParentTypes NetworkProxySettings Source # 
Instance details

Defined in GI.WebKit2.Structs.NetworkProxySettings

type ParentTypes NetworkProxySettings = '[] :: [Type]

Methods

Click to display all available methods, including inherited ones

Expand

Methods

addProxyForScheme, copy, free.

Getters

None.

Setters

None.

addProxyForScheme

networkProxySettingsAddProxyForScheme Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> NetworkProxySettings

proxySettings: a NetworkProxySettings

-> Text

scheme: the URI scheme to add a proxy for

-> Text

proxyUri: the proxy URI to use for uriScheme

-> m () 

Adds a URI-scheme-specific proxy.

URIs whose scheme matches uriScheme will be proxied via proxyUri. As with the default proxy URI, if proxyUri starts with "socks://", it will be treated as referring to all three of the socks5, socks4a, and socks4 proxy types.

Since: 2.16

copy

networkProxySettingsCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> NetworkProxySettings

proxySettings: a NetworkProxySettings

-> m NetworkProxySettings

Returns: A copy of passed in NetworkProxySettings

Make a copy of the NetworkProxySettings.

Since: 2.16

free

new

networkProxySettingsNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe Text

defaultProxyUri: the default proxy URI to use, or Nothing.

-> Maybe [Text]

ignoreHosts: an optional list of hosts/IP addresses to not use a proxy for.

-> m NetworkProxySettings

Returns: A new NetworkProxySettings.

Create a new NetworkProxySettings with the given defaultProxyUri and ignoreHosts.

The default proxy URI will be used for any URI that doesn't match ignoreHosts, and doesn't match any of the schemes added with networkProxySettingsAddProxyForScheme. If defaultProxyUri starts with "socks://", it will be treated as referring to all three of the socks5, socks4a, and socks4 proxy types.

ignoreHosts 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 ignoreHosts 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.

Since: 2.16