How to configure proxy for your app

You can configure your application to use a proxy server for connecting to the Internet instead of connecting directly.

Info

The following proxy server instructions apply only to the Chromium rendering engine, not to PHP.

Place the following code in the UserMain HEScript script: procedure OnStartMainWindow; begin // This code runs just before the homepage is shown, as the main window is about to be displayed. SetUIProp("crm", "ProxyServer", """122.133.144.155"""); SetUIProp("crm", "ProxyUsername", """user"""); SetUIProp("crm", "ProxyPassword", """pass"""); SetUIProp("crm", "ProxyPort", "3456"); SetUIProp("crm", "ProxyType", "3");
SetUIProp("crm", "ProxyScheme", "0"); NavigateCommand(13); // Update preferences end;
```

Warning

Triple quotes are required for the ProxyServer, ProxyUsername, and ProxyPassword fields.

  • ProxyScheme:
  • 0 (HTTP)
  • 1 (SOCKS4)
  • 2 (SOCKS5)
  • ProxyType:
  • 0 (direct, no proxy)
  • 1 (auto-detect)
  • 2 (system-defined)
  • 3 (fixed servers)
  • 4 (pac script)

For a PAC script, you must also specify the script URL with ProxyScriptURL.