Google-chrome – What exactly does “Detecting proxy script” mean? What is a proxy script? How is it being detected


I see this in the bottom left of Chrome when browsing to a website. Often when first browsing after connecting to a new network.

My questions:

  • What exactly is a Proxy Script?
  • What is Chrome doing in order to detect it?

Best Answer

In a Microsoft environment:

Automatic proxy detection is a process by which a Web proxy server is identified by the system and used to send requests on behalf of the client. This feature is also known as Web Proxy Auto-Discovery (WPAD). When automatic proxy detection is enabled, the system attempts to locate a proxy configuration script that is responsible for returning the set of proxies that can be used for the request. If the proxy configuration script is found, the script is downloaded, compiled, and run on the local computer when proxy information, the request stream, or the response is obtained for a request that uses a WebProxy instance.

Automatic proxy detection is performed by the WebProxy class and can employ request-level settings, settings in configuration files, and settings specified using the Internet Explorer Local Area Network (LAN) dialog box.

When automatic proxy detection is enabled, the WebProxy class attempts to locate the proxy configuration script as follows:

  1. The WinINet InternetQueryOption function is used to locate the proxy configuration script most recently detected by Internet Explorer.
  2. If the script is not located, the WebProxy class uses the Dynamic Host Configuration Protocol (DHCP) to locate the script. The DHCP server can respond either with the location (host name) of the script or with the full URL for the script.
  3. If DHCP does not identify the WPAD host, DNS is queried for a host with WPAD as its name or alias.
  4. If the host is not identified and the location of a proxy configuration script is specified by the Internet Explorer LAN settings or a configuration file, this location is used.

Proxies are configured on a per-connectoid basis. A connectoid is an item in the network connection dialog, and can be a physical network device (a modem or Ethernet card) or a virtual interface (such as a VPN connection running over a network device). When a connectoid changes (for example, a wireless connection changes an access point, or a VPN is enabled), the proxy detection algorithm is run again.

By default, the browser proxy settings are used to detect the proxy. If your application is running under a non-interactive account (without a convenient way to configure proxy settings), or if you want to use proxy settings different than the IE settings, you can configure your proxy by creating a configuration file with the Element (Network Settings) and Element (Network Settings) elements defined.