PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Using a proxy
  • How to check whether the proxy exists?
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Specifies whether the communication functions that use the HTTP protocol (HTTP, .Net, J2EE, SOAP and Google functions) must go via a proxy to run their requests. A proxy is used to share the access to Internet between the different network computers.
This function is taken into account during the next call to a function that is using the HTTP protocol.
Notes:
  • Proxy configures the access to Internet via a proxy for the entire application.
  • Versions 16 and later
    FTPProxy allows you to configure the use of a proxy for the FTP functions.
    New in version 16
    FTPProxy allows you to configure the use of a proxy for the FTP functions.
    FTPProxy allows you to configure the use of a proxy for the FTP functions.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Android Widget This function is now available in Android Widget mode.
Versions 23 and later
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 23
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Example
// Indicates that the next connections will go via a proxy
Proxy("192.168.0.1", 8080)

// Performs an HTTP request
sHTMLCode is string = HTTPRequest("http://www.windev.com")
Info("The HTML code is: " + sHTMLCode)

// Cancels the use of proxy
Proxy("")
Syntax

Defining the proxy Hide the details

Proxy(<Proxy Address> [, <Proxy Port> [, <Login> [, <Password>]]])
<Proxy Address>: Character string (with quotes)
Address of proxy in the following format:
  • IP address in XXX.XXX.XXX.XXX format (125.5.110.100 for example).
  • URL containing the name of the server (www.WINDEV.com for example). This syntax is recommended.
  • IP address returned by NetIPAddress.
<Proxy Port>: Optional integer
Port number of proxy.
This parameter is set to 80. if it is not specified
<Login>: Optional character string (with quotes)
Authentication beside the proxy.
No authentication is performed if this parameter corresponds to an empty string ("", default value).
<Password>: Optional character string (with quotes)
Password for authentication beside the proxy.
This parameter is ignored if <Login> corresponds to an empty string ("").

Canceling the use of proxy

Proxy("")
Remarks
WINDEVReports and QueriesAndroidAndroid Widget iPhone/iPadWindows MobileJavaPHPUser code (UMC)

Using a proxy

With Proxy, the end user will be able to configure the WINDEV or WINDEV Mobile application to use or not a proxy for the HTTP protocol. We advise you to implement a setting window in the WINDEV application to enter the address of the proxy if necessary.
Some proxies require a specific setting in Internet Explorer. In this case, the call to Proxy is not required: HTTPParameter (httpParameterMode constant) will allow you to go via Internet Explorer when sending HTTP requests.

How to check whether the proxy exists?

The following code is used to check whether the proxy exists via SocketConnect:
IF SocketConnect(lsSocketName, llSocketPort, lsSocketAddr) = False THEN
RESULT False
ELSE
SocketClose(lsSocketName)
END
Related Examples:
WD HTTP Proxy Complete examples (WINDEV): WD HTTP Proxy
[ + ] This WINDEV example is a simplified HTTP proxy.
You can save connections and find out which pages were viewed.
WD POP3Proxy Complete examples (WINDEV): WD POP3Proxy
[ + ] This example presents a POP3 proxy. A proxy is a program that connects to a server on behalf of another program.
A proxy can be used to isolate a local network from Internet for security reasons for example.
Only the computer hosting the proxy is linked to Internet and the users access the email server via the proxy.
In this example, the proxy is used to automatically archive the retrieved emails into a HFSQL database.
Several additional features can be used in this application: automatic filtering of spams, statistics about the emails...
Components
WINDEVWEBDEV - Server codeReports and Queries wd230com.dll
Windows Mobile wp230com.dll
Java wd230java.jar
Linux wd230com.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment