Gio.ProxyAddress¶
class — extends InetSocketAddress, SocketConnectable
A InetSocketAddress representing a connection via a proxy server.
Constructors¶
new¶
@classmethod
def new(cls, inetaddr: InetAddress, port: int, protocol: str, dest_hostname: str, dest_port: int, username: str | None = ..., password: str | None = ...) -> SocketAddress
Creates a new ProxyAddress for inetaddr with protocol that should
tunnel through dest_hostname and dest_port.
(Note that this method doesn't set the ProxyAddress:uri or
ProxyAddress:destination-protocol fields; use g_object_new()
directly if you want to set those.)
Parameters:
inetaddr— The proxy serverInetAddress.port— The proxy server port.protocol— The proxy protocol to support, in lower case (e.g. socks, http).dest_hostname— The destination hostname the proxy should tunnel to.dest_port— The destination port to tunnel to.username— The username to authenticate to the proxy server (orNone).password— The password to authenticate to the proxy server (orNone).
Methods¶
get_destination_hostname¶
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.
get_destination_port¶
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.
get_destination_protocol¶
Gets the protocol that is being spoken to the destination server; eg, "http" or "ftp".
get_password¶
Gets proxy's password.
get_protocol¶
Gets proxy's protocol. eg, "socks" or "http"
get_uri¶
Gets the proxy URI that proxy was constructed from.
get_username¶
Gets proxy's username.
Properties¶
destination_hostname¶
The proxy destination hostname.
destination_port¶
The proxy destination port.
destination_protocol¶
The protocol being spoke to the destination host, or None if
the ProxyAddress doesn't know.
password¶
The proxy password.
protocol¶
The proxy protocol.
uri¶
The URI string that the proxy was constructed from (or None
if the creator didn't specify this).
username¶
The proxy username.