mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
add option to ignore certificate errors (#46)
add option to ignore certificate errors
This commit is contained in:
@@ -38,14 +38,11 @@ class _ProxySettingView extends StatefulWidget {
|
||||
|
||||
class _ProxySettingViewState extends State<_ProxySettingView> {
|
||||
String type = '';
|
||||
|
||||
String host = '';
|
||||
|
||||
String port = '';
|
||||
|
||||
String username = '';
|
||||
|
||||
String password = '';
|
||||
bool ignoreCertificateErrors = false;
|
||||
|
||||
// USERNAME:PASSWORD@HOST:PORT
|
||||
String toProxyStr() {
|
||||
@@ -103,6 +100,7 @@ class _ProxySettingViewState extends State<_ProxySettingView> {
|
||||
void initState() {
|
||||
var proxy = appdata.settings['proxy'];
|
||||
parseProxyString(proxy);
|
||||
ignoreCertificateErrors = appdata.settings['ignoreCertificateErrors'] ?? false;
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@@ -148,6 +146,17 @@ class _ProxySettingViewState extends State<_ProxySettingView> {
|
||||
},
|
||||
),
|
||||
if (type == 'manual') buildManualProxy(),
|
||||
SwitchListTile(
|
||||
title: Text("Ignore Certificate Errors".tl),
|
||||
value: ignoreCertificateErrors,
|
||||
onChanged: (v) {
|
||||
setState(() {
|
||||
ignoreCertificateErrors = v;
|
||||
});
|
||||
appdata.settings['ignoreCertificateErrors'] = ignoreCertificateErrors;
|
||||
appdata.saveData();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user