mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-22 13:16:09 +03:00
fix something2
This commit is contained in:
parent
471e919161
commit
1c0290c57d
@ -5,7 +5,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:ProxySU"
|
xmlns:local="clr-namespace:ProxySU"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="ProxySU - v2.5.0 Beta1" Height="675" Width="660">
|
Title="ProxySU - v2.5.0 Beta2" Height="675" Width="660">
|
||||||
<!--以下样式参考自:https://yq.aliyun.com/articles/331878
|
<!--以下样式参考自:https://yq.aliyun.com/articles/331878
|
||||||
https://docs.microsoft.co/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
|
https://docs.microsoft.co/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
|
@ -8051,6 +8051,82 @@ namespace ProxySU
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 卸载Xay
|
||||||
|
|
||||||
|
//******"检测系统是否已经安装Xray......"******03
|
||||||
|
SetUpProgressBarProcessing(66);
|
||||||
|
currentStatus = Application.Current.FindResource("DisplayInstallInfo_TestExistSoft").ToString() + "Xray......";
|
||||||
|
MainWindowsShowInfo(currentStatus);
|
||||||
|
|
||||||
|
//sshShellCommand = @"find / -name v2ray";
|
||||||
|
//currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
functionResult = FileCheckExists(client, @"/usr/local/bin/xray");
|
||||||
|
if (functionResult == true)
|
||||||
|
{
|
||||||
|
//******"检测到已安装V2Ray!开始卸载Xray......"******
|
||||||
|
SetUpProgressBarProcessing(68);
|
||||||
|
currentStatus = Application.Current.FindResource("DisplayInstallInfo_DiscoverProxySoft").ToString()
|
||||||
|
+ "Xray!"
|
||||||
|
+ Application.Current.FindResource("DisplayInstallInfo_StartRemoveProxy").ToString()
|
||||||
|
+ "Xray......";
|
||||||
|
MainWindowsShowInfo(currentStatus);
|
||||||
|
|
||||||
|
sshShellCommand = @"systemctl stop xray";
|
||||||
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
|
saveShellScriptFileName = GenerateRandomScriptFileName(GenerateRandomStr(10));
|
||||||
|
|
||||||
|
sshShellCommand = $"curl -o {saveShellScriptFileName} https://raw.githubusercontent.com/XTLS/Xray-install/main/install-release.sh";
|
||||||
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
|
functionResult = FileCheckExists(client, $"{saveShellScriptFileName}");
|
||||||
|
if (functionResult == false)
|
||||||
|
{
|
||||||
|
//***文件下载失败!***
|
||||||
|
currentStatus = Application.Current.FindResource("DisplayInstallInfo_DownloadScriptFailed").ToString();
|
||||||
|
MainWindowsShowInfo(currentStatus);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sshShellCommand = $"bash {saveShellScriptFileName} --remove";
|
||||||
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
|
sshShellCommand = @"systemctl disable xray";
|
||||||
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
|
sshShellCommand = @"rm -rf /usr/local/etc/xray /var/log/xray";
|
||||||
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
|
sshShellCommand = $"rm -f {saveShellScriptFileName}";
|
||||||
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
|
functionResult = FileCheckExists(client, @"/usr/local/bin/xray");
|
||||||
|
if (functionResult == true)
|
||||||
|
//if (currentShellCommandResult.Contains("/usr/local/bin/v2ray") == true)
|
||||||
|
{
|
||||||
|
//******"V2Ray卸载失败!请向开发者问询!"******
|
||||||
|
currentStatus = "Xray" + Application.Current.FindResource("DisplayInstallInfo_RemoveProxySoftFailed").ToString();
|
||||||
|
MainWindowsShowInfo(currentStatus);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//******"V2Ray卸载成功!"******
|
||||||
|
SetUpProgressBarProcessing(70);
|
||||||
|
currentStatus = "Xray" + Application.Current.FindResource("DisplayInstallInfo_RemoveProxySoftSuccess").ToString();
|
||||||
|
MainWindowsShowInfo(currentStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//******"检测结果:未安装Xray!"******04
|
||||||
|
SetUpProgressBarProcessing(70);
|
||||||
|
currentStatus = Application.Current.FindResource("DisplayInstallInfo_NoInstalledSoft").ToString() + "Xray!";
|
||||||
|
MainWindowsShowInfo(currentStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
//如果是纯ipv6主机,则需要删除前面设置的Nat64网关
|
//如果是纯ipv6主机,则需要删除前面设置的Nat64网关
|
||||||
if (onlyIpv6 == true)
|
if (onlyIpv6 == true)
|
||||||
{
|
{
|
||||||
|
@ -2462,7 +2462,7 @@ namespace ProxySU
|
|||||||
private void XraySetVlessTcpXtls()
|
private void XraySetVlessTcpXtls()
|
||||||
{
|
{
|
||||||
GridNotTrojanParametersXray.Visibility = Visibility.Visible;
|
GridNotTrojanParametersXray.Visibility = Visibility.Visible;
|
||||||
TextBlockVmessOrVlessXray.Text = Application.Current.FindResource("TabItemHeaderXrayVlessProtocol").ToString();
|
TextBlockVmessOrVlessXray.Text = Application.Current.FindResource("TabItemHeaderV2RayVlessProtocol").ToString();
|
||||||
TextBlockVmessOrVlessXray.Visibility = Visibility.Visible;
|
TextBlockVmessOrVlessXray.Visibility = Visibility.Visible;
|
||||||
//隐藏下面的二维码显示
|
//隐藏下面的二维码显示
|
||||||
HideGroupBoxClientQRandURL();
|
HideGroupBoxClientQRandURL();
|
||||||
@ -2485,7 +2485,7 @@ namespace ProxySU
|
|||||||
private void XraySetVlessTcpTls()
|
private void XraySetVlessTcpTls()
|
||||||
{
|
{
|
||||||
GridNotTrojanParametersXray.Visibility = Visibility.Visible;
|
GridNotTrojanParametersXray.Visibility = Visibility.Visible;
|
||||||
TextBlockVmessOrVlessXray.Text = Application.Current.FindResource("TabItemHeaderXrayVlessProtocol").ToString();
|
TextBlockVmessOrVlessXray.Text = Application.Current.FindResource("TabItemHeaderV2RayVlessProtocol").ToString();
|
||||||
TextBlockVmessOrVlessXray.Visibility = Visibility.Visible;
|
TextBlockVmessOrVlessXray.Visibility = Visibility.Visible;
|
||||||
//隐藏下面的二维码显示
|
//隐藏下面的二维码显示
|
||||||
HideGroupBoxClientQRandURL();
|
HideGroupBoxClientQRandURL();
|
||||||
@ -2506,7 +2506,7 @@ namespace ProxySU
|
|||||||
private void XraySetVlessWsTls()
|
private void XraySetVlessWsTls()
|
||||||
{
|
{
|
||||||
GridNotTrojanParametersXray.Visibility = Visibility.Visible;
|
GridNotTrojanParametersXray.Visibility = Visibility.Visible;
|
||||||
TextBlockVmessOrVlessXray.Text = Application.Current.FindResource("TabItemHeaderXrayVlessProtocol").ToString();
|
TextBlockVmessOrVlessXray.Text = Application.Current.FindResource("TabItemHeaderV2RayVlessProtocol").ToString();
|
||||||
TextBlockVmessOrVlessXray.Visibility = Visibility.Visible;
|
TextBlockVmessOrVlessXray.Visibility = Visibility.Visible;
|
||||||
//隐藏下面的二维码显示
|
//隐藏下面的二维码显示
|
||||||
HideGroupBoxClientQRandURL();
|
HideGroupBoxClientQRandURL();
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user