Add option to ignore certificate errors. Close #485

This commit is contained in:
2025-08-24 19:19:40 +08:00
parent 38a5b2b8cf
commit ac13807ef4
4 changed files with 10 additions and 2 deletions

View File

@@ -190,6 +190,7 @@ class Settings with ChangeNotifier {
'reverseChapterOrder': false,
'showSystemStatusBar': false,
'comicSpecificSettings': <String, Map<String, dynamic>>{},
'ignoreBadCertificate': false,
};
operator [](String key) {

View File

@@ -173,6 +173,7 @@ class RHttpAdapter implements HttpClientAdapter {
dnsSettings: rhttp.DnsSettings.static(overrides: _getOverrides()),
tlsSettings: rhttp.TlsSettings(
sni: appdata.settings['sni'] != false,
verifyCertificates: appdata.settings['ignoreBadCertificate'] != true,
),
);
}

View File

@@ -31,6 +31,10 @@ class DebugPageState extends State<DebugPage> {
},
actionTitle: 'Open'.tl,
).toSliver(),
_SwitchSetting(
title: "Ignore Certificate Errors".tl,
settingKey: "ignoreBadCertificate",
).toSliver(),
SliverToBoxAdapter(
child: Column(
children: [