:right-sidebar: True ProxyAddress =================================================================== .. currentmodule:: gi.repository.Gio .. versionadded:: 2.26 .. class:: ProxyAddress(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gio.InetSocketAddress`, :class:`~gi.repository.Gio.SocketAddress`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.SocketConnectable` A :obj:`~gi.repository.Gio.InetSocketAddress` representing a connection via a proxy server. Constructors ------------ .. rst-class:: interim-class .. class:: ProxyAddress :no-index: .. classmethod:: new(inetaddr: ~gi.repository.Gio.InetAddress, port: int, protocol: str, dest_hostname: str, dest_port: int, username: str | None = None, password: str | None = None) -> ~gi.repository.Gio.SocketAddress Creates a new :obj:`~gi.repository.Gio.ProxyAddress` for ``inetaddr`` with ``protocol`` that should tunnel through ``dest_hostname`` and ``dest_port``\. (Note that this method doesn't set the :obj:`~gi.repository.Gio.ProxyAddress`\:uri or :obj:`~gi.repository.Gio.ProxyAddress`\:destination-protocol fields; use :func:`~gi.repository.GObject.GObject.Object.new` directly if you want to set those.) .. versionadded:: 2.26 :param inetaddr: The proxy server :obj:`~gi.repository.Gio.InetAddress`\. :param port: The proxy server port. :param protocol: The proxy protocol to support, in lower case (e.g. socks, http). :param dest_hostname: The destination hostname the proxy should tunnel to. :param dest_port: The destination port to tunnel to. :param username: The username to authenticate to the proxy server (or :const:`None`). :param password: The password to authenticate to the proxy server (or :const:`None`). Methods ------- .. rst-class:: interim-class .. class:: ProxyAddress :no-index: .. method:: get_destination_hostname() -> str Gets ``proxy``\'s destination hostname; that is, the name of the host that will be connected to via the proxy, not the name of the proxy itself. .. versionadded:: 2.26 .. method:: get_destination_port() -> int Gets ``proxy``\'s destination port; that is, the port on the destination host that will be connected to via the proxy, not the port number of the proxy itself. .. versionadded:: 2.26 .. method:: get_destination_protocol() -> str Gets the protocol that is being spoken to the destination server; eg, "http" or "ftp". .. versionadded:: 2.34 .. method:: get_password() -> str | None Gets ``proxy``\'s password. .. versionadded:: 2.26 .. method:: get_protocol() -> str Gets ``proxy``\'s protocol. eg, "socks" or "http" .. versionadded:: 2.26 .. method:: get_uri() -> str | None Gets the proxy URI that ``proxy`` was constructed from. .. versionadded:: 2.34 .. method:: get_username() -> str | None Gets ``proxy``\'s username. .. versionadded:: 2.26 Properties ---------- .. rst-class:: interim-class .. class:: ProxyAddress :no-index: .. attribute:: props.destination_hostname :type: str The type of the None singleton. .. versionadded:: 2.26 .. attribute:: props.destination_port :type: int The type of the None singleton. .. versionadded:: 2.26 .. attribute:: props.destination_protocol :type: str The type of the None singleton. .. versionadded:: 2.34 .. attribute:: props.password :type: str The type of the None singleton. .. versionadded:: 2.26 .. attribute:: props.protocol :type: str The type of the None singleton. .. versionadded:: 2.26 .. attribute:: props.uri :type: str The type of the None singleton. .. versionadded:: 2.34 .. attribute:: props.username :type: str The type of the None singleton. .. versionadded:: 2.26 Fields ------ .. rst-class:: interim-class .. class:: ProxyAddress :no-index: .. attribute:: parent_instance .. attribute:: priv