Repository navigation
Packs: compare destinations the way the gateway reads them; say what a rename brings - #361
Merged
Merged
Conversation
…a rename brings - destination() parses with the url crate, the parser reqwest uses: a backslash separates the path as it does when the request goes out, and hosts are normalized (case, punycode, IPv6/IPv4 forms) with default ports filled in. A trailing dot stays a different name. - Upstream addresses with a backslash or a user name/password before the host are refused (config.base_url_backslash, config.base_url_userinfo). - The outbound proxy an upstream goes through is part of its destination: direct, system, or the proxy's type and address. A different route keeps this machine's keys out. - ImportRow.rename_flags tells what an item brings when imported under another name (it never takes the keys or sign-ins here); the CLI says so. - A whole restore of a version from the sync location brings back the upstreams this machine does not sync, and what follows them, from the configuration here or the newest readable version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fylorn
force-pushed
the
feat/pack-fixes-3
branch
from
October 19, 2026 12:30
7b776af to
39682ed
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Third round of review fixes for reusing local secrets on import, plus a safe-mode restore gap.
Destinations
export::destination()now parses with theurlcrate, the same parser reqwest uses. A backslash separates the path exactly as it does when the request goes out (https://evil.example\@relay.example/v1isevil.example), hosts are normalized (case, IDN to punycode, IPv6 and IPv4 canonical forms), and default ports are filled in. A trailing dot is kept: a single-label name with and without it may resolve differently.config.base_url_backslash) or a user name or password before the host (config.base_url_userinfo; the message leaves the address out because that part is a password). A configuration that already has such an address loads in safe mode after the upgrade.direct,system, or the referenced proxy's type and address (looked up in the pack first, then here). Same address but a different route means the keys here are not reused.Import preview
ImportRow.rename_flags: ImportFlag[]lists the flags an item gets when imported under another name, which never takes the keys or sign-ins here. It is set on rows that havesuggested_nameand empty otherwise. The CLI prints it for conflicts and when a rename is chosen, and now prints flags for new items too.Restore
sync.excludeand the items that follow them (groups, routes, aliases, gateway keys), copied as written, sign-ins included, from the current text or the newest readable version. Plugins are not brought back.Tests
Regression tests: backslash and userinfo addresses (destination and import errors), destination normalization (case, default port, IDN, IPv6, IPv4 forms, trailing dot, userinfo), a new or moved outbound proxy versus the same proxy under another name, truthful rename flags in the preview and on the wire, and the safe-mode whole restore keeping non-synced upstreams with their routes and keys.
🤖 Generated with Claude Code