krakenjs / kappa

A hierarchical npm-registry proxy
Other
557 stars 56 forks source link

Install kappa behind a corporate proxy #48

Open mathieuboniface opened 10 years ago

mathieuboniface commented 10 years ago

Is there any way to install kappa behind a corporate proxy ?

I sucessfully installed kappa with only one declared paths to my local couchdb instance (tested commands : npm {adduser, search, test, publish, install}), but npm install XXX fails (freeze) if I add http://registry.npmjs.org/ as a second paths to the kappa configuration file.

I also tried to run kappa with some options without more success :

export http_proxy="http://user:password@host:port"
export https_proxy=$http_proxy
# this works well
wget http://registry.npmjs.org/

# Setting the proxy configuration to npm
npm config set proxy $http_proxy
npm config set https-proxy $http_proxy

# npm client fails with this configuration
kappa -c config.json --proxy $http_proxy --https-proxy $https_proxy
jmaher409 commented 10 years ago

I'm running into the same issue. Have you had any luck since you wrote this?

totherik commented 10 years ago

Hmm, so kappa uses hapi's built in reply.proxy which internally uses Nipple. We can see if anything has changed in this API in more recent versions of hapi or look at alternate solutions.

Also, it looks like @tlivings started investigating this at some point.

tlivings commented 10 years ago

The issue is because reply.proxy can not take custom agents, where a custom agent would be necessary to handle the proxy step.

I'm in the process of opening a PR against Hapi to resolve this. The alternative is to implement it ourselves and not use reply.proxy.

totherik commented 10 years ago

either way, this is pretty important for kappa. I'll defer to you @tlivings for the best approach, but for now I guess let's see if we get any traction with hapi.

ndvivedi commented 10 years ago

I have submitted a pull request on hapi to allow for an agent to be passed into the reply.proxy handler. If this gets pulled in, the version of hapi kappa depends on would need to be bumped (currently hapi is at 6.5.0) to use it.

tlivings commented 10 years ago

Kappa has been upgrade to use Hapi 6. We should be ready to work against this change now.

lynxor commented 8 years ago

Any news on this? Struggling to set this up behind corporate proxy.

tlivings commented 8 years ago

I thought there was a PR to support custom agents (as noted above). We should definitely look back into this.

cc @jasisk

ds82 commented 8 years ago

Any update on this?

out4b commented 6 years ago

bump. Is there any plan to support this feature?