WebGetProxy Function

Action

Gets the current proxy host name and port number either for all protocols or for a specific protocol. If this function is called to retrieve all proxies set up, it returns a list like

http=http://www-proxy.austria.eu.net:8080
ftp=ftp://ftp-proxy.austria.eu.net:2121
注: Only default proxies are returned. Proxies that have been set with a domain specification are not returned.

Include file

WebAPI.bdh

Syntax

WebGetProxy( out sProxy     :string,
             in  nMaxLen    : number optional,
             in  nProxyType : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
sProxy A string buffer that will receive the list of default proxies.
nMaxLen The maximum length of the receive buffer sProxy (optional).
nProxyType

Type of proxy settings to retrieve (optional). Can be one of the following protocols:

  • WEB_PROXY_FTP

  • WEB_PROXY_HTTP

  • WEB_PROXY_HTTPS

  • WEB_PROXY_SOCKS

If this parameter is omitted, this function returns a list containing all proxies currently set up.

Example

dcltrans
  transaction TInit
  var
    sProxy: string;
  begin
    WebGetProxy(sProxy);
    write("Proxies: "); write(sProxy); writeln;
  end TInit;