:right-sidebar: True SimpleProxyResolver =================================================================== .. currentmodule:: gi.repository.Gio .. versionadded:: 2.36 .. class:: SimpleProxyResolver(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.ProxyResolver` ``GSimpleProxyResolver`` is a simple :obj:`~gi.repository.Gio.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 :obj:`~gi.repository.Gio.SocketClient.set_proxy_resolver`. Methods ------- .. rst-class:: interim-class .. class:: SimpleProxyResolver :no-index: .. method:: new(default_proxy: str | None = None, ignore_hosts: ~typing.Sequence[str] | None = None) -> ~gi.repository.Gio.ProxyResolver Creates a new :obj:`~gi.repository.Gio.SimpleProxyResolver`. See :obj:`~gi.repository.Gio.SimpleProxyResolver`:default-proxy and :obj:`~gi.repository.Gio.SimpleProxyResolver`:ignore-hosts for more details on how the arguments are interpreted. .. versionadded:: 2.36 :param default_proxy: the default proxy to use, eg "socks://192.168.1.1" :param ignore_hosts: an optional list of hosts/IP addresses to not use a proxy for. .. method:: set_default_proxy(default_proxy: str | None = None) -> None Sets the default proxy on ``resolver``, to be used for any URIs that don't match :obj:`~gi.repository.Gio.SimpleProxyResolver`:ignore-hosts or a proxy set via :func:`~gi.repository.Gio.SimpleProxyResolver.set_uri_proxy`. If ``default_proxy`` starts with "socks://", :obj:`~gi.repository.Gio.SimpleProxyResolver` will treat it as referring to all three of the socks5, socks4a, and socks4 proxy types. .. versionadded:: 2.36 :param default_proxy: the default proxy to use .. method:: set_ignore_hosts(ignore_hosts: ~typing.Sequence[str]) -> None Sets the list of ignored hosts. See :obj:`~gi.repository.Gio.SimpleProxyResolver`:ignore-hosts for more details on how the ``ignore_hosts`` argument is interpreted. .. versionadded:: 2.36 :param ignore_hosts: :const:`None`-terminated list of hosts/IP addresses to not use a proxy for .. method:: set_uri_proxy(uri_scheme: str, proxy: str) -> None Adds a URI-scheme-specific proxy to ``resolver``; URIs whose scheme matches ``uri_scheme`` (and which don't match :obj:`~gi.repository.Gio.SimpleProxyResolver`:ignore-hosts) will be proxied via ``proxy``. As with :obj:`~gi.repository.Gio.SimpleProxyResolver`:default-proxy, if ``proxy`` starts with "socks://", :obj:`~gi.repository.Gio.SimpleProxyResolver` will treat it as referring to all three of the socks5, socks4a, and socks4 proxy types. .. versionadded:: 2.36 :param uri_scheme: the URI scheme to add a proxy for :param proxy: the proxy to use for ``uri_scheme`` Properties ---------- .. rst-class:: interim-class .. class:: SimpleProxyResolver :no-index: .. attribute:: props.default_proxy :type: str The type of the None singleton. .. attribute:: props.ignore_hosts :type: ~typing.Sequence[str] The type of the None singleton. Fields ------ .. rst-class:: interim-class .. class:: SimpleProxyResolver :no-index: .. attribute:: parent_instance .. attribute:: priv