For the Mac version of Discord, I extracted the /Applications/Discord.app/Contents/Resources/app.asar file and found in the code that the Mac update uses electron.autoUpdater, which means the proxy settings do not take effect. My solution is to bypass the autoUpdater. Here are the steps:
-
Edit the file
/Users/admin/Library/Application\ Support/discord/settings.jsonand add the following two configurations:"SKIP_HOST_UPDATE": true, "SKIP_MODULE_UPDATE": true -
Run Discord with proxy parameters using the command:
/Applications/Discord.app/Contents/MacOS/Discord --proxy-server=127.0.0.1:7890 --ignore-certificate-errors
对于Mac版本的discord,我解压了/Applications/Discord.app/Contents/Resources/app.asar,查看代码发现mac更新使用了electron.autoUpdater,所以代理设置不生效。 我的解决方案是跳过autoUpdater,具体操作是:
-
编辑文件
/Users/admin/Library/Application\ Support/discord/settings.json,添加以下两个配置项:"SKIP_HOST_UPDATE": true, "SKIP_MODULE_UPDATE": true -
运行以下命令,添加代理参数:
/Applications/Discord.app/Contents/MacOS/Discord --proxy-server=127.0.0.1:7890 --ignore-certificate-errors