Gio.Proxy.prototype.supports_hostname
function supports_hostname(): Boolean { // Gjs wrapper for g_proxy_supports_hostname() }
Some proxy protocols expect to be passed a hostname, which they will resolve to an IP address themselves. Others, like SOCKS4, do not allow this. This function will return false if proxy is implementing such a protocol. When false is returned, the caller should resolve the destination hostname first, and then pass a Gio.ProxyAddress containing the stringified IP address to Gio.Proxy.prototype.connect or Gio.Proxy.prototype.connect_async.
Since 2.26
- Returns
true if hostname resolution is supported.