Programatically get proxy settings from package…?


In my package I need to do some downloading to bootstrap stuff. Unfortunately there are issues for users behind proxies.

Even if they have set correct proxy settings with apm config or .apmrc or whatever, these aren’t picked up by my code which does some manual downloading of stuff.

I see three ways to solve it:

  • Find a way to read the config settings of apm from my package and shove it into whatever downloading tool I’m using. Currently download

  • Find another way to download using Atom built-ins?

  • Add proxy settings to just my package.

Obviously, I think the last one is the worst, but the other two are fine. This should be a pretty common issue, and I’m a bit confused why I can’t find any good solution when searching… Does anyone have any pointers?


Same question. Did you find any solution to this problem?


Nope, sorry :frowning:


No worries! BTW, I decided to read .apmrc from my package using “properties-reader” and it works fine.


I handled it via using environment vars…
See my getEnv function, and my configureEnvironment functions.

Then you call the process which needs to make requests through the proxy in the callback for configureEnvironment…