Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Apply Chromium proxies to env vars for apm #898
Description of the Change
Chromium does a good job at reading system proxy settings which means a lot of what Atom needs to do goes through the correct proxies.
The apm command line being a regular node app and not an Electron/Chromium app does not read or have access to these proxy settings and so fails when trying to connect if you are using a proxy.
This change determines what http and https proxy servers to use based on Chromium's session.resolveProxy call with atom.io and then sets the http_proxy and https_proxy environment variables that apm then uses.
Alternative designs include;
People behind proxy servers can use apm with no effort.
Users with manually set http_proxy and https_proxy environment variables will find we override their preferences. They can switch off the auto-detect proxy in settings.