Hacking Proxy support into Brackets

posted by sacah on javascript, software, fixes, hack,

Started using Brackets at work, though they use a corporate proxy, so I did a quick hack to get proxy support into Brackets for installing Extensions.

Update:
Version 0.41 and above you can define the proxy in the Preferences file, in Brackets go Debug -> Open Preference File.
Then add a line
"proxy": "http://localhost:3128",



Update:
Sprint 29, here are some screenshots
Change to this


Update:
Sprint 26, this is now on line 433 of ExtensionManagerDomain.js.

I did this for Brackets Sprint 24.

Open brackets/www/extensibility/node/ExtensionManagerDomain.js

Find the _cmdDownloadFile function, line 288
Add
proxy: ‘http://proxy.address:port’,
To the var req = request.get({});
For authenticated proxies,
proxy: ‘http://username:password@proxy.address:port’,
var req = request.get({ proxy: ‘http://proxy.address’, url: url, encoding: null },
Hope this helps, I'm guessing they will add proxy support down the line, but until then, this will get it working.

Update:
Check out Cntlm, it's an Authenticated Proxy. Can store your password as a hash, better than entering it into plain text in the above file.