Remove request validate certificate

Sync core
This commit is contained in:
chen08209
2024-07-18 21:28:27 +08:00
parent ec2890cab2
commit f2aa8851ae
6 changed files with 74 additions and 80 deletions

View File

@@ -149,7 +149,6 @@ class ApplicationState extends State<Application> {
builder: (lightDynamic, darkDynamic) {
_updateSystemColorSchemes(lightDynamic, darkDynamic);
return MaterialApp(
debugShowCheckedModeBanner: false,
navigatorKey: globalState.navigatorKey,
localizationsDelegates: const [
AppLocalizations.delegate,

View File

@@ -19,14 +19,14 @@ class Request {
_dio.interceptors.add(
InterceptorsWrapper(
onRequest: (options, handler) {
_syncProxy();
_updateAdapter();
return handler.next(options); // 继续请求
},
),
);
}
_syncProxy() {
_updateAdapter() {
final port = globalState.appController.clashConfig.mixedPort;
final isStart = globalState.appController.appState.isStart;
if (_port != port || isStart != _isStart) {
@@ -41,6 +41,7 @@ class Request {
};
return client;
},
validateCertificate: (_, __, ___) => true,
);
}
}