1.0.9 • Published 4 years ago

op-browser v1.0.9

Weekly downloads
440
License
MIT
Repository
github
Last release
4 years ago

open-browser

Open browser window and set proxy

Install

npm install op-browser --save

Usage

const openBrowser = require('op-browser');

// Automatic proxy selection
openBrowser.open('chrome', 'https://google.com', 'http://127.0.0.1:8800', '');
// Proxy auto-configuration (PAC)
openBrowser.open('chrome', 'https://google.com', '', 'http://127.0.0.1:8800/proxy.pac');

API

op-browser : object

Browser

Kind: global namespace

op-browser.open(browser, url, proxyURL, pacFileURL, bypassList) ⇒ Promise

open browser window, if the pacFileURL is not empty, will use proxy auto-configuration

Kind: static method of op-browser

ParamTypeDescription
browserStringthe browser's name
urlStringthe url that to open
proxyURLStringthe proxy url, format: http://<hostname>[:[port]]
pacFileURLStringthe proxy url, format: http://<hostname>[:[port]]/[pac-file-name]
bypassListStringthe 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

op-browser.detect(name) ⇒ Promise

detect browser, return the browser's path

Kind: static method of op-browser

ParamTypeDescription
nameStringthe browser name
1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

6 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago