Compare commits

..

No commits in common. "916055d8bdd5c067f56d95c9643fd639210ed122" and "da3d4c36a9931df6b9f3ca1402b0adbd1c0b2df5" have entirely different histories.

7 changed files with 17 additions and 58 deletions

View file

@ -14,6 +14,5 @@ public enum ECoreType
hysteria2 = 26,
brook = 27,
overtls = 28,
shadowquic = 29,
v2rayN = 99
}

View file

@ -507,7 +507,6 @@ public class Global
{ ECoreType.juicity, "juicity/juicity" },
{ ECoreType.brook, "txthinking/brook" },
{ ECoreType.overtls, "ShadowsocksR-Live/overtls" },
{ ECoreType.shadowquic, "spongebob888/shadowquic" },
{ ECoreType.v2rayN, "2dust/v2rayN" },
};

View file

@ -200,15 +200,6 @@ public sealed class CoreInfoHandler
Arguments = "-r client -c {0}",
Url = GetCoreUrl(ECoreType.overtls),
AbsolutePath = false,
},
new CoreInfo
{
CoreType = ECoreType.shadowquic,
CoreExes = [ "shadowquic", "shadowquic"],
Arguments = "-c {0}",
Url = GetCoreUrl(ECoreType.shadowquic),
AbsolutePath = false,
}
];

View file

@ -29,6 +29,9 @@ set_gnome_proxy() {
echo "Ignored Hosts: $IGNORE_HOSTS"
elif [ "$MODE" == "none" ]; then
echo "GNOME: Proxy disabled."
else
echo "GNOME: Invalid mode. Use 'none' or 'manual'."
exit 1
fi
}
@ -66,6 +69,9 @@ set_kde_proxy() {
# Disable proxy
$KWRITECONFIG --file kioslaverc --group "Proxy Settings" --key ProxyType 0
echo "KDE: Proxy disabled."
else
echo "KDE: Invalid mode. Use 'none' or 'manual'."
exit 1
fi
# Apply changes by restarting KDE's network settings
@ -111,15 +117,6 @@ detect_desktop_environment() {
return
fi
done
# Fallback to GNOME method if CLI utility is available. This solves the
# proxy configuration issues on minimal installation systems, like setups
# with only window managers, that borrow some parts from big DEs.
if command -v gsettings >/dev/null 2>&1; then
echo "gnome"
return
fi
echo "unsupported"
}
@ -137,11 +134,6 @@ PROXY_IP=$2
PROXY_PORT=$3
IGNORE_HOSTS=$4
if ! [[ "$MODE" =~ ^(manual|none)$ ]]; then
echo "Invalid mode. Use 'none' or 'manual'." >&2
exit 1
fi
# Detect desktop environment
DE=$(detect_desktop_environment)
@ -152,6 +144,6 @@ elif [ "$DE" == "kde" ]; then
set_gnome_proxy "$MODE" "$PROXY_IP" "$PROXY_PORT" "$IGNORE_HOSTS"
set_kde_proxy "$MODE" "$PROXY_IP" "$PROXY_PORT" "$IGNORE_HOSTS"
else
echo "Unsupported desktop environment: $DE" >&2
echo "Unsupported desktop environment: $DE"
exit 1
fi

View file

@ -34,8 +34,6 @@ public class StatusBarViewModel : MyReactiveObject
public ReactiveCommand<Unit, Unit> SubUpdateViaProxyCmd { get; }
public ReactiveCommand<Unit, Unit> CopyProxyCmdToClipboardCmd { get; }
public ReactiveCommand<Unit, Unit> NotifyLeftClickCmd { get; }
public ReactiveCommand<Unit, Unit> ShowWindowCmd { get; }
public ReactiveCommand<Unit, Unit> HideWindowCmd { get; }
#region System Proxy
@ -93,9 +91,6 @@ public class StatusBarViewModel : MyReactiveObject
[Reactive]
public bool EnableTun { get; set; }
[Reactive]
public bool BlIsNonWindows { get; set; }
#endregion UI
public StatusBarViewModel(Func<EViewAction, object?, Task<bool>>? updateView)
@ -105,7 +100,6 @@ public class StatusBarViewModel : MyReactiveObject
SelectedServer = new();
RunningServerToolTipText = "-";
BlSystemProxyPacVisible = Utils.IsWindows();
BlIsNonWindows = Utils.IsNonWindows();
if (_config.TunModeItem.EnableTun && AllowEnableTun())
{
@ -149,21 +143,11 @@ public class StatusBarViewModel : MyReactiveObject
Locator.Current.GetService<MainWindowViewModel>()?.ShowHideWindow(null);
await Task.CompletedTask;
});
ShowWindowCmd = ReactiveCommand.CreateFromTask(async () =>
{
Locator.Current.GetService<MainWindowViewModel>()?.ShowHideWindow(true);
await Task.CompletedTask;
});
HideWindowCmd = ReactiveCommand.CreateFromTask(async () =>
{
Locator.Current.GetService<MainWindowViewModel>()?.ShowHideWindow(false);
await Task.CompletedTask;
});
AddServerViaClipboardCmd = ReactiveCommand.CreateFromTask(async () =>
{
await AddServerViaClipboard();
});
{
await AddServerViaClipboard();
});
AddServerViaScanCmd = ReactiveCommand.CreateFromTask(async () =>
{
await AddServerViaScan();

View file

@ -32,15 +32,7 @@
ToolTipText="{Binding RunningServerToolTipText}">
<TrayIcon.Menu>
<NativeMenu>
<NativeMenuItem
Command="{Binding ShowWindowCmd}"
Header="{x:Static resx:ResUI.TbDisplayGUI}"
IsVisible="{Binding BlIsNonWindows}" />
<NativeMenuItem
Command="{Binding NotifyLeftClickCmd}"
Header="{x:Static resx:ResUI.menuShowOrHideMainWindow}"
IsVisible="{Binding BlIsNonWindows}" />
<NativeMenuItem Command="{Binding CopyProxyCmdToClipboardCmd}" Header="{x:Static resx:ResUI.menuCopyProxyCmdToClipboard}" />
<NativeMenuItem Command="{Binding NotifyLeftClickCmd}" Header="{x:Static resx:ResUI.menuShowOrHideMainWindow}" />
<NativeMenuItemSeparator />
<NativeMenuItem
Command="{Binding SystemProxyClearCmd}"
@ -68,6 +60,8 @@
<NativeMenuItem Command="{Binding SubUpdateCmd}" Header="{x:Static resx:ResUI.menuSubUpdate}" />
<NativeMenuItem Command="{Binding SubUpdateViaProxyCmd}" Header="{x:Static resx:ResUI.menuSubUpdateViaProxy}" />
<NativeMenuItemSeparator />
<NativeMenuItem Command="{Binding CopyProxyCmdToClipboardCmd}" Header="{x:Static resx:ResUI.menuCopyProxyCmdToClipboard}" />
<NativeMenuItemSeparator />
<NativeMenuItem Click="MenuExit_Click" Header="{x:Static resx:ResUI.menuExit}" />
</NativeMenu>
</TrayIcon.Menu>