feat: add net module to utility process#40017
Conversation
|
💖 Thanks for opening this pull request! 💖 We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of commit messages with semantic prefixes:
Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
b8652aa to
1927064
Compare
MarshallOfSound
left a comment
There was a problem hiding this comment.
Haven't reviewed the content here but a question for folks with opinions @deepak1556 maybe.
I believe that shell/common is supposed to imply that code inside can run in any process, moving the net stuff into common would imply it would work in the renderer process which I don't think is correct 🤔 Thoughts on where this code should live?
|
I couldn't suggest a better home with the current directory structure, but maybe following options can also be considered
|
eaaedf5 to
36ff581
Compare
|
Alright all of the planned follow items are completed here. For Any reviews or guidance through the process is much appreciated! 🙏 |
|
Some unrelated changed get pulled in to |
Sure thing @dsanders11, opened #40264 |
Oh it might be better left as part of this PR actually. Otherwise there are no utility process modules documented and the typescript definition generation fails. |
Can |
👍 On it! |
|
36ff581 to
5080163
Compare
ddd45e0 to
ed15470
Compare
|
@devm33 looks like the newly added test is failing on linux: https://app.circleci.com/pipelines/github/electron/electron/76406/workflows/f315658a-de1f-4549-93c1-52080f4d7300/jobs/1637154 |
9a5982e to
e11b9b3
Compare
|
Release Notes Persisted
|
|
I have automatically backported this PR to "29-x-y", please check out #40890 |
|
/trop run backport-to 28-x-y |
|
The backport process for this PR has been manually initiated - sending your PR to |
|
I have automatically backported this PR to "28-x-y", please check out #40967 |
feat: add net module to utility process (#40017) Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
feat: add net module to utility process (#40017) Co-authored-by: Milan Burda <[email protected]>
Description of Change
Adds electron.net module to the utility-process. This enables making network calls from the utility process with the full capabilities of Chromium's native networking instead of the Node.js implementation. Example benefits include system TLS certificates, system proxy settings, support for basic, digest, NTLM, Kerberos, and negotiate authentication schemes.
The current net API in the main process requires any request from the utility process to be proxied via the main process UI thread. This PR makes it that main process establishes the
URLLoaderFactoryconnection with the Network service and passes the remote endpoint to the utility process allowing it make requests directly with the Network service. This is borrowed on the same principle as renderer process perform today to make network requests.Closes microsoft/vscode#192899
CC @deepak1556
Note: opening this with some remaining clean up work todo in order to get early feedback.RemainingCompleted clean up work:electron/utilitymodule to docs-parser and typescript-definitions repos @devm33electron/utilitymodule is available @deepak1556loader_params->process_idto use utility process pid instead ofkBrowserProcessId@devm33electron_api_net.ccfrom browser to common and rename linked binding @devm33Checklist
npm testpassesRelease Notes
Notes: Added net module to utility process.