NetworkProxyInterface Class Reference

#include <network_proxy.h>

Detailed Description

This interface allows handle proxy settings of the os for internet connection.

Static Public Member Functions

static MAXON_METHOD Result< BaseArray< String > > DetectProxiesForUrl (const Url &url)
 
static MAXON_METHOD void FlushProxyCache ()
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL (NetworkProxyInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.networkproxy")
 

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( NetworkProxyInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.interface.networkproxy"   
)
private

◆ DetectProxiesForUrl()

static MAXON_METHOD Result<BaseArray<String> > DetectProxiesForUrl ( const Url url)
static

Determines the right proxy for the given urls scheme and authority/server.

Windows: At the moment we support the following windows proxy setups. Network Settings/Internet Options/Connections/LAN Settings you can find the proxy settings for windows/internet explorer.

  1. "Automatic detect settings" - retrieves the proxy settings via dhcp in form of a pac file. this file will be used to find the best fitting proxies.
  2. "Use automatic configuration script" - loads a pac file from a given url and uses this file to find the best fitting proxies.
  3. "Use a proxy server ..." - if 1 and 2 fails or is not available the function uses the manual settings for each kind of scheme. A nice article can be found here: "http://blogs.msdn.com/b/ieinternals/archive/2013/10/11/web-proxy-configuration-and-ie11-changes.aspx".

OSX: At the moment we support the following OSX proxy setups. System Preferences/Network/Additional Options/Proxies:

  1. "Automatic Proxy Detection" - retrieves the proxy settings via dhcp in form of a pac file. this file will be used to find the best fitting proxies.
  2. "Automatic Proxy Configuration" - uses the given .pac file for the proxy settings to find the best fitting proxies.
  3. "HTTP, HTTPS, FTP, SOCKS" - uses the manual proxy settings to detect the best proxy.
Parameters
[in]urlUrl to be used to determine the right proxy servers for this connection.
Returns
Returns the proxies in the order of the access. The best suited is the first. If the string is equal to PROXY_DIRECT then no proxy must be used and a direct connection can be used instead. The function returns at least one entry (e.g. PROXY_DIRECT).

◆ FlushProxyCache()

static MAXON_METHOD void FlushProxyCache ( )
static

Resets all cached proxy configuration files. This function can be called if network changes are not detected correctly.