opt.: disable it on iOS

This commit is contained in:
lollipopkit🏳️‍⚧️
2025-10-25 20:37:14 +08:00
parent b6ab8f1db5
commit 92a4601335
4 changed files with 36 additions and 6 deletions

View File

@@ -267,7 +267,7 @@ extension _Actions on _ServerEditPageState {
// ProxyCommand configuration
ProxyCommandConfig? proxyCommand;
if (_proxyCommandEnabled.value) {
if (!Platform.isIOS && _proxyCommandEnabled.value) {
final command = _proxyCommandController.text.trim();
if (command.isEmpty) {
context.showSnackBar('ProxyCommand is enabled but command is empty');
@@ -292,6 +292,9 @@ extension _Actions on _ServerEditPageState {
requiresExecutable: requiresExecutable,
executableName: requiresExecutable ? executable : null,
);
} else if (Platform.isIOS && _proxyCommandEnabled.value) {
context.showSnackBar('ProxyCommand is not supported on iOS');
return;
}
final spi = Spi(
@@ -483,7 +486,7 @@ extension _Utils on _ServerEditPageState {
// Load ProxyCommand configuration
final proxyCommand = spi.proxyCommand;
if (proxyCommand != null) {
if (proxyCommand != null && !Platform.isIOS) {
_proxyCommandEnabled.value = true;
_proxyCommandController.text = proxyCommand.command;
_proxyCommandTimeout.value = proxyCommand.timeout.inSeconds;
@@ -502,5 +505,12 @@ extension _Utils on _ServerEditPageState {
_proxyCommandTimeout.value = 30;
_proxyCommandPreset.value = null;
}
if (Platform.isIOS) {
_proxyCommandEnabled.value = false;
_proxyCommandController.text = '';
_proxyCommandTimeout.value = 30;
_proxyCommandPreset.value = null;
}
}
}