entriesFor method
The routes for uri: null when no variable applies to its scheme,
[DIRECT] when noProxy matches, otherwise the configured proxy.
Implementation
List<ProxyEntry>? entriesFor(Uri uri) {
final proxy = switch (uri.scheme) {
'http' || 'ws' => httpProxy ?? allProxy,
'https' || 'wss' => httpsProxy ?? allProxy,
_ => allProxy,
};
if (proxy == null) return null;
if (noProxy.matches(uri)) return const [ProxyEntry.direct];
return [proxy];
}