open-browser
Open browser window and set proxy
Install
npm install op-browser --save
Usage
const openBrowser = ; // Automatic proxy selectionopenBrowser;// Proxy auto-configuration (PAC)openBrowser;
API
object
op-browser : Browser
Kind: global namespace
- op-browser :
object
- .open(browser, url, proxyURL, pacFileURL) ⇒
Promise
- .detect(name) ⇒
Promise
- .open(browser, url, proxyURL, pacFileURL) ⇒
Promise
op-browser.open(browser, url, proxyURL, pacFileURL, bypassList) ⇒ open browser window, if the pacFileURL
is not empty, will use proxy auto-configuration
Kind: static method of op-browser
Param | Type | Description |
---|---|---|
browser | String |
the browser's name |
url | String |
the url that to open |
proxyURL | String |
the proxy url, format: http://<hostname>[:[port]] |
pacFileURL | String |
the proxy url, format: http://<hostname>[:[port]]/[pac-file-name] |
bypassList | String |
the list of hosts for whom we bypass proxy settings and use direct connections, See: "net/proxy/proxy_bypass_rules.h" for the format of these rules |
Promise
op-browser.detect(name) ⇒ detect browser, return the browser's path
Kind: static method of op-browser
Param | Type | Description |
---|---|---|
name | String |
the browser name |