Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add noproxy configuration #6

Closed
wants to merge 1 commit into from

2 participants

@vvision

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

This is an addition to this pull request.

@isaacs
Owner

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

@vvision

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

@isaacs
Owner
@vvision

"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.

@isaacs
Owner

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 https://github.com/isaacs/npm/issues? Thanks.

@isaacs isaacs closed this
@vvision

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
Closed

Add noproxy configuration #2873

@vvision

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
Closed

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
View
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 : "http://npat.npmjs.org/"
, 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.