This commit is contained in:
2025-01-06 10:15:23 +08:00
parent 1ca8da1c83
commit a747179cc4
3 changed files with 8 additions and 0 deletions

View File

@@ -149,6 +149,7 @@ class _Settings with ChangeNotifier {
'dnsOverrides': {},
'enableCustomImageProcessing': false,
'customImageProcessing': _defaultCustomImageProcessing,
'sni': true,
};
operator [](String key) {

View File

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

View File

@@ -285,6 +285,10 @@ class __DNSOverridesState extends State<_DNSOverrides> {
title: "Enable DNS Overrides".tl,
settingKey: "enableDnsOverrides",
),
_SwitchSetting(
title: "Server Name Indication",
settingKey: "sni",
),
const SizedBox(height: 8),
Container(
height: 1,