在Knox中为连接设置代理服务器 [英] Setting proxy server for connections in Knox

查看:263
本文介绍了在Knox中为连接设置代理服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用LearnBoost/knox连接到Amazon S3,但是我的机器正在使用代理服务器.我已经设置了环境变量http_proxy和https_proxy,但是Knox没有使用它.您如何使Knox通过代理服务器进行通信.

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.

推荐答案

请求代理支持的请求已在大约8个月前添加到Knox ,但尚未在最新版本中添加(拉取请求已关闭).

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

这篇关于在Knox中为连接设置代理服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆