Gio.ProxyAddress - Classes - Gio 2.0 (original) (raw)
g GObject.GInterface GObject.GInterface Gio.SocketConnectable Gio.SocketConnectable GObject.GInterface->Gio.SocketConnectable GObject.Object GObject.Object Gio.SocketAddress Gio.SocketAddress GObject.Object->Gio.SocketAddress Gio.InetSocketAddress Gio.InetSocketAddress Gio.ProxyAddress Gio.ProxyAddress Gio.InetSocketAddress->Gio.ProxyAddress Gio.SocketAddress->Gio.InetSocketAddress Gio.SocketConnectable->Gio.SocketAddress
Subclasses:
None
Methods¶
Inherited:
Gio.InetSocketAddress (6), Gio.SocketAddress (4), GObject.Object (37), Gio.SocketConnectable (3)
Structs:
class | new (inetaddr, port, protocol, dest_hostname, dest_port, username, password) |
---|---|
get_destination_hostname () | |
get_destination_port () | |
get_destination_protocol () | |
get_password () | |
get_protocol () | |
get_uri () | |
get_username () |
Virtual Methods¶
Inherited:
Gio.SocketAddress (3), GObject.Object (7), Gio.SocketConnectable (3)
Properties¶
Inherited:
Gio.InetSocketAddress (4), Gio.SocketAddress (1)
Name | Type | Flags | Short Description |
---|---|---|---|
destination-hostname | str | r/w/co | |
destination-port | int | r/w/co | |
destination-protocol | str | r/w/co | |
password | str | r/w/co | |
protocol | str | r/w/co | |
uri | str | r/w/co | |
username | str | r/w/co |
Signals¶
Inherited:
Fields¶
Inherited:
Name | Type | Access | Description |
---|---|---|---|
parent_instance | Gio.InetSocketAddress | r |
Class Details¶
class Gio.ProxyAddress(**kwargs)¶
Bases:
Abstract:
No
Structure:
A [class`Gio`.InetSocketAddress] representing a connection via a proxy server.
New in version 2.26.
classmethod new(inetaddr, port, protocol, dest_hostname, dest_port, username, password)[source]¶
Parameters:
- inetaddr (Gio.InetAddress) – The proxy server Gio.InetAddress.
- port (int) – The proxy server port.
- protocol (str) – The proxy protocol to support, in lower case (e.g. socks, http).
- dest_hostname (str) – The destination hostname the proxy should tunnel to.
- dest_port (int) – The destination port to tunnel to.
- username (str or None) – The username to authenticate to the proxy server (or None).
- password (str or None) – The password to authenticate to the proxy server (or None).
Returns:
a new Gio.ProxyAddress
Return type:
Creates a new Gio.ProxyAddress for inetaddr with protocol that should tunnel through dest_hostname and dest_port.
(Note that this method doesn’t set the Gio.ProxyAddress :uri orGio.ProxyAddress :destination-protocol fields; use g_object_new() directly if you want to set those.)
New in version 2.26.
get_destination_hostname()[source]¶
Returns:
the self's destination hostname
Return type:
Gets self'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.
New in version 2.26.
get_destination_port()[source]¶
Returns:
the self's destination port
Return type:
Gets self'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.
New in version 2.26.
get_destination_protocol()[source]¶
Returns:
the self's destination protocol
Return type:
Gets the protocol that is being spoken to the destination server; eg, “http” or “ftp”.
New in version 2.34.
Returns:
the self's password
Return type:
Gets self's password.
New in version 2.26.
Returns:
the self's protocol
Return type:
Gets self's protocol. eg, “socks” or “http”
New in version 2.26.
Returns:
the self's URI, or None if unknown
Return type:
Gets the proxy URI that self was constructed from.
New in version 2.34.
Returns:
the self's username
Return type:
Gets self's username.
New in version 2.26.
Property Details¶
Gio.ProxyAddress.props.destination_hostname¶
Name:
destination-hostname
Type:
Default Value:
Flags:
READABLE, WRITABLE, CONSTRUCT_ONLY
The proxy destination hostname.
New in version 2.26.
Gio.ProxyAddress.props.destination_port¶
Name:
destination-port
Type:
Default Value:
0
Flags:
READABLE, WRITABLE, CONSTRUCT_ONLY
The proxy destination port.
New in version 2.26.
Gio.ProxyAddress.props.destination_protocol¶
Name:
destination-protocol
Type:
Default Value:
Flags:
READABLE, WRITABLE, CONSTRUCT_ONLY
The protocol being spoke to the destination host, or None if the Gio.ProxyAddress doesn’t know.
New in version 2.34.
Gio.ProxyAddress.props.password¶
Name:
password
Type:
Default Value:
Flags:
READABLE, WRITABLE, CONSTRUCT_ONLY
The proxy password.
New in version 2.26.
Gio.ProxyAddress.props.protocol¶
Name:
protocol
Type:
Default Value:
Flags:
READABLE, WRITABLE, CONSTRUCT_ONLY
The proxy protocol.
New in version 2.26.
Gio.ProxyAddress.props.uri¶
Name:
uri
Type:
Default Value:
Flags:
READABLE, WRITABLE, CONSTRUCT_ONLY
The URI string that the proxy was constructed from (or Noneif the creator didn’t specify this).
New in version 2.34.
Gio.ProxyAddress.props.username¶
Name:
username
Type:
Default Value:
Flags:
READABLE, WRITABLE, CONSTRUCT_ONLY
The proxy username.
New in version 2.26.