Fix #184: Use electron/net instead of https to download updates.#187
Fix #184: Use electron/net instead of https to download updates.#187Richardn2002 wants to merge 4 commits intoGooseMod:mainfrom
electron/net instead of https to download updates.#187Conversation
…pdates. At least I can confirm that `versions.json` retrieval uses proxy now (so that I can boot discord). But I do not know how to force a self-update or modules update, so rest of the update functionalities are untested, for now.
|
wait there is one crazy mistake, hang on, will commit again soon |
|
I have been using my branch for two weeks and I have observed it correctly updating modules and detecting that Discord 0.60.0 has shipped. |
src/utils/get.js
Outdated
| // returns a promise that resolves to [statusCode, Buffer, headers] | ||
| // [code, null, null] if request failed | ||
| module.exports = async (url) => { | ||
| const request = new Request(url, { |
There was a problem hiding this comment.
shouldn't this use net.request?
There was a problem hiding this comment.
You can review the current design choice I made. A get utility returning Promises that resolves to response data, and a more sophisticated request utility if more fine-grained control is needed.
With a new networking utility `request`, trying to simplify the confusing `net.request()` interface.
|
As a note, I now find that I indeed can force a hot update by removing the |
|
Hi, is there any chance that this could still get merged? I'm interested in this because due to OpenAsar using the |
At least I can confirm that
versions.jsonretrieval uses proxy now (so that I can boot discord). But I do not know how to force a self-update or modules update, so rest of the update functionalities are untested, for now.Yeah and I did one of the todos:
net utilities are now centralized.