native_network_proxy

Last updated:

0 purchases

native_network_proxy Image
native_network_proxy Images
Add to Cart

Description:

native network proxy

proxy_setting #
A Flutter plugin for getting system proxy setting.
Getting Started #
Sample Code
import 'package:proxy_setting/proxy_setting.dart';

Map<String, String>? proxy = await ProxySetting.getProxySettings();
String? proxyHost;
String? proxyPort;
if (proxy != null) {
proxyHost = proxy['host'];
proxyPort = proxy['port'];
}
(dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate =
(client) {
if (proxyHost != null && proxyPort != null) {
client.findProxy = (uri) => "PROXY $proxyHost:$proxyPort;";
}
client.badCertificateCallback =
(X509Certificate cert, String host, int port) => true;
};
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.