Resolve URLs by using multiple services#542
Conversation
This PR has an intention of resolving URLs by using multiple endpoints that identify an IP address of the service. This is handy if one service is blocked for some reason. The detection mechanism follows this logic: 1. It tries to access all services in parallel 2. If service respond with some error (like, no route to host for IPv6), then we accurately collect those errors and return a merged one 3. In case of the first IP resolved, we immediately return it. Also, this PR refactors how access and SNI check are performed.
069fb08 to
2145159
Compare
|
CI is green across the board and this One behavioral regression I want to flag before this lands, in Both family goroutines now share a single ip, err = getIP(ctx, ntw, "tcp6")
if err != nil {
cancelCause(err)
}Consider a secret host with both A and AAAA records on a server with IPv4-only egress (a common setup). The tcp6 goroutine's
Both callers treat that error as fatal: On master this was graceful per-family degradation (the behavior #505/#528 settled on): I checked this against both branches with a small harness driving the real Minimal fix, your call on the shape: give each family its own derived context (so one family's Two smaller notes:
|
This PR has an intention of resolving URLs by using multiple endpoints that identify an IP address of the service. This is handy if one service is blocked for some reason.
The detection mechanism follows this logic:
Also, this PR refactors how access and SNI check are performed.
Closes #529