system_proxy_resolver

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

system proxy resolver

system_proxy_resolver #

A Dart Package to read proxy settings from the OS. With this plugin you can resolve proxy
setting for specific URL via PAC scripts.
system_proxy_resolver can be used in pure Dart as well!
Features #

✅ FFI implementation so that package can be used from any isolate without additional configuration
✅ Support for both pure Dart and Flutter projects
✅ iOS&macOS support via CFNetwork
✅ Windows support via WinHTTP
❌ Android support via IProxyService
❌ Linux support via libproxy

Usage #
final resolver = SystemProxyResolver();
print(resolver.getSystemProxySettings());
print(await resolver.getProxyForUrl(Uri.parse("https://pub.dev")));
copied to clipboard
Usage with delayed_proxy_http_client
final client = DelayedProxyHttpClient();
client.findProxyAsync = (url) async {
try {
final proxies = await proxyResolver.getProxyForUrl(url);
return proxies.map((e) => e.direct ? "DIRECT" : "PROXY ${e.host}:${e.port}").join("; ");
} on Object catch (e) {
return "DIRECT";
}
};

...
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.