ostp/ostp-client
ospab 8907f506c7 feat(migrate): normalize any config to a clean, canonical, lossless form
`ostp migrate` now finishes every kind (client/server/relay) with a uniform
normalization pass so a messy config.json becomes a clean one:

- Concise: null-valued keys are stripped at every nesting level. A JSON null
  means "unset", so it is noise; removing it never loses real data (a set value
  is never null). Empty [] / {} are kept — they carry intent.
- Canonical order: free. serde_json serializes object keys sorted, so any
  rewrite comes out stably ordered regardless of how disordered the input was.
- No data loss: normalization works on the JSON value and only removes nulls, so
  fields the schema has never heard of survive verbatim — proven by a test.

This also fixes the "configs stay old even after ostp migrate" complaint: the
normalize pass flips report.changed when it removes anything, so a config that
was current-but-noisy actually gets rewritten clean instead of "nothing to
migrate".

Adds a forcing function: a test that the exact shapes `ostp init` / the wizard
emit (client, server, relay — including the new outbound username/password) are
already canonical, so migrate is a no-op on them. If a template or the schema
gains a field without the migrator being taught, this fails instead of shipping
a config that `ostp migrate` keeps trying to "fix". Plus tests for strip/keep,
idempotency, and unknown-field preservation.
2026-08-24 15:40:07 +03:00
..
src feat(migrate): normalize any config to a clean, canonical, lossless form 2026-08-24 15:40:07 +03:00
Cargo.toml §A: remove WSS + Reality (TLS-mimicry); bump to 0.4.0 / AGPL-3.0 2026-06-27 16:29:42 +03:00
test_udp.rs fix: remove DNS interception on server, fix TUN routing on Windows and Linux 2026-05-28 12:30:06 +03:00