Socket
Socket
Sign inDemoInstall

network-overrides

Package Overview
Dependencies
79
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

network-overrides

CLI and backend for the Network Overrides browser extension


Version published
Maintainers
1
Weekly downloads
780
decreased by-4.99%
Install size
7.83 MB

Weekly downloads

Readme

Source

Network Overrides CLI

npm

CLI and backend for the Network Overrides browser extension, allowing one to define sets of browser-side redirects (overrides) programmatically from the command line.

See the general documentation more info and quick start guide.

CLI commands

start-backend

Format: network-overrides start-backend [--background]

Starts the shared overrides backend in port 8117. In case the port is already occupied (probably the service is already running), it exits with code 2.

Running it with the --background flag will start it as a background (detached) process instead.

stop-backend

Format: network-overrides stop-backend

Stops the shared overrides backend, making it exit normally.

add

Format: network-overrides add <override-set-id> <overrides>

Adds (or updates) a list of overrides that belong to a specific set. Inspired by cURL, the overrides can be described in a couple of ways:

  • JSON string. ex:
network-overrides add google-search '[{from:"https://www.google.com/search/(.*)",to:"http://localhost:3000/$1"}]'
  • path to JSON file preceeded by @. ex:
network-overrides add google-search @config/overrides.json

See Override for more info on how to structure your overrides.

remove

Format: network-overrides remove <override-set-id>

Removes the list of overrides that belong to a specific set. ex:

network-overrides remove google-search

list

Format: network-overrides list

Logs to the console the list of overrides per set currently registered in the shared backend.

wrap-command

Format: network-overrides wrap-command <command-to-run> <override-set-id> <overrides> [--ensure-backend]

Runs the provided command wrapped by (bound to) a set of overrides. It's a combination of several commands over the following steps:

  1. with the --ensure-backend flag, it starts the backend shared background process
  2. adds the supplied override set (<override-set-id> <overrides>), in a format similar to the add command.
  3. runs the supplied command (<command-to-run>)
  4. upon exit, removes the supplied override set (<override-set-id>)

FAQs

Last updated on 09 Dec 2022

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