⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.10
Server IP:
157.245.101.34
Server:
Linux skvinfotech-website 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64
Server Software:
Apache/2.4.41 (Ubuntu)
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
doc
/
libglib2.0-doc
/
gio
/
View File Name :
GProxy.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>GProxy: GIO Reference Manual</title> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="index.html" title="GIO Reference Manual"> <link rel="up" href="networking.html" title="Low-level network support"> <link rel="prev" href="GUnixCredentialsMessage.html" title="GUnixCredentialsMessage"> <link rel="next" href="GProxyAddress.html" title="GProxyAddress"> <meta name="generator" content="GTK-Doc V1.32 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> <td width="100%" align="left" class="shortcuts"> <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> <a href="#GProxy.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> <a href="#GProxy.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_prerequisites"> <span class="dim">|</span> <a href="#GProxy.prerequisites" class="shortcut">Prerequisites</a></span> </td> <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> <td><a accesskey="u" href="networking.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> <td><a accesskey="p" href="GUnixCredentialsMessage.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> <td><a accesskey="n" href="GProxyAddress.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> </tr></table> <div class="refentry"> <a name="GProxy"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2><span class="refentrytitle"><a name="GProxy.top_of_page"></a>GProxy</span></h2> <p>GProxy — Interface for proxy handling</p> </td> <td class="gallery_image" valign="top" align="right"></td> </tr></table></div> <div class="refsect1"> <a name="GProxy.functions"></a><h2>Functions</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="functions_proto_type"> <col class="functions_proto_name"> </colgroup> <tbody> <tr> <td class="function_type"> <a class="link" href="GIOStream.html" title="GIOStream"><span class="returnvalue">GIOStream</span></a> * </td> <td class="function_name"> <a class="link" href="GProxy.html#g-proxy-connect" title="g_proxy_connect ()">g_proxy_connect</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GProxy.html#g-proxy-connect-async" title="g_proxy_connect_async ()">g_proxy_connect_async</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="GIOStream.html" title="GIOStream"><span class="returnvalue">GIOStream</span></a> * </td> <td class="function_name"> <a class="link" href="GProxy.html#g-proxy-connect-finish" title="g_proxy_connect_finish ()">g_proxy_connect_finish</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="GProxy.html" title="GProxy"><span class="returnvalue">GProxy</span></a> * </td> <td class="function_name"> <a class="link" href="GProxy.html#g-proxy-get-default-for-protocol" title="g_proxy_get_default_for_protocol ()">g_proxy_get_default_for_protocol</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="GProxy.html#g-proxy-supports-hostname" title="g_proxy_supports_hostname ()">g_proxy_supports_hostname</a> <span class="c_punctuation">()</span> </td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="GProxy.other"></a><h2>Types and Values</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="other_proto_type"> <col class="other_proto_name"> </colgroup> <tbody> <tr> <td class="datatype_keyword"> </td> <td class="function_name"><a class="link" href="GProxy.html#GProxy-struct" title="GProxy">GProxy</a></td> </tr> <tr> <td class="datatype_keyword">struct</td> <td class="function_name"><a class="link" href="GProxy.html#GProxyInterface" title="struct GProxyInterface">GProxyInterface</a></td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="GProxy.html#G-PROXY-EXTENSION-POINT-NAME:CAPS" title="G_PROXY_EXTENSION_POINT_NAME">G_PROXY_EXTENSION_POINT_NAME</a></td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="GProxy.object-hierarchy"></a><h2>Object Hierarchy</h2> <pre class="screen"> GInterface <span class="lineart">╰──</span> GProxy </pre> </div> <div class="refsect1"> <a name="GProxy.prerequisites"></a><h2>Prerequisites</h2> <p> GProxy requires GObject.</p> </div> <div class="refsect1"> <a name="GProxy.includes"></a><h2>Includes</h2> <pre class="synopsis">#include <gio/gio.h> </pre> </div> <div class="refsect1"> <a name="GProxy.description"></a><h2>Description</h2> <p>A <a class="link" href="GProxy.html" title="GProxy"><span class="type">GProxy</span></a> handles connecting to a remote host via a given type of proxy server. It is implemented by the 'gio-proxy' extension point. The extensions are named after their proxy protocol name. As an example, a SOCKS5 proxy implementation can be retrieved with the name 'socks5' using the function <a class="link" href="gio-Extension-Points.html#g-io-extension-point-get-extension-by-name" title="g_io_extension_point_get_extension_by_name ()"><code class="function">g_io_extension_point_get_extension_by_name()</code></a>.</p> </div> <div class="refsect1"> <a name="GProxy.functions_details"></a><h2>Functions</h2> <div class="refsect2"> <a name="g-proxy-connect"></a><h3>g_proxy_connect ()</h3> <pre class="programlisting"><a class="link" href="GIOStream.html" title="GIOStream"><span class="returnvalue">GIOStream</span></a> * g_proxy_connect (<em class="parameter"><code><a class="link" href="GProxy.html" title="GProxy"><span class="type">GProxy</span></a> *proxy</code></em>, <em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *connection</code></em>, <em class="parameter"><code><a class="link" href="GProxyAddress.html" title="GProxyAddress"><span class="type">GProxyAddress</span></a> *proxy_address</code></em>, <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>, <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> <p>Given <em class="parameter"><code>connection</code></em> to communicate with a proxy (eg, a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> that is connected to the proxy server), this does the necessary handshake to connect to <em class="parameter"><code>proxy_address</code></em> , and if required, wraps the <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> to handle proxy payload.</p> <div class="refsect3"> <a name="g-proxy-connect.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>proxy</p></td> <td class="parameter_description"><p>a <a class="link" href="GProxy.html" title="GProxy"><span class="type">GProxy</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>connection</p></td> <td class="parameter_description"><p>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>proxy_address</p></td> <td class="parameter_description"><p>a <a class="link" href="GProxyAddress.html" title="GProxyAddress"><span class="type">GProxyAddress</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>cancellable</p></td> <td class="parameter_description"><p>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>error</p></td> <td class="parameter_description"><p>return <span class="type">GError</span></p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-proxy-connect.returns"></a><h4>Returns</h4> <p>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> that will replace <em class="parameter"><code>connection</code></em> . This might be the same as <em class="parameter"><code>connection</code></em> , in which case a reference will be added. </p> <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-proxy-connect-async"></a><h3>g_proxy_connect_async ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_proxy_connect_async (<em class="parameter"><code><a class="link" href="GProxy.html" title="GProxy"><span class="type">GProxy</span></a> *proxy</code></em>, <em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *connection</code></em>, <em class="parameter"><code><a class="link" href="GProxyAddress.html" title="GProxyAddress"><span class="type">GProxyAddress</span></a> *proxy_address</code></em>, <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>, <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>, <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre> <p>Asynchronous version of <a class="link" href="GProxy.html#g-proxy-connect" title="g_proxy_connect ()"><code class="function">g_proxy_connect()</code></a>.</p> <div class="refsect3"> <a name="g-proxy-connect-async.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>proxy</p></td> <td class="parameter_description"><p>a <a class="link" href="GProxy.html" title="GProxy"><span class="type">GProxy</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>connection</p></td> <td class="parameter_description"><p>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>proxy_address</p></td> <td class="parameter_description"><p>a <a class="link" href="GProxyAddress.html" title="GProxyAddress"><span class="type">GProxyAddress</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>cancellable</p></td> <td class="parameter_description"><p>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>callback</p></td> <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>user_data</p></td> <td class="parameter_description"><p>callback data. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-proxy-connect-finish"></a><h3>g_proxy_connect_finish ()</h3> <pre class="programlisting"><a class="link" href="GIOStream.html" title="GIOStream"><span class="returnvalue">GIOStream</span></a> * g_proxy_connect_finish (<em class="parameter"><code><a class="link" href="GProxy.html" title="GProxy"><span class="type">GProxy</span></a> *proxy</code></em>, <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>, <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> <p>See <a class="link" href="GProxy.html#g-proxy-connect" title="g_proxy_connect ()"><code class="function">g_proxy_connect()</code></a>.</p> <div class="refsect3"> <a name="g-proxy-connect-finish.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>proxy</p></td> <td class="parameter_description"><p>a <a class="link" href="GProxy.html" title="GProxy"><span class="type">GProxy</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>result</p></td> <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>error</p></td> <td class="parameter_description"><p>return <span class="type">GError</span></p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-proxy-connect-finish.returns"></a><h4>Returns</h4> <p>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a>. </p> <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-proxy-get-default-for-protocol"></a><h3>g_proxy_get_default_for_protocol ()</h3> <pre class="programlisting"><a class="link" href="GProxy.html" title="GProxy"><span class="returnvalue">GProxy</span></a> * g_proxy_get_default_for_protocol (<em class="parameter"><code>const <span class="type">gchar</span> *protocol</code></em>);</pre> <p>Find the <code class="literal">gio-proxy</code> extension point for a proxy implementation that supports the specified protocol.</p> <div class="refsect3"> <a name="g-proxy-get-default-for-protocol.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>protocol</p></td> <td class="parameter_description"><p>the proxy protocol name (e.g. http, socks, etc)</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="g-proxy-get-default-for-protocol.returns"></a><h4>Returns</h4> <p>return a <a class="link" href="GProxy.html" title="GProxy"><span class="type">GProxy</span></a> or NULL if protocol is not supported. </p> <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-proxy-supports-hostname"></a><h3>g_proxy_supports_hostname ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_proxy_supports_hostname (<em class="parameter"><code><a class="link" href="GProxy.html" title="GProxy"><span class="type">GProxy</span></a> *proxy</code></em>);</pre> <p>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 <code class="literal">FALSE</code> if <em class="parameter"><code>proxy</code></em> is implementing such a protocol. When <code class="literal">FALSE</code> is returned, the caller should resolve the destination hostname first, and then pass a <a class="link" href="GProxyAddress.html" title="GProxyAddress"><span class="type">GProxyAddress</span></a> containing the stringified IP address to <a class="link" href="GProxy.html#g-proxy-connect" title="g_proxy_connect ()"><code class="function">g_proxy_connect()</code></a> or <a class="link" href="GProxy.html#g-proxy-connect-async" title="g_proxy_connect_async ()"><code class="function">g_proxy_connect_async()</code></a>.</p> <div class="refsect3"> <a name="g-proxy-supports-hostname.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>proxy</p></td> <td class="parameter_description"><p>a <a class="link" href="GProxy.html" title="GProxy"><span class="type">GProxy</span></a></p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="g-proxy-supports-hostname.returns"></a><h4>Returns</h4> <p> <code class="literal">TRUE</code> if hostname resolution is supported.</p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> </div> <div class="refsect1"> <a name="GProxy.other_details"></a><h2>Types and Values</h2> <div class="refsect2"> <a name="GProxy-struct"></a><h3>GProxy</h3> <pre class="programlisting">typedef struct _GProxy GProxy;</pre> <p>Interface that handles proxy connection and payload.</p> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="GProxyInterface"></a><h3>struct GProxyInterface</h3> <pre class="programlisting">struct GProxyInterface { GTypeInterface g_iface; /* Virtual Table */ GIOStream * (* connect) (GProxy *proxy, GIOStream *connection, GProxyAddress *proxy_address, GCancellable *cancellable, GError **error); void (* connect_async) (GProxy *proxy, GIOStream *connection, GProxyAddress *proxy_address, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); GIOStream * (* connect_finish) (GProxy *proxy, GAsyncResult *result, GError **error); gboolean (* supports_hostname) (GProxy *proxy); }; </pre> <p>Provides an interface for handling proxy connection and payload.</p> <div class="refsect3"> <a name="GProxyInterface.members"></a><h4>Members</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="300px" class="struct_members_name"> <col class="struct_members_description"> <col width="200px" class="struct_members_annotations"> </colgroup> <tbody> <tr> <td class="struct_member_name"><p><em class="structfield"><code><a name="GProxyInterface.connect"></a>connect</code></em> ()</p></td> <td class="struct_member_description"><p>Connect to proxy server and wrap (if required) the <span class="type">connection</span> to handle payload.</p></td> <td class="struct_member_annotations"> </td> </tr> <tr> <td class="struct_member_name"><p><em class="structfield"><code><a name="GProxyInterface.connect-async"></a>connect_async</code></em> ()</p></td> <td class="struct_member_description"><p>Same as <code class="function">connect()</code> but asynchronous.</p></td> <td class="struct_member_annotations"> </td> </tr> <tr> <td class="struct_member_name"><p><em class="structfield"><code><a name="GProxyInterface.connect-finish"></a>connect_finish</code></em> ()</p></td> <td class="struct_member_description"><p>Returns the result of <code class="function">connect_async()</code></p></td> <td class="struct_member_annotations"> </td> </tr> <tr> <td class="struct_member_name"><p><em class="structfield"><code><a name="GProxyInterface.supports-hostname"></a>supports_hostname</code></em> ()</p></td> <td class="struct_member_description"><p>Returns whether the proxy supports hostname lookups.</p></td> <td class="struct_member_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="G-PROXY-EXTENSION-POINT-NAME:CAPS"></a><h3>G_PROXY_EXTENSION_POINT_NAME</h3> <pre class="programlisting">#define G_PROXY_EXTENSION_POINT_NAME "gio-proxy" </pre> <p>Extension point for proxy functionality. See Extending GIO.</p> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> </div> </div> <div class="footer"> <hr>Generated by GTK-Doc V1.32</div> </body> </html>