Socket
Socket
Sign inDemoInstall

op-browser

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    op-browser

Open browser window and set proxy


Version published
Maintainers
1
Install size
13.2 kB
Created

Readme

Source

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

Keywords

FAQs

Last updated on 13 Oct 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc