mattcg / socks5-https-client

SOCKS v5 HTTPS client implementation in JavaScript for Node.js.
186 stars 28 forks source link

Support `host` alias for `hostname` #13

Closed valeriangalliat closed 8 years ago

valeriangalliat commented 8 years ago

Looks like latest request sends options.host instead of options.hostname and this breaks this module, resulting in a socket hang up error:

stream.js:74
      throw er; // Unhandled stream error in pipe.
      ^

Error: socket hang up
    at TLSSocket.onHangUp (_tls_wrap.js:1049:19)
    at TLSSocket.g (events.js:260:16)
    at emitNone (events.js:72:20)
    at TLSSocket.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:913:12)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickDomainCallback (node.js:397:17)
mattcg commented 8 years ago

Thank you, @valeriangalliat! 👍