an_set_proxy_url - set the location and type of the proxy server
#include <antinat.h>
int an_set_proxy_url(ANCONN s, const char * proxy_url);
The an_set_proxy_url(3) function is used to specify the proxy server to use and the type of that proxy server. This is a simplified interface; for full control over the proxy specification, use the an_set_proxy(3) function.
Proxy URLs are formed as follows: a proxy type, which can be one of: socks4, socks5, or https; followed by the '://' string (without quotes.) Following that is the fully qualified hostname, and optionally, a colon (':') and port number. If not specified, the default port number is 1080. The default values used when a socket is created are determined by the AN_PROXY environment variable.
s is a socket previously created with an_new_connection(3).
url is a NULL-terminated character array specifying the proxy url, described above. An example of this url could be socks4://socks.mycompany.com:10080.
This call returns AN_ERROR_SUCCESS to indicate successful completion.
an_new_connection(3), an_set_proxy(3), an_unset_proxy(3)
Malcolm Smith <malxau@users.sourceforge.net>