ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Sockets
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
SocketProxy (Function)
In french: SocketProxy
Specifies whether TCP sockets and WebSockets must go through a SOCKS5 proxy to execute requests.
AndroidAndroid Widget This function is only available for WebSockets.
Example
// Infos du proxy SOCKS5
SocketProxy("socks5://172.17.2.79",1080,"USER","PWD")

// Connexion au serveur en passant par le proxy
IF NOT SocketConnect("tcp_via_socks5", 4242, "172.19.5.80") THEN
	Error(ErrorInfo(errFullDetails))
ELSE
	// Opérations d'écriture et de lecture (comme d'habitude)
	Info("OK")
	SocketWrite("tcp_via_socks5", "écho")
	s is Buffer = SocketRead("tcp_via_socks5")
	Trace(BufferToHexa(s))
	SocketClose("tcp_via_socks5")
END

// Suppression du proxy pour les sockets
SocketProxy("")
Syntax

Defining the proxy Hide the details

SocketProxy(<Proxy address> [, <ProxyPort> [, <Username> [, <Password>]]])
<Proxy address>: Character string
SOCKS5 proxy address, in the following format:
socks5://<Proxy IP address>
<ProxyPort>: Optional integer
SOCKS5 proxy port number. This parameter is set to 1080 if it is not specified.
<Username>: Optional character string
Authentication through the FTP proxy. If this parameter is an empty string ("" by default), no authentication is performed.
<Password>: Optional string or Secret string
Password for authentication through the proxy. This parameter is ignored if <Username> is an empty string ("").
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "ANSI or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.

Removing a proxy

SocketProxy("")
Component: wd300com.dll
Minimum version required
  • Version 28
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/16/2025

Send a report | Local help