How to setup proxy for Atom in Ubuntu platforms? (Atom 1.25 x64)



I need to set proxy for Atom cuz of school policy. I have tried setting it using the below command:

apm config set http-proxy hxxp:// apm config set https-proxy hxxps://
$ apm config set socks-proxy socks://

So when I get the configuration listings it looks as below:

$ apm config list
; cli configs
globalconfig = “/home/mike/.atom/.apm/.apmrc”
user-agent = “npm/3.10.10 node/v6.9.5 linux x64”
userconfig = “/home/mike/.atom/.apmrc”

; environment configs
node-gyp = “/usr/share/atom/resources/app/apm/bin/…/node_modules/.bin/node-gyp”
python = “/usr/share/atom/resources/app/apm/bin/”

; userconfig /home/mike/.atom/.apmrc
http-proxy = “
https-proxy = “
socks-proxy = “socks://”

; globalconfig /home/mike/.atom/.apm/.apmrc
cache = “/home/mike/.atom/.apm”
progress = false

; node bin location = /usr/share/atom/resources/app/apm/bin/node
; cwd = /home/mike/Desktop
; HOME = /home/mike/.atom/.node-gyp
; “npm config ls -l” to show all defaults.

But, then if I open Atom and try to search and install the packages it throws the below error:

Searching for “language-babel” failed.Hide output…
tunneling socket could not be established, cause=connect ECONNREFUSED

Please let me know how I can fix this…



If forward the proxy on another port as 41311 Atom search finds the package but then it switches back to port 1180 as I configured via apm set http-proxy. … weird!!!


I managed to forward my proxy to port 41311 on localhost and also reset the proxy to the same port 41311 is using … it worked just fine. I also removed all other proxy settings for socks5 and https so below is my .apmrc file…

$ amp config set http-proxy

$ cat ~/.atom/.apmrc