1153850aca
While there, `.../internal/sessionresolver` => `.../sessionresolver` See https://github.com/ooni/probe/issues/2255
25 lines
1.2 KiB
Go
25 lines
1.2 KiB
Go
// Package sessionresolver contains the resolver used by the session. This
|
|
// resolver will try to figure out which is the best service for running
|
|
// domain name resolutions and will consistently use it.
|
|
//
|
|
// Occasionally this code will also swap the best resolver with other
|
|
// ~good resolvers to give them a chance to perform.
|
|
//
|
|
// The penalty/reward mechanism is strongly derivative, so the code should
|
|
// adapt ~quickly to changing network conditions. Occasionally, we will
|
|
// have longer resolutions when trying out other resolvers.
|
|
//
|
|
// At the beginning we randomize the known resolvers so that we do not
|
|
// have any preferential ordering. The initial resolutions may be slower
|
|
// if there are many issues with resolvers.
|
|
//
|
|
// The system resolver is given the lowest priority at the beginning
|
|
// but it will of course be the most popular resolver if anything else
|
|
// is failing us. (We will still occasionally probe for other working
|
|
// resolvers and increase their score on success.)
|
|
//
|
|
// We also support a socks5 proxy. When such a proxy is configured,
|
|
// the code WILL skip http3 resolvers AS WELL AS the system
|
|
// resolver, in an attempt to avoid leaking your queries.
|
|
package sessionresolver
|