var options = new ParallelOptions
{
    MaxDegreeOfParallelism = 8,
    CancellationToken = cancellationToken
};
await Parallel.ForEachAsync(endpoints, options,
    async (endpoint, token) =>
    {
        var result = await ProbeAsync(endpoint, target, token);
        observations.Add(result);
    });

Use a bounded worker pool rather than launching one task for every endpoint. For checks against permitted public targets, the free proxy list supplies candidate rows; preserve each entry’s protocol when constructing the probe. This .NET scheduling fragment assumes a proxy-aware ProbeAsync and thread-safe observations collector. Eight is an illustrative bound, not a measured optimum. The probe still needs per-attempt limits and whole-job cancellation.

Keep every completed result with its input even when completion order differs. Record protocol, endpoint, target, method, elapsed time and outcome. Connection failure, proxy login rejection, denied CONNECT and a received website response are different observations.

A TCP port opening does not establish proxy negotiation. Fetching the proxy address as a website is also different from using it to request the target.

Choose the target and method for the required capability. HEAD can save body traffic but does not prove GET returns useful content; a site can reject one and allow the other. HTTPS adds CONNECT and destination TLS absent from plain HTTP. An exit address is another destination-side observation, separate from the configured entrance.

Bounded work keeps the checker from exhausting its own sockets, memory or scheduler before it can assess the route. A staged result remains useful to selection policy without pretending one successful destination makes an endpoint universally good.

འབྲེལ་བའི་རྩོམ་ཡིག