Setting proxy server for connections in Knox

巧了我就是萌 提交于 2019-12-13 04:41:00

问题


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.


回答1:


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'
});


来源:https://stackoverflow.com/questions/18959774/setting-proxy-server-for-connections-in-knox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!