Skip to content

fix(config): a misspelled field under proxies is an error - #185

Merged
fylorn merged 1 commit into
mainfrom
fix/proxy-unknown-fields
Sep 24, 2026
Merged

fylorn merged 1 commit into
mainfrom
fix/proxy-unknown-fields

Conversation

@fylorn

@fylorn fylorn commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Every section of config.yaml refuses unknown fields (deny_unknown_fields) so a typo is reported rather than silently ignored. proxies[] and proxies[].auth were the exception: typ: http was dropped and the proxy was dialled as the default socks5h; passwd: was dropped and the proxy answered 407. Found while writing the configuration reference (#183), which states the rule for the whole file.

  • Proxy and ProxyAuth get #[serde(deny_unknown_fields)], with a test that the error names the misspelled field.
  • A tw-control test fixture wrote kind: http (the Rust field name; the YAML key is type), which had been silently ignored. Fixed.

The desktop app is unaffected: it saves proxies through the typed ProxyInput, not raw YAML.

🤖 Generated with Claude Code

Every other section of config.yaml refuses a field it does not know, so
a typo is reported instead of silently changing behavior. `proxies` and
`proxies[].auth` did not: `typ: http` was dropped and the proxy was
dialled as socks5h, and `passwd:` was dropped and the proxy answered 407,
with a file that looked right.

One test fixture was already hit by this: it wrote `kind: http` (the Rust
field name, not the YAML one), which was ignored. It now writes `type`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fylorn
fylorn force-pushed the fix/proxy-unknown-fields branch from 9685628 to e125590 Compare September 24, 2026 17:23
@fylorn
fylorn merged commit eee4d93 into main Sep 24, 2026
4 checks passed
@fylorn
fylorn deleted the fix/proxy-unknown-fields branch September 24, 2026 17:33
@fylorn fylorn mentioned this pull request Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant