_networkSetProxy
Define a customized proxy. By default, when the ObjNetwork is created, the
defined proxy in the Scol settings (if defined !) is set. This function allows
you to set differents parameters.
Prototype :
fun [ObjNetwork S I I I S S] I
- ObjNetwork : a network object created with _networkCreate.
- S : an host name or a dotted IP address (IPv4 or IPv6). It can specify a
port number in this string :
address:[port]
. To disable a
customized proxy, set it to nil : the default Scol proxy (if defined
in the Scol settings) will be set again.
- I : a port, between 1024 and 65356 (both excluded). If the port is given in
the adress above or if you want to set by the default value (1080), you could
set this to nil.
- I : the type of the proxy :
- NETWORK_PROXY_TYPE_HTTP : use http 1.1 (default value)
- NETWORK_PROXY_TYPE_SOCK4 : sock version 4
- NETWORK_PROXY_TYPE_SOCK5 : sock version 5
- NETWORK_PROXY_TYPE_SOCK4A : sock version 4A
- NETWORK_PROXY_TYPE_SOCK5HOSTNAME : use the SOCKS5 protocol but pass
the host name rather than the IP address.
- others : same thing than NETWORK_PROXY_TYPE_HTTP
- I : mode of the authentification. Can be one or combination of these flags :
- NETWORK_AUTH_BASIC : HTTP Basic authentication. This is the default
choice, and the only method that is in wide-spread use and supported virtually
everywhere. This sends the user name and password over the network in
plain text, easily captured by others.
- NETWORK_AUTH_DIGEST : HTTP Digest authentication. Digest authentication
is defined in RFC 2617 and is a more secure way to do authentication over
public networks than the regular old-fashioned Basic method.
- NETWORK_AUTH_NTLM : HTTP NTLM authentication. A proprietary protocol
invented and used by Microsoft. It uses a challenge-response and hash
concept similar to Digest, to prevent the password from being eavesdropped.
- S : the login / user name for the proxy
- S : the password associated to the user name above.
Return : I 0 if ok or an error code number or nil if another
error (in this last case, typically a bad argument).
See also :
networkSetOption
Example :
Note :