Repository navigation
fix(settings): no gateway-wide concurrency limits, a written-out default allow list, one row per interface - #104
Merged
Conversation
…ult allow list, one row per interface - The gateway no longer has limits of its own: `limits` (per upstream, queue depth, queue timeout) is gone from the configuration and the overview, and so is the `overloaded` failure source. The only limit left is a key's own `max_concurrent`; requests over it wait with no deadline, and a limit changed in the configuration is applied to the running count instead of starting a fresh semaphore. A limit of 0 is a validation error, since every request would wait forever. - The allow list is exactly what is written. Leaving it out means the private ranges (10/8, 172.16/12, 192.168/16, fc00::/7); an empty list means only this machine. `ListenView` carries the default list for a restore action, and `PUT /listen` writes `allow_from: []` for an empty list and nothing for the default one. - `GET /interfaces` gives one row per interface, with the address the gateway listens on when bound to it (IPv4 first), from the same function `Bind::resolve` uses. An interface that exists without an address is now reported as such instead of as missing. Control API version 9. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Merged
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.
Three settings in the app did not match what the gateway should do. This fixes them in core, so the app can show them as they are.
No gateway-wide concurrency limits
The settings page had a "Concurrency" section (per upstream 8, queue 64, queue timeout 30 s). A local gateway serves the sessions the user opened on this computer, and a ceiling on them only holds back the user's own parallel work. The section is removed from the app, so the limits are removed from core:
limitsis gone fromconfig.yamland from the overview (LimitsView). So is theoverloadedfailure source: the gateway never refuses a request for load.max_concurrentstays. Requests over it wait with no deadline. The client decides how long to wait, and it stops waiting when it disconnects.max_concurrent: 0is a validation error, because every request with that key would wait forever.The allow list is what is written
allow_fromhad a hidden rule: empty meant "the private ranges". The app showed an empty box while four ranges were allowed, and removing the last entry brought the defaults back.allow_fromis not written, it is the private ranges:10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,fc00::/7. The loopback entries are dropped from the list because this machine is always let in.ListenViewcarriesdefault_allow_fromso the app can offer a restore action.PUT /listenwritesallow_from: []for an empty list. It writes nothing when the list equals the default.ListenSave.allow_fromis now required.One row per interface
GET /interfaceslisted each address, soen0appeared once for IPv4 and once for IPv6. The configuration stores the name, so choosing the second row saved the same thing as the first.nics::by_nameprovides this, andBind::resolveuses the same function.NicHasNoAddr, not as missing. That branch could not be reached before.Control API version 9.
Checks
cargo fmt --all,cargo clippy --workspace --all-targets --locked -- -D warningscargo test --workspace --locked(proxy variables unset): 1542 passed./scripts/smoke.sh: 51 passed, 0 failed. Memory was 36 MB against the 30 MB target, which is within the 40 MB regression bound.🤖 Generated with Claude Code