Repository navigation
[Other] Follow this computer's proxy, and keep state intact across a crash - #4435
Open
xvcezrqpbxtpzblrt wants to merge 3 commits into
Open
xvcezrqpbxtpzblrt wants to merge 3 commits into
xvcezrqpbxtpzblrt wants to merge 3 commits into
Conversation
|
Thanks for the pull request. To keep the tracker readable, every item needs an area prefix in the title and the parts of the pull request template filled in. This one is missing:
Edit the pull request (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment Details: CONTRIBUTING.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two problems, both in the host's own plumbing
1. Every outside request went straight out. Node's
fetchignores the proxy a Windows PC is set up to use, so on a machine behind Clash, a company proxy or an antivirus that scans HTTPS, downloads, update checks, model API calls and web search either failed or left without the proxy the person expected.server/net.mjsanswers one question - through which door does this request leave? - and then uses it: this computer's own addresses never go through a proxy; the saved choice (follow the system / direct / one address) comes next; following the system readsHTTPS_PROXY/NO_PROXY, then the Windows registry, then goes direct. The registry is read once per 30 s. A proxy that is set but does not answer is an error naming the proxy, never a quiet direct connection. Engine and connector downloads, model providers, the update check and web search all go through it.2. A power cut could truncate the small files the next start reads (job list, run configuration, workspaces, image models, upload index, skills, settings). They are now written to a temporary file, flushed, renamed, and a
.bakof the last good one is kept; a truncated file is never copied over that backup.Also in this branch, because they are the same layer: the host keeps the computer awake while a run, install or download is in progress (Windows
SetThreadExecutionState,caffeinate,systemd-inhibit;STRATA_NO_KEEP_AWAKE=1turns it off); a download refuses to start below 2 GiB free (and below the size of the model being installed); logs rotate at 64 MiB.Validation
node --test tests/net.test.mjs tests/offline-start.test.mjs tests/packaged-control.test.mjs tests/atomic-file.test.mjs tests/keep-awake.test.mjs tests/disk-space.test.mjs tests/log-files.test.mjs tests/durability.test.mjs→ 58 pass, 0 fail (this branch runs 27 of those files; the rest cover the same modules).On the machine used: the system proxy (
127.0.0.1:10090) is picked up, a real request through it answers,192.168.*/10.*/172.16-31.*are never sent to a proxy, and a truncated run configuration is reported with its line instead of starting an engine that dies on it.Limits
scutil); a PAC script is not executed - the setting says so.strata updatefrom the Terminal still uses its own proxy handling.