Skip to content

Corporate proxy and name resolution #2054

@cstffx

Description

@cstffx

My corporate proxy only fetches resources throw domain names. This means that try to get a resource by his IP address will throw an exception. For example I'm need to install a module called bcrypt. Tracing the process I discovered that node-gyp@6.1.0 is trying to download this file https://nodejs.org/download/release/v12.13.1/node-v12.13.1-headers.tar.gz and this results in the error:

gyp info it worked if it ends with ok
gyp info using node-gyp@6.1.0
gyp info using node@12.13.1 | linux | x64
gyp info find Python using Python version 3.5.2 found at "/usr/bin/python3"
gyp http GET https://nodejs.org/download/release/v12.13.1/node-v12.13.1-headers.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: connect EHOSTUNREACH 104.20.23.46:443
gyp ERR! stack     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1129:14)

I have the theory that node-gyp is resolving the name and doing the request with the IP address instead the name. Can be this true? In this case exists any way to change this behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions