Commit 58fffe1
fix(dns): a proxy this run started is a proxy it can trust (#481)
Proxy detection asked the proxy for a certificate under `a.<ending>`, and the
proxy will not present one for a name with no key published in the registry.
That refusal is deliberate — it produces a TLS failure a browser can explain
rather than a reset mid-request — and `dns enable` has no way to invent a name
somebody has registered, because the registry lists endings and not names.
`a.<ending>` is the best it could construct, and that is precisely the shape the
proxy refuses.
So the check could not pass on a correctly configured machine. Three lines
apart, both true as written:
ok proxy holds 127.0.0.1:443
-- no pinned-TLS proxy on this machine
The bridge was then started without proxy mode, so every Moshpit name answered
its origin directly and a stock client got a certificate no CA had signed — on a
machine that had, in the same run, installed the proxy, started it, watched it
take the port, and installed the local root into the system trust store.
v0.88.0 made the probe name parseable, which moved the failure from
ERR_INVALID_URL to ERR_TLS_CERT_ALTNAME_INVALID and no further: a name that
parses is still a name with no pin.
The probe was the wrong instrument. It exists for a proxy that something else
installed, where the question is genuinely open. It is not the question here:
this run wrote the unit, restarted it, and confirmed the port held. That is
stronger evidence of whose proxy it is than any handshake, so it is used, and
the probe is kept for the case it was written for.
Three tests, driving `dns enable` rather than the helper: a proxy this run
started turns proxy mode on and the bridge is checked to have actually been told
(`proxy: "127.0.0.1"` — without that names still answer their origin); a proxy
it did not start is still probed; and no proxy at all still brings DNS up,
because an optional component must never cost a machine its resolver.
Suite: 2768 tests, 0 failures.
Known and not fixed here: a bridge that is already running keeps the mode it
started with, so on a machine where one is up this takes effect on the next
restart of it rather than immediately.
Claude-Session: https://claude.ai/code/session_01ThnQwoieWt8VR6N7gtgnhp
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 4125b03 commit 58fffe1
2 files changed
Lines changed: 91 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3294 | 3294 | | |
3295 | 3295 | | |
3296 | 3296 | | |
| 3297 | + | |
3297 | 3298 | | |
3298 | 3299 | | |
3299 | 3300 | | |
| |||
3306 | 3307 | | |
3307 | 3308 | | |
3308 | 3309 | | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
3309 | 3314 | | |
3310 | 3315 | | |
3311 | 3316 | | |
| |||
3363 | 3368 | | |
3364 | 3369 | | |
3365 | 3370 | | |
| 3371 | + | |
| 3372 | + | |
| 3373 | + | |
| 3374 | + | |
| 3375 | + | |
| 3376 | + | |
| 3377 | + | |
| 3378 | + | |
| 3379 | + | |
| 3380 | + | |
| 3381 | + | |
| 3382 | + | |
| 3383 | + | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
| 3388 | + | |
| 3389 | + | |
| 3390 | + | |
3366 | 3391 | | |
3367 | 3392 | | |
3368 | 3393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
0 commit comments