Skip to content

Mik317/open-browser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

op-browser.detect(name) ⇒ Promise

detect browser, return the browser's path

Kind: static method of op-browser

Param Type Description
name String the browser name

About

Open browser window and set proxy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%