np-maintain / global-tunnel

Global HTTP & HTTPS tunelling agent - hard fork of https://github.com/SalesforceEng/global-tunnel
BSD 3-Clause "New" or "Revised" License
118 stars 20 forks source link

global-tunnel doesn't work with Hyperledger Fabric #14

Closed nospam2000 closed 6 years ago

nospam2000 commented 6 years ago

globalTunnel._makeRequest checks if options.host is set, but Hyperledger Fabric is using options.hostname instead which causes the proxy to be bypassed.

The documentation of http.request(options[, callback]) says the following about host and hostname in options:

options
    host <string> A domain name or IP address of the server to issue the request to. Default: 'localhost'.
    hostname <string> Alias for host. To support url.parse(), hostname is preferred over host.

That means both is legal to use. I already made a fix together with @bigbelette, see pull request #15.

MarcoScabbiolo commented 6 years ago

Hi @nospam2000 your PR has been merged and published to npm, is the issue solved for you?

nospam2000 commented 6 years ago

Yes, this specific issue is solved. Thanks for integrating it sooo fast!