# Module selenium-webdriver/proxy

code »

Defines functions for configuring a webdriver proxy:

     var webdriver = require('selenium-webdriver'),
         proxy = require('selenium-webdriver/proxy');

     var driver = new webdriver.Builder()
         .withCapabilities(webdriver.Capabilities.chrome())
         .setProxy(proxy.manual({http: 'host:1234'}))
         .build();

Show:Public Protected Private

## Type Definitions

code »ProxyConfig : `({proxyType: string}|{proxyType: string, proxyAutoconfigUrl: string}|{proxyType: string, ftpProxy: string, httpProxy: string, sslProxy: string, noProxy: string})`
Proxy configuration object, as defined by the WebDriver wire protocol.

## Functions

code »direct ( ) ⇒ `!ProxyConfig`

Configures WebDriver to bypass all browser proxies.

Returns
A new proxy configuration object.

code »manual ( options ) ⇒ `!ProxyConfig`

Manually configures the browser proxy. The following options are supported:

- `ftp`: Proxy host to use for FTP requests
- `http`: Proxy host to use for HTTP requests
- `https`: Proxy host to use for HTTPS requests
- `bypass`: A list of hosts requests should directly connect to, bypassing any other proxies for that request. May be specified as a comma separated string, or a list of strings.

Behavior is undefined for FTP, HTTP, and HTTPS requests if the corresponding key is omitted from the configuration options.

Parameters
options: `{ftp: (string|undefined), http: (string|undefined), https: (string|undefined), bypass: (string|!Array.<string>|undefined)}` Proxy configuration options.
Returns
A new proxy configuration object.

code »pac ( url ) ⇒ `!ProxyConfig`

Configures WebDriver to configure the browser proxy using the PAC file at the given URL.

Parameters
url: `string` URL for the PAC proxy to use.
Returns
A new proxy configuration object.

code »system ( ) ⇒ `!ProxyConfig`

Configures WebDriver to use the current system's proxy.

Returns
A new proxy configuration object.