-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #184: Use electron/net
instead of https
to download updates.
#187
base: main
Are you sure you want to change the base?
Conversation
…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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this use net.request
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.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.Yeah and I did one of the todos:
net utilities are now centralized.