Socket
Socket
Sign inDemoInstall

no-proxy

Package Overview
Dependencies
4
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    no-proxy

Determine if a url should bypass a proxy based on NO_PROXY environment variable.


Version published
Weekly downloads
57K
increased by7.38%
Maintainers
1
Install size
91.2 kB
Created
Weekly downloads
 

Readme

Source

no-proxy

Test URL against NO_PROXY environment variable.

console.log(process.env.NO_PROXY); // ".foo.com,*.bar.com,10.*,192.168.1."

// requires protocol
var noProxy = require('no-proxy');
noProxy('http://foo.com/'); // true
noProxy('http://www.baz.com/'); // false

// check hostname part only
var noProxyHost = require('no-proxy/hostname');
noProxyHost('foo.com'); // true
noProxyHost('baz.com'); // false
noProxyHost('192.168.1.1'); // true

NOTE: You may want to use memoization around this module.

WARNING

If you are using a node version prior to Node 8, you need to install url-parse as a dependency.

FAQs

Last updated on 17 Nov 2017

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