{"action":"created","issue":{"url":"https://api.github.com/repos/request/request/issues/1369","labels_url":"https://api.github.com/repos/request/request/issues/1369/labels{/name}","comments_url":"https://api.github.com/repos/request/request/issues/1369/comments","events_url":"https://api.github.com/repos/request/request/issues/1369/events","html_url":"https://github.com/request/request/issues/1369","id":55331670,"number":1369,"title":"Cannot get proxy (https over http) to work","user":{"login":"mattpage","id":732573,"avatar_url":"https://avatars.githubusercontent.com/u/732573?v=3","gravatar_id":"","url":"https://api.github.com/users/mattpage","html_url":"https://github.com/mattpage","followers_url":"https://api.github.com/users/mattpage/followers","following_url":"https://api.github.com/users/mattpage/following{/other_user}","gists_url":"https://api.github.com/users/mattpage/gists{/gist_id}","starred_url":"https://api.github.com/users/mattpage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattpage/subscriptions","organizations_url":"https://api.github.com/users/mattpage/orgs","repos_url":"https://api.github.com/users/mattpage/repos","events_url":"https://api.github.com/users/mattpage/events{/privacy}","received_events_url":"https://api.github.com/users/mattpage/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-23T20:56:26Z","updated_at":"2015-01-23T21:10:25Z","closed_at":null,"body":"I am trying to get request to proxy a request for an https://url over an http proxy.\r\nI think the docs indicate that this should implicitly tunnel.\r\n\r\nI saw and ran the [https://github.com/request/request/blob/master/tests/test-tunnel.js](test-tunnel) test, but it appears to only work with a local version of squid. I was unable to get it to work with a different proxy.\r\n\r\nIf you skip squid and go direct to a proxy, it does not work.\r\n\r\nPerhaps I am doing something wrong. \r\nYour help would be greatly appreciated.\r\n\r\nHere is a simple test I created that fails with:\r\nError: tunneling socket could not be established, cause=socket hang up] code: 'ECONNRESET'\r\n\r\n```\r\n'use strict';\r\n\r\nvar http = require('http');\r\nvar request = require('request');\r\n\r\nvar server = http.createServer(function(req, res){\r\n  console.log('got request');\r\n  res.writeHead(200, { 'Content-Type': 'application/json' });\r\n  res.end();\r\n});\r\n\r\nserver.listen(5050);\r\n\r\nrequest({\r\n  uri: 'https://registry.npmjs.org/',\r\n  proxy: 'http://localhost:5050',\r\n  strictSSL: true,\r\n  json: true\r\n}, function(err, body) {\r\n  console.log(err, body);\r\n});\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/request/request/issues/comments/71266521","html_url":"https://github.com/request/request/issues/1369#issuecomment-71266521","issue_url":"https://api.github.com/repos/request/request/issues/1369","id":71266521,"user":{"login":"mattpage","id":732573,"avatar_url":"https://avatars.githubusercontent.com/u/732573?v=3","gravatar_id":"","url":"https://api.github.com/users/mattpage","html_url":"https://github.com/mattpage","followers_url":"https://api.github.com/users/mattpage/followers","following_url":"https://api.github.com/users/mattpage/following{/other_user}","gists_url":"https://api.github.com/users/mattpage/gists{/gist_id}","starred_url":"https://api.github.com/users/mattpage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattpage/subscriptions","organizations_url":"https://api.github.com/users/mattpage/orgs","repos_url":"https://api.github.com/users/mattpage/repos","events_url":"https://api.github.com/users/mattpage/events{/privacy}","received_events_url":"https://api.github.com/users/mattpage/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T21:10:25Z","updated_at":"2015-01-23T21:10:25Z","body":"fyi - the strictSSL option (true or false) seems to make no difference. I also tried rejectUnauthorized: false."}}