0

I am using LearnBoost/knox to connect to Amazon S3 but my machine is using a proxy server. I have set an environment variable http_proxy and https_proxy but Knox is not using that. How do you get Knox to communicate through a proxy server.

ben75
  • 29,217
  • 10
  • 88
  • 134
Dave Green
  • 151
  • 9

1 Answers1

0

A pull request for proxy support has been added to Knox about 8 months ago but it hasn't made it in the latest release yet (the pull request was closed).

If you get that code, you can use:

var client = knox.createClient({
    key: '<api-key-here>'
  , secret: '<secret-here>'
  , bucket: 'learnboost'
  , proxy: 'your-proxy'
});
dcro
  • 13,294
  • 4
  • 66
  • 75
  • The pull request referenced would indeed solve my problem. It looks like this pull request didn't make it into the code though it looks like the author JeremyWright closed the pull request. – Dave Green Sep 23 '13 at 21:20
  • Sorry, my bad about the status of the pull request. I updated my answer to correctly reflect its current status. – dcro Sep 24 '13 at 06:01
  • 1
    No worries dcro it allowed me to find the author of the pull request and he came back with this. We have been using a node module called node-tunnel so we can mange and configure proxies in one spot and share that agent configuration with all our modules. Knox already support the option of passing an agent so there is no longer a need for the extra code. – Dave Green Sep 24 '13 at 13:09