Constructor

GioProxyAddressnew

Declaration

GSocketAddress*
g_proxy_address_new (
  GInetAddress* inetaddr,
  guint16 port,
  const gchar* protocol,
  const gchar* dest_hostname,
  guint16 dest_port,
  const gchar* username,
  const gchar* password
)

Description

Creates a new GProxyAddress for inetaddr with protocol that should tunnel through dest_hostname and dest_port.

(Note that this method doesn’t set the GProxyAddress:uri or GProxyAddress:destination-protocol fields; use g_object_new() directly if you want to set those.)

Available since:2.26

Parameters

inetaddr GInetAddress
 

The proxy server GInetAddress.

 The data is owned by the caller of the function.
port guint16
 

The proxy server port.

protocol const gchar*
 

The proxy protocol to support, in lower case (e.g. socks, http).

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
dest_hostname const gchar*
 

The destination hostname the proxy should tunnel to.

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
dest_port guint16
 

The destination port to tunnel to.

username const gchar*
 

The username to authenticate to the proxy server (or NULL).

 The argument can be NULL.
 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
password const gchar*
 

The password to authenticate to the proxy server (or NULL).

 The argument can be NULL.
 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.

Return value

Returns: GSocketAddress
 

A new GProxyAddress.

 The caller of the function takes ownership of the data, and is responsible for freeing it.