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

By default JxBrowser uses system proxy settings.

System Proxy


JxBrowser uses the same settings that Microsoft Internet Explorer uses.


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


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


If you do not want to use the system proxy settings, you can configure each Profile with its own proxy settings.

To configure proxy settings use the Proxy:

Proxy proxy = profile.proxy();

If you use the Engine.proxy() method you get the Proxy instance associated with the default profile.

If you want to tell the library to use the system proxy settings again, call:


Proxy settings are stored in the User Data directory. So, if you configure Engine to use specific User Data directory, then the Engine will remember the proxy settings and restore them the next time you create it.


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


Auto Detect

With this proxy configuration the connection automatically detects proxy settings:


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.


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

String proxyRules = "http=foo:80;https=foo:80;ftp=foo:80;socks=foo:80";
String exceptions = "<local>";  // bypass proxy server for local web pages
proxy.config(CustomProxyConfig.newInstance(proxyRules, exceptions));

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> ]


  • [ SCHEME "://" ] IP_LITERAL [ ":" PORT ]



  • "<local>". Match local addresses. <local> means that the host matches one of:, ::1, localhost.

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


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:


URL to the PAC file must be a valid http:// address. 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, On a web server the pac file must be served with the application/x-ns-proxy-autoconfig mime type.


JxBrowser supports proxy authentication. Please see Authentication.

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

Go Top