We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Node.js v0.12.7 and proxy with https over http combination is not working. Error occurs.
I test my ta.js script. http://www.nasa.gov is 200 OK, but, https://travis-ci.org is failed.
ta.js
http://www.nasa.gov
https://travis-ci.org
$ nvm use v0.12.7 && node ta.js https://travis-ci.org Now using node v0.12.7 { [Error: write EPROTO 140128450471808:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:782: ] code: 'EPROTO', errno: 'EPROTO', syscall: 'write' } $ nvm use v0.12.7 && node ta.js http://www.nasa.gov Now using node v0.12.7 200 (http://www.nasa.gov) $ nvm use v0.10.40 && node ta.js https://travis-ci.org Now using node v0.10.40 200 (https://travis-ci.org) $ nvm use v0.10.40 && node ta.js http://www.nasa.gov Now using node v0.10.40 200 (http://www.nasa.gov)
ta.js is here.
'use strict'; var url = process.argv[2]; var options = require('url').parse(url); var protocol = options.protocol.replace(':', ''); var tunnel = require('tunnel-agent')[protocol + 'OverHttp']; options.agent = tunnel({ proxy: { host: '{proxyhost}', port: 8080, proxyAuth: '{userid}:{password}' } }); options.headers = { 'Connection': 'close' }; var func = protocol === 'http' ? require('http') : require('https'); var req = func.request(options, function (res) { console.log(res.statusCode + ' (' + url + ')'); }); req.on('error', function (error) { console.log(error); }) req.end();
The text was updated successfully, but these errors were encountered:
This should be fixed by pull request #15.
Sorry, something went wrong.
No branches or pull requests
Node.js v0.12.7 and proxy with https over http combination is not working. Error occurs.
I test my
ta.js
script.http://www.nasa.gov
is 200 OK, but,https://travis-ci.org
is failed.ta.js
is here.The text was updated successfully, but these errors were encountered: