GooseMod / OpenAsar

Open-source alternative of Discord desktop's app.asar
https://openasar.dev
GNU Affero General Public License v3.0
2.54k stars 67 forks source link

Updater does not respect proxy settings from `--proxy-server=`. #184

Open Richardn2002 opened 5 months ago

Richardn2002 commented 5 months ago

Related to #68.

I am in a network environment where access to discord servers is blocked. I find that the app can't go past the "Starting" screen even with --proxy-server=<my proxy server> command line argument provided, and error messages about connection timeout are emitted.

I suspect the problem is at src/updater/moduleUpdater.js:6, where the get from https node module instead of net from electron is used, so proxy settings provided to electron are not respected.

According to the source, I set both SKIP_HOST_UPDATE and SKIP_MODULE_UPDATE to true, and the app booted and everything else is fine (I can confirm that the rest of the app is using proxy by proxy server logs and the fact that I can actually connect to discord).

This is a usability problem for me, and potentially a privacy problem for some.

I suggest you do a ctrl-F on require('https') and change accordingly. I am no electron/nodejs expert and dunno if using electron/net is the best approach. Just do whatever you see fit to make the updater respect the proxy settings.

Overall this is a great based project solving dependency hell problems. Love to all of you.