Contents

Proxy

This document describes how proxy functionality works in Molybden. Here you can find how to configure proxy settings and handle proxy authentication requests.

By default Molybden, uses system proxy settings.

System proxy

Windows

Molybden uses the same settings that Microsoft Edge uses.

macOS

Molybden uses the proxy settings listed under the Network Control Panel. These are the same settings as Safari uses.

Linux

Molybden uses either GNOME/KDE proxy settings, or will use certain environment variables. When you modify Molybden proxy settings you do not modify the system global proxy settings.

Configurations

You can configure each Profile with its own proxy settings.

To configure proxy settings use the Proxy:

auto proxy = profile->proxy();

Proxy settings are stored in the user data directory directory.

Direct

With this proxy configuration, the connection will not use proxy server at all:

auto config = DirectProxyConfig::create();
proxy->setConfig(config);

Auto detect

With this proxy configuration the connection automatically detects proxy settings:

auto config = AutoDetectProxyConfig::create();
proxy->setConfig(config);

Automatic proxy detection is a process by which a web proxy server is identified by the system. 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 (wpad.dat or proxy.pac) that is responsible for returning the set of proxies. If the proxy configuration script is found, the script is downloaded, compiled, and run on the local computer.

Custom

With this proxy configuration you can provide custom proxy settings for HTTP, HTTPS, and FTP protocols:

auto rules = "http=foo:80;https=foo:80;ftp=foo:80;socks=foo:80";
auto exceptions = "<local>";  // Bypass proxy server for local web pages.

auto config = CustomProxyConfig::create(rules, exceptions);
proxy->setConfig(config);

Examples of the proxy rules:

  • http=foopy:80;ftp=foopy2 means use HTTP proxy foopy:80 for http:// URLs, and HTTP proxy foopy2:80 for
    ftp:// URLs.
  • foopy:80 means use HTTP proxy foopy:80 for all URLs.
  • socks4://foopy means use SOCKS v4 proxy foopy:1080 for all URLs.

The format of the exceptions can be any of the following:

  • [ URL_SCHEME "://" ] HOSTNAME_PATTERN [ ":" <port> ]

    Examples:

      foobar.com
      *foobar.com
      *.foobar.com
      *foobar.com:99
      https://x.*.y.com:99
    
  • "." HOSTNAME_SUFFIX_PATTERN [ ":" PORT ]

    Examples:

      .google.com
      .com
      http://.google.com
    
  • [ SCHEME "://" ] IP_LITERAL [ ":" PORT ]

    Examples:

      127.0.1
      [0:0::1]
      [::1]
      http://[::1]:99
    
  • IP_LITERAL "/" PREFIX_LENGHT_IN_BITS.

    Examples:

      192.168.1.1/16
      fefe:13::abc/33
    
  • "<local>". Match local addresses. <local> means that the host matches one of: 127.0.0.1, ::1, localhost.

If you need to provide several exception rules, you can separate them using comma: *foobar.com,.google.com,<local>.

PAC

With this proxy configuration the connection uses the proxy settings received from the proxy auto-config (PAC) file. You must provide a valid URL of the required PAC file:

auto config = PacProxyConfig::create("<pac-file-url>");
proxy->setConfig(config);

URL to the PAC file must be an HTTP URL. You cannot provide a path to a *.pac file stored on local file system. The name of the PAC file must have the pac extension. For example, https://my-site.com/proxy.pac. On a web server, the PAC file must be served with the application/x-ns-proxy-autoconfig mime type.

Authentication

Molybden supports proxy authentication. See Authentication.

Chromium does not support password-based authentication for SOCKS proxies.

On this page
Top