代理配置在哪里允许bq工具连接到互联网? [英] Where is proxy configuration to allow bq tool to connect to the internet?nt

查看:101
本文介绍了代理配置在哪里允许bq工具连接到互联网?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用bq工具进行身份验证时出现故障。原因是因为它无法联系到googleapis.com域。我需要通过代理,但我不确定需要设置的位置。

感谢您的帮助。

我不认为BigQuery工具目前支持代理服务器。底层的httplib2库确实有支持,但您需要修改bq客户端的代码才能使用它。



即:
http://code.google.com/p /google-bigquery-tools/source/browse/bq/bigquery_client.py#321



您应该可以传递这样的参数:
httplib2.Http(proxy_info = httplib2.ProxyInfo(socks.PROXY_TYPE_SOCKS5,'localhost',1080))



更多信息:
http://code.google.com/p/httplib2 / wiki / Examples



我正在研究我们(Google)是否可以本地添加代理支持。理想情况下,httplib2库还将查找环境变量或类似的值来确定代理设置。我已经明白了这一点。


I get a failure when trying to authenticate using the bq tool. The reason is because it can't reach out to the googleapis.com domain. I needs to go through a proxy, but I am unsure of where that needs to be setup.

thanks for the help.

解决方案

I don't think the BigQuery tool currently has support for proxy servers. The underlying httplib2 library does have support, but you'd need to modify the code of the bq client to use it.

ie, here: http://code.google.com/p/google-bigquery-tools/source/browse/bq/bigquery_client.py#321

You should be able to pass parameters like this: httplib2.Http(proxy_info = httplib2.ProxyInfo(socks.PROXY_TYPE_SOCKS5, 'localhost', 1080))

More info here: http://code.google.com/p/httplib2/wiki/Examples

I'm looking into whether we (Google) can add proxy support natively. Ideally the httplib2 library would also look for an environment variable or similar to determine proxy settings. I've pinged the author on that.

这篇关于代理配置在哪里允许bq工具连接到互联网?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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