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


#1

Hi,

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://192.168.1.35:1180 apm config set https-proxy hxxps://192.168.1.35:1180
$ apm config set socks-proxy socks://192.168.1.35:1080

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/python-interceptor.sh”

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

; 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 127.0.0.1:41311

Please let me know how I can fix this…

Thanks
M


#2

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!!!


#3

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 http://192.168.1.35:41311

$ cat ~/.atom/.apmrc
http-proxy=https://192.168.1.35:41311/