New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sync repo through http_proxy #607
Comments
Need to make urllib support proxy first. |
this means for now.cnpmjs.org is not support http_proxy? |
yep, I will try to add http_proxy support for urllib this weekend. |
@luicfer can you run this test on your proxy? var urllib = require('urllib')
var tunnel = require('tunnel-agent');
var tunnelingAgent = tunnel.httpsOverHttp({
proxy: {
host: 'your-proxy-host',
port: $port
}
});
urllib.request('https://registry.cnpmjs.org', {
httpsAgent: tunnelingAgent
}, function (err, data, res) {
console.log(err, res.statusCode, res.headers);
}); |
tunnel-agent work fine on my proxy |
run the script. { [RequestError: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND http://10.16.1.131 (req "error"), GET https://registry.cnpmjs.org -1 (connnected: false, keepalive socket: false)
headers: {}]
code: 'ECONNRESET',
name: 'RequestError',
data: undefined,
path: '/',
status: -1,
headers: {},
res:
{ status: -1,
statusCode: -1,
headers: {},
size: 0,
aborted: false,
rt: 44,
keepAliveSocket: false } } -1 {} |
@luicfer I try it through my http proxy, it work for me. |
run the test. Connection timeout. { [ConnectionTimeoutError: Request#1 timeout for 15000ms, GET https://twitter.com -1
headers: {}]
name: 'ConnectionTimeoutError',
data: undefined,
path: '/',
status: -1,
headers: {},
res:
{ status: -1,
statusCode: -1,
headers: {},
size: 0,
aborted: false,
rt: 15031 } }
-1 {} |
... @luicfer change the twitter.com, use other like |
request |
嗯,那就 ok 了。等 pr 合并我发一个版本,你配置一下 config.js 里面的 httpProxy 参数就好了。 |
我们应该继续英文嘛,说中文多不好 |
好像npm还没有发布这个修改?什么时候能发布到npm呢? |
@xysDavid cnpmjs.org@2.0.0 |
我是不是碰到防火墙了? |
The server is behind firewall.How to sync repo through http_proxy?
The text was updated successfully, but these errors were encountered: