You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 30, 2019. It is now read-only.
This repository was archived by the owner on Apr 30, 2019. It is now read-only.
I'm not 100% sure why this happens but I'd like to make it work.
Do you have some info on this proxy you are using? What type is it? And do you have to configure like your browser or other tools for it? (I've been lucky and only ever used fully transparent proxies).
After a little reading it appears to be a "Regular/Caching Proxy" because as an end user we configure the browers/tools to point at: http://proxy.company.com:8080. That being said I'm not all that well versed in proxy things; however, I could ask some of the engineers about it if you have some specific questions in mind.
$ node ./test
dont use proxy
testing: https://raw.github.com/borisyankov/DefinitelyTyped/master/package.json
events.js:72
throw er; // Unhandled 'error' event
^
Error: connect ETIMEDOUT
at errnoException (net.js:904:11)
at Object.afterConnect [as oncomplete] (net.js:895:19)
johnterrance.burke@WA12-D17577 /c/github/tsd (dev/proxytest)
$ node ./test -p http://proxy.company.co.uk:8080
using proxy: http://proxy.company.co.uk:8080
testing: https://raw.github.com/borisyankov/DefinitelyTyped/master/package.json
got a response
status 200
testing: https://github.com/_gh/api/rate_limit
got a response
status 200
done!
$ node ./test -e
no proxy in process.env !
testing: https://raw.github.com/borisyankov/DefinitelyTyped/master/package.json
events.js:72
throw er; // Unhandled 'error' event
^
Error: connect ETIMEDOUT
at errnoException (net.js:904:11)
at Object.afterConnect [as oncomplete] (net.js:895:19)
$ node ./test -e
using proxy from env: http://proxy.company.co.uk:8080
testing: https://raw.github.com/borisyankov/DefinitelyTyped/master/package.json
got a response
status 200
testing: https://github.com/_gh/api/rate_limit
got a response
status 200
done!
Sorry for the wait! My Open Source time was claimed by another project's emergency last week (I collab also on DefinitelyTyped and had to re-rig the PR test script).
But this is still top of my list, especially now there are two users waiting.
@michelsalib The env fields are a convention but it is not an automatic thing: implementers need to do stuff to make it work: we use request.js which has support for proxies so it is a matter of reading the env field (or config file) and passing the value through (we checked that in the test above).
Activity
Bartvds commentedon Feb 26, 2014
Thanks for reporting this.
I'm not 100% sure why this happens but I'd like to make it work.
Do you have some info on this proxy you are using? What type is it? And do you have to configure like your browser or other tools for it? (I've been lucky and only ever used fully transparent proxies).
jtburke commentedon Feb 26, 2014
After a little reading it appears to be a "Regular/Caching Proxy" because as an end user we configure the browers/tools to point at: http://proxy.company.com:8080. That being said I'm not all that well versed in proxy things; however, I could ask some of the engineers about it if you have some specific questions in mind.
Bartvds commentedon Feb 26, 2014
Google & Stackoverflow suggest this is a recurring problem in node apps, with a know solution:
Could you do a quick test to verify this is your issue?
I pushed a bare-bones test script to a branch: https://github.com/DefinitelyTyped/tsd/tree/dev/proxytest (link fixed :)
If you grab those 2 files, cd into the directory and get the 2 dependencies (request & commander):
Then run the script to do some https requests to gihub api:
These should fail with the error from your report.
Then directly specify the proxy and test again:
That should work as it will set
request's proxy: https://github.com/DefinitelyTyped/tsd/blob/dev/proxytest/test.js#L59Then try to use the proxy from environment variable: it uses the same convention as npm, bower etc, so you might already have these set:
The environment variables: https://github.com/DefinitelyTyped/tsd/blob/dev/proxytest/test.js#L22-L25
If this works out I'll put the environment variable suport in tsd, and also create a global config file (like npm has a
.npmrc) for convenience.jtburke commentedon Feb 27, 2014
$ export HTTP_PROXY=http://proxy.company.co.uk:8080
Hope this helps : )
Bartvds commentedon Feb 27, 2014
Thanks a lot, this really helps!
The result is what I hoped for: I'll apply this and add global config file (like
.tsdrc) so you only have to set it once.This will be part of next npm release: I'll probably push a preview tag to github a little sooner (days) so we can verify it is really solved.
jtburke commentedon Feb 27, 2014
Top work, thank you very much. I'll help verify/test it with the preview.
michelsalib commentedon Mar 7, 2014
👍 I am waiting for a .tsdrc config file too. Is it normal that my HTTP_PROXY env variable is not taken into account in this case?
Bartvds commentedon Mar 7, 2014
Sorry for the wait! My Open Source time was claimed by another project's emergency last week (I collab also on DefinitelyTyped and had to re-rig the PR test script).
But this is still top of my list, especially now there are two users waiting.
@michelsalib The env fields are a convention but it is not an automatic thing: implementers need to do stuff to make it work: we use request.js which has support for proxies so it is a matter of reading the env field (or config file) and passing the value through (we checked that in the test above).
Bartvds commentedon Mar 8, 2014
I just pushed a preview tag with support for proxies to github: https://github.com/DefinitelyTyped/tsd/releases/tag/0.5.6-proxy
It has the environment vars support as well as a global
.tsdrcfile.Let me know it these works for your setup.
michelsalib commentedon Mar 10, 2014
I just tested it with HTTP_PROXY and it works like a charm. Thanks @Bartvds :)
michelsalib commentedon Mar 10, 2014
Also works fine with grunt-tsd :D
Bartvds commentedon Mar 10, 2014
@michelsalib Cool, thanks for reporting back! This will be part of the next npm update then.
jtburke commentedon Mar 11, 2014
I just tested with the .tsdrc, works a treat. Thank you very much @Bartvds