gi-gio
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.SimpleProxyResolver

Description

GSimpleProxyResolver is a simple ProxyResolver implementation that handles a single default proxy, multiple URI-scheme-specific proxies, and a list of hosts that proxies should not be used for.

GSimpleProxyResolver is never the default proxy resolver, but it can be used as the base class for another proxy resolver implementation, or it can be created and used manually, such as with socketClientSetProxyResolver.

Since: 2.36

Synopsis

Exported types

newtype SimpleProxyResolver Source #

Memory-managed wrapper type.

Instances

Instances details
Eq SimpleProxyResolver Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

GObject SimpleProxyResolver Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

ManagedPtrNewtype SimpleProxyResolver Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

TypedObject SimpleProxyResolver Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

Methods

glibType :: IO GType #

HasParentTypes SimpleProxyResolver Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

HasAttributeList SimpleProxyResolver Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

(info ~ ResolveSimpleProxyResolverMethod t SimpleProxyResolver, OverloadedMethod info SimpleProxyResolver p, HasField t SimpleProxyResolver p) => HasField (t :: Symbol) SimpleProxyResolver (p :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

(info ~ ResolveSimpleProxyResolverMethod t SimpleProxyResolver, OverloadedMethodInfo info SimpleProxyResolver) => IsLabel t (MethodProxy info SimpleProxyResolver) Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

(info ~ ResolveSimpleProxyResolverMethod t SimpleProxyResolver, OverloadedMethod info SimpleProxyResolver p) => IsLabel t (SimpleProxyResolver -> p) Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

IsGValue (Maybe SimpleProxyResolver) Source #

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

Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttributeList SimpleProxyResolver Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type ParentTypes SimpleProxyResolver Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type SignalList SimpleProxyResolver Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

class (GObject o, IsDescendantOf SimpleProxyResolver o) => IsSimpleProxyResolver o Source #

Type class for types which can be safely cast to SimpleProxyResolver, for instance with toSimpleProxyResolver.

Instances

Instances details
(GObject o, IsDescendantOf SimpleProxyResolver o) => IsSimpleProxyResolver o Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

toSimpleProxyResolver :: (MonadIO m, IsSimpleProxyResolver o) => o -> m SimpleProxyResolver Source #

Cast to SimpleProxyResolver, for types for which this is known to be safe. For general casts, use castTo.

Methods

type family ResolveSimpleProxyResolverMethod (t :: Symbol) o where ... Source #

Equations

ResolveSimpleProxyResolverMethod "bindProperty" o = ObjectBindPropertyMethodInfo 
ResolveSimpleProxyResolverMethod "bindPropertyFull" o = ObjectBindPropertyFullMethodInfo 
ResolveSimpleProxyResolverMethod "forceFloating" o = ObjectForceFloatingMethodInfo 
ResolveSimpleProxyResolverMethod "freezeNotify" o = ObjectFreezeNotifyMethodInfo 
ResolveSimpleProxyResolverMethod "getv" o = ObjectGetvMethodInfo 
ResolveSimpleProxyResolverMethod "isFloating" o = ObjectIsFloatingMethodInfo 
ResolveSimpleProxyResolverMethod "isSupported" o = ProxyResolverIsSupportedMethodInfo 
ResolveSimpleProxyResolverMethod "lookup" o = ProxyResolverLookupMethodInfo 
ResolveSimpleProxyResolverMethod "lookupAsync" o = ProxyResolverLookupAsyncMethodInfo 
ResolveSimpleProxyResolverMethod "lookupFinish" o = ProxyResolverLookupFinishMethodInfo 
ResolveSimpleProxyResolverMethod "notify" o = ObjectNotifyMethodInfo 
ResolveSimpleProxyResolverMethod "notifyByPspec" o = ObjectNotifyByPspecMethodInfo 
ResolveSimpleProxyResolverMethod "ref" o = ObjectRefMethodInfo 
ResolveSimpleProxyResolverMethod "refSink" o = ObjectRefSinkMethodInfo 
ResolveSimpleProxyResolverMethod "runDispose" o = ObjectRunDisposeMethodInfo 
ResolveSimpleProxyResolverMethod "stealData" o = ObjectStealDataMethodInfo 
ResolveSimpleProxyResolverMethod "stealQdata" o = ObjectStealQdataMethodInfo 
ResolveSimpleProxyResolverMethod "thawNotify" o = ObjectThawNotifyMethodInfo 
ResolveSimpleProxyResolverMethod "unref" o = ObjectUnrefMethodInfo 
ResolveSimpleProxyResolverMethod "watchClosure" o = ObjectWatchClosureMethodInfo 
ResolveSimpleProxyResolverMethod "getData" o = ObjectGetDataMethodInfo 
ResolveSimpleProxyResolverMethod "getProperty" o = ObjectGetPropertyMethodInfo 
ResolveSimpleProxyResolverMethod "getQdata" o = ObjectGetQdataMethodInfo 
ResolveSimpleProxyResolverMethod "setData" o = ObjectSetDataMethodInfo 
ResolveSimpleProxyResolverMethod "setDataFull" o = ObjectSetDataFullMethodInfo 
ResolveSimpleProxyResolverMethod "setDefaultProxy" o = SimpleProxyResolverSetDefaultProxyMethodInfo 
ResolveSimpleProxyResolverMethod "setIgnoreHosts" o = SimpleProxyResolverSetIgnoreHostsMethodInfo 
ResolveSimpleProxyResolverMethod "setProperty" o = ObjectSetPropertyMethodInfo 
ResolveSimpleProxyResolverMethod "setUriProxy" o = SimpleProxyResolverSetUriProxyMethodInfo 
ResolveSimpleProxyResolverMethod l o = MethodResolutionFailed l o :: Type 

new

simpleProxyResolverNew Source #

Arguments

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

defaultProxy: the default proxy to use, eg "socks://192.168.1.1"

-> Maybe [Text]

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

-> m ProxyResolver

Returns: a new SimpleProxyResolver

Creates a new SimpleProxyResolver. See SimpleProxyResolver:defaultProxy and SimpleProxyResolver:ignoreHosts for more details on how the arguments are interpreted.

Since: 2.36

setDefaultProxy

simpleProxyResolverSetDefaultProxy Source #

Arguments

:: (HasCallStack, MonadIO m, IsSimpleProxyResolver a) 
=> a

resolver: a SimpleProxyResolver

-> Maybe Text

defaultProxy: the default proxy to use

-> m () 

Sets the default proxy on resolver, to be used for any URIs that don't match SimpleProxyResolver:ignoreHosts or a proxy set via simpleProxyResolverSetUriProxy.

If defaultProxy starts with "socks://", SimpleProxyResolver will treat it as referring to all three of the socks5, socks4a, and socks4 proxy types.

Since: 2.36

setIgnoreHosts

simpleProxyResolverSetIgnoreHosts Source #

Arguments

:: (HasCallStack, MonadIO m, IsSimpleProxyResolver a) 
=> a

resolver: a SimpleProxyResolver

-> [Text]

ignoreHosts: Nothing-terminated list of hosts/IP addresses to not use a proxy for

-> m () 

Sets the list of ignored hosts.

See SimpleProxyResolver:ignoreHosts for more details on how the ignoreHosts argument is interpreted.

Since: 2.36

setUriProxy

simpleProxyResolverSetUriProxy Source #

Arguments

:: (HasCallStack, MonadIO m, IsSimpleProxyResolver a) 
=> a

resolver: a SimpleProxyResolver

-> Text

uriScheme: the URI scheme to add a proxy for

-> Text

proxy: the proxy to use for uriScheme

-> m () 

Adds a URI-scheme-specific proxy to resolver; URIs whose scheme matches uriScheme (and which don't match SimpleProxyResolver:ignoreHosts) will be proxied via proxy.

As with SimpleProxyResolver:defaultProxy, if proxy starts with "socks://", SimpleProxyResolver will treat it as referring to all three of the socks5, socks4a, and socks4 proxy types.

Since: 2.36

Properties

defaultProxy

The default proxy URI that will be used for any URI that doesn't match SimpleProxyResolver:ignoreHosts, and doesn't match any of the schemes set with simpleProxyResolverSetUriProxy.

Note that as a special case, if this URI starts with "socks://", SimpleProxyResolver will treat it as referring to all three of the socks5, socks4a, and socks4 proxy types.

data SimpleProxyResolverDefaultProxyPropertyInfo Source #

Instances

Instances details
AttrInfo SimpleProxyResolverDefaultProxyPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

Associated Types

type AttrAllowedOps SimpleProxyResolverDefaultProxyPropertyInfo 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrBaseTypeConstraint SimpleProxyResolverDefaultProxyPropertyInfo 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrGetType SimpleProxyResolverDefaultProxyPropertyInfo 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrSetTypeConstraint SimpleProxyResolverDefaultProxyPropertyInfo 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrTransferTypeConstraint SimpleProxyResolverDefaultProxyPropertyInfo 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrTransferType SimpleProxyResolverDefaultProxyPropertyInfo 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrLabel SimpleProxyResolverDefaultProxyPropertyInfo 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrOrigin SimpleProxyResolverDefaultProxyPropertyInfo 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrAllowedOps SimpleProxyResolverDefaultProxyPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrBaseTypeConstraint SimpleProxyResolverDefaultProxyPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrGetType SimpleProxyResolverDefaultProxyPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrLabel SimpleProxyResolverDefaultProxyPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrOrigin SimpleProxyResolverDefaultProxyPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrSetTypeConstraint SimpleProxyResolverDefaultProxyPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrTransferType SimpleProxyResolverDefaultProxyPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrTransferTypeConstraint SimpleProxyResolverDefaultProxyPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

clearSimpleProxyResolverDefaultProxy :: (MonadIO m, IsSimpleProxyResolver o) => o -> m () Source #

Set the value of the “default-proxy” property to Nothing. When overloading is enabled, this is equivalent to

clear #defaultProxy

constructSimpleProxyResolverDefaultProxy :: (IsSimpleProxyResolver o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “default-proxy” property. This is rarely needed directly, but it is used by new.

getSimpleProxyResolverDefaultProxy :: (MonadIO m, IsSimpleProxyResolver o) => o -> m (Maybe Text) Source #

Get the value of the “default-proxy” property. When overloading is enabled, this is equivalent to

get simpleProxyResolver #defaultProxy

setSimpleProxyResolverDefaultProxy :: (MonadIO m, IsSimpleProxyResolver o) => o -> Text -> m () Source #

Set the value of the “default-proxy” property. When overloading is enabled, this is equivalent to

set simpleProxyResolver [ #defaultProxy := value ]

ignoreHosts

A list of hostnames and IP addresses that the resolver should allow direct connections to.

Entries can be in one of 4 formats:

  • A hostname, such as "example.com", ".example.com", or "*.example.com", any of which match "example.com" or any subdomain of it.
  • An IPv4 or IPv6 address, such as "192.168.1.1", which matches only that address.
  • 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"
  • An IP address range, given by a base address and prefix length, such as "fe80::/10", which matches any address in that range.

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 the :ignore-hosts list contains only "192.168.1.1", then a connection to "example.com" (eg, via a NetworkAddress) will use the proxy, and a connection to "192.168.1.1" (eg, via a InetSocketAddress) will not.

These rules match the "ignore-hosts"/"noproxy" rules most commonly used by other applications.

data SimpleProxyResolverIgnoreHostsPropertyInfo Source #

Instances

Instances details
AttrInfo SimpleProxyResolverIgnoreHostsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

Associated Types

type AttrAllowedOps SimpleProxyResolverIgnoreHostsPropertyInfo 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrBaseTypeConstraint SimpleProxyResolverIgnoreHostsPropertyInfo 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrGetType SimpleProxyResolverIgnoreHostsPropertyInfo 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrSetTypeConstraint SimpleProxyResolverIgnoreHostsPropertyInfo 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrTransferTypeConstraint SimpleProxyResolverIgnoreHostsPropertyInfo 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrTransferType SimpleProxyResolverIgnoreHostsPropertyInfo 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrLabel SimpleProxyResolverIgnoreHostsPropertyInfo 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrOrigin SimpleProxyResolverIgnoreHostsPropertyInfo 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrAllowedOps SimpleProxyResolverIgnoreHostsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrBaseTypeConstraint SimpleProxyResolverIgnoreHostsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrGetType SimpleProxyResolverIgnoreHostsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrLabel SimpleProxyResolverIgnoreHostsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrOrigin SimpleProxyResolverIgnoreHostsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrSetTypeConstraint SimpleProxyResolverIgnoreHostsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrTransferType SimpleProxyResolverIgnoreHostsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

type AttrTransferTypeConstraint SimpleProxyResolverIgnoreHostsPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.SimpleProxyResolver

constructSimpleProxyResolverIgnoreHosts :: (IsSimpleProxyResolver o, MonadIO m) => [Text] -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “ignore-hosts” property. This is rarely needed directly, but it is used by new.

getSimpleProxyResolverIgnoreHosts :: (MonadIO m, IsSimpleProxyResolver o) => o -> m (Maybe [Text]) Source #

Get the value of the “ignore-hosts” property. When overloading is enabled, this is equivalent to

get simpleProxyResolver #ignoreHosts

setSimpleProxyResolverIgnoreHosts :: (MonadIO m, IsSimpleProxyResolver o) => o -> [Text] -> m () Source #

Set the value of the “ignore-hosts” property. When overloading is enabled, this is equivalent to

set simpleProxyResolver [ #ignoreHosts := value ]