atom / apm

Atom Package Manager
https://atom.io/packages
MIT License
1.27k stars 297 forks source link

APM doesn't respect proxy setting #857

Open Glandos opened 5 years ago

Glandos commented 5 years ago

Prerequisites

Description

Run the following:

apm config set https-proxy http://localhost:8124
export https_proxy http://localhost:8124
apm install <some-package>

The the following subprocess is created: /usr/share/atom/resources/app/apm/bin/node /usr/share/atom/resources/app/apm/node_modules/npm/node_modules/update-notifier/check.js {"pkg":{"name":"npm","version":"6.2.0"}}

This process tries to connect directly to the requested site on port 443, without going through the proxy.

Steps to Reproduce

See above.

Expected behavior: No connection should be made directly. Ever.

Actual behavior: strace show direct connections to 104.16.18.35:443

Reproduces how often:

100% sure.

Versions

> atom --version
Atom    : 1.38.2
Electron: 2.0.18
Chrome  : 61.0.3163.100
Node    : 8.9.3
> apm --version
apm  2.1.7
npm  6.2.0
node 8.9.3 x64
atom 1.38.2
python 2.7.16
git 2.20.1

Additional Information

None