Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Add noproxy configuration #6

wants to merge 1 commit into from

2 participants


no-proxy will have the value of env variables no_proxy or NO_PROXY.

This is an addition to this pull request.


What is the goal here? I don't get it.


The goal is to avoid having to set the value of no-proxy with npm config set no-proxy="", if you already have it in your env configuration.


"no-proxy" is a string containing hostnames. When fetching a package from one of these hostnames, the specifed proxy should not be used. In fact if we have a proxy set, since all requests use the proxy, we're unable to fetch packages from a local source which is pretty annoying.
So with no-proxy set, we're able to easily fetch all our packages.


Ok, now we're getting at the actual request here. Lovely!

So, you need a way to specify a list of hostnames that will not ever go through a proxy. That's a bit more involved than just adding a config, and the config name cannot start with "no-", because nopt will interpret --no-proxy foo as --proxy=false foo.

I'm closing this pull request, because it's the incorrect approach. Can you please post your request as an issue at Thanks.

@isaacs isaacs closed this

Ok, should have explained this in my first post.

In fact, I've already opened an issue a few days ago: npm/npm#2873.
It contains a bit of code which solves the problem.

@vvision vvision referenced this pull request in npm/npm

Add noproxy configuration #2873


Hum, commit where no-proxy is renamed into noproxy is not taken into account here.

@vvision vvision referenced this pull request in npm/npm-registry-client

Add noproxy configuration #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 11, 2012
  1. @vvision

    Added no-proxy config.

    vvision authored
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  config-defs.js
2  config-defs.js
@@ -214,6 +214,7 @@ Object.defineProperty(exports, "defaults", {get: function () {
, long : false
, message : "%s"
, "node-version" : process.version
+ , "no-proxy" : process.env.NO_PROXY || process.env.no_proxy || "null"
, npaturl : ""
, npat : false
, "onload-script" : false
@@ -305,6 +306,7 @@ exports.types =
, long : Boolean
, message: String
, "node-version" : [null, semver]
+ , "no-proxy" : ["null", String]
, npaturl : url
, npat : Boolean
, "onload-script" : [null, String]
Something went wrong with that request. Please try again.