diff --git a/ProxySU_Core/Models/Developers/Project.cs b/ProxySU_Core/Models/Developers/Project.cs
index c0bc53a..414f3ad 100644
--- a/ProxySU_Core/Models/Developers/Project.cs
+++ b/ProxySU_Core/Models/Developers/Project.cs
@@ -357,29 +357,16 @@ namespace ProxySU_Core.Models.Developers
RunCmd("rm -rf caddy_install.sh");
RunCmd("curl -o caddy_install.sh https://raw.githubusercontent.com/proxysu/shellscript/master/Caddy-Naive/caddy-naive-install.sh");
RunCmd("yes | bash caddy_install.sh");
+ RunCmd("rm -rf caddy_install.sh");
+ }
- //if (CmdType == CmdType.Apt)
- //{
- // RunCmd("sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https");
- // RunCmd("curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo apt-key add -");
- // RunCmd("curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee -a /etc/apt/sources.list.d/caddy-stable.list");
- // RunCmd(GetUpdateCmd());
- // RunCmd("sudo apt install caddy");
- //}
- //else if (CmdType == CmdType.Dnf)
- //{
- // RunCmd("echo y | dnf install 'dnf-command(copr)'");
- // RunCmd("echo y | dnf copr enable @caddy/caddy");
- // RunCmd(GetUpdateCmd());
- // RunCmd("dnf install caddy");
- //}
- //else if (CmdType == CmdType.Yum)
- //{
- // RunCmd("echo y | echo y | yum install yum-plugin-copr");
- // RunCmd("echo y | echo y | yum copr enable @caddy/caddy");
- // RunCmd(GetUpdateCmd());
- // RunCmd("yum install caddy");
- //}
+ protected void UninstallCaddy()
+ {
+ RunCmd("rm -rf caddy_install.sh");
+ RunCmd("curl -o caddy_install.sh https://raw.githubusercontent.com/proxysu/shellscript/master/Caddy-Naive/caddy-naive-install.sh");
+ RunCmd("yes | bash caddy_install.sh uninstall");
+ RunCmd("rm -rf caddy_install.sh");
+ RunCmd("rm -rf /usr/share/caddy");
}
diff --git a/ProxySU_Core/Models/Developers/XrayProject.cs b/ProxySU_Core/Models/Developers/XrayProject.cs
index 4c65360..309f5fe 100644
--- a/ProxySU_Core/Models/Developers/XrayProject.cs
+++ b/ProxySU_Core/Models/Developers/XrayProject.cs
@@ -69,7 +69,7 @@ namespace ProxySU_Core.Models.Developers
ConfigureFirewall();
WriteOutput("防火墙配置完成");
- WriteOutput("同步系统和本地世间...");
+ WriteOutput("同步系统和本地时间...");
SyncTimeDiff();
WriteOutput("时间同步完成");
@@ -96,10 +96,25 @@ namespace ProxySU_Core.Models.Developers
}
catch (Exception ex)
{
- MessageBox.Show("安装终止," + ex.Message);
+ var errorLog = "安装终止," + ex.Message;
+ WriteOutput(errorLog);
+ MessageBox.Show(errorLog);
}
}
+ public void Uninstall()
+ {
+ EnsureRootAuth();
+ WriteOutput("卸载Caddy");
+ UninstallCaddy();
+ WriteOutput("卸载Xray");
+ UninstallXray();
+ WriteOutput("卸载证书");
+ UninstallAcme();
+
+ WriteOutput("************ 卸载完成 ************");
+ }
+
///
/// 更新xray内核
///
@@ -286,12 +301,24 @@ namespace ProxySU_Core.Models.Developers
}
+ private void UninstallXray()
+ {
+ RunCmd("bash -c \"$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)\" @ remove");
+ }
+
+ private void UninstallAcme()
+ {
+ RunCmd("acme.sh --uninstall");
+ RunCmd("rm -r ~/.acme.sh");
+ }
+
private void InstallXrayWithCert()
{
RunCmd("bash -c \"$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)\" @ install");
if (!FileExists("/usr/local/bin/xray"))
{
+ WriteOutput("Xray-Core安装失败,请联系开发者");
throw new Exception("Xray-Core安装失败,请联系开发者");
}
@@ -333,6 +360,7 @@ namespace ProxySU_Core.Models.Developers
}
else
{
+ WriteOutput("安装 acme.sh 失败,请联系开发者!");
throw new Exception("安装 acme.sh 失败,请联系开发者!");
}
@@ -357,6 +385,7 @@ namespace ProxySU_Core.Models.Developers
}
else
{
+ WriteOutput("申请证书失败,请联系开发者!");
throw new Exception("申请证书失败,请联系开发者!");
}
@@ -370,6 +399,7 @@ namespace ProxySU_Core.Models.Developers
}
else
{
+ WriteOutput("安装证书失败,请联系开发者!");
throw new Exception("安装证书失败,请联系开发者!");
}
diff --git a/ProxySU_Core/Templates/xray/server/05_inbounds/VLESS_TCP_XTLS.json b/ProxySU_Core/Templates/xray/server/05_inbounds/VLESS_TCP_XTLS.json
index d8cddd9..eab8363 100644
--- a/ProxySU_Core/Templates/xray/server/05_inbounds/VLESS_TCP_XTLS.json
+++ b/ProxySU_Core/Templates/xray/server/05_inbounds/VLESS_TCP_XTLS.json
@@ -15,7 +15,11 @@
"network": "tcp",
"security": "xtls",
"xtlsSettings": {
- "alpn": [ "h2", "http/1.1" ],
+ "allowInsecure": false,
+ "minVersion": "1.2",
+ "alpn": [
+ "http/1.1"
+ ],
"certificates": [
{
"certificateFile": "/usr/local/etc/xray/ssl/xray_ssl.crt",
diff --git a/ProxySU_Core/ViewModels/XraySettingsViewModel.cs b/ProxySU_Core/ViewModels/XraySettingsViewModel.cs
index f11d618..3f81ca1 100644
--- a/ProxySU_Core/ViewModels/XraySettingsViewModel.cs
+++ b/ProxySU_Core/ViewModels/XraySettingsViewModel.cs
@@ -23,7 +23,11 @@ namespace ProxySU_Core.ViewModels
public string UUID
{
get => settings.UUID;
- set => settings.UUID = value;
+ set
+ {
+ settings.UUID = value;
+ Notify("UUID");
+ }
}
public string Domain
diff --git a/ProxySU_Core/Views/ClientInfoWindow.xaml b/ProxySU_Core/Views/ClientInfoWindow.xaml
index 3380bc7..a20fb09 100644
--- a/ProxySU_Core/Views/ClientInfoWindow.xaml
+++ b/ProxySU_Core/Views/ClientInfoWindow.xaml
@@ -254,7 +254,7 @@
+ Header="VMESS-WebSocket-TLS">
diff --git a/ProxySU_Core/Views/MainWindow.xaml b/ProxySU_Core/Views/MainWindow.xaml
index af4e8e0..cfbdef0 100644
--- a/ProxySU_Core/Views/MainWindow.xaml
+++ b/ProxySU_Core/Views/MainWindow.xaml
@@ -107,10 +107,10 @@
-
-
+
-
+
+
diff --git a/ProxySU_Core/Views/RecordEditorWindow.xaml b/ProxySU_Core/Views/RecordEditorWindow.xaml
index 785af14..988ea11 100644
--- a/ProxySU_Core/Views/RecordEditorWindow.xaml
+++ b/ProxySU_Core/Views/RecordEditorWindow.xaml
@@ -8,7 +8,7 @@
xmlns:local="clr-namespace:ProxySU_Core.Views"
xmlns:converters="clr-namespace:ProxySU_Core.Converters"
mc:Ignorable="d"
- Title="编辑主机信息" Height="800" Width="710">
+ Title="编辑主机信息" Height="600" Width="980">
@@ -16,15 +16,19 @@
+
+
+
+
+
+
-
-
-
-
+
+
-
+
@@ -127,7 +131,7 @@
@@ -207,14 +211,15 @@
-
+
-
-
-
+
+
+
+
+
+
+
-
+
+
@@ -287,7 +296,7 @@
+ Width="200" />
@@ -298,21 +307,22 @@
-
+
-
+
+
+
-
diff --git a/ProxySU_Core/Views/RecordEditorWindow.xaml.cs b/ProxySU_Core/Views/RecordEditorWindow.xaml.cs
index d62e097..7d54a14 100644
--- a/ProxySU_Core/Views/RecordEditorWindow.xaml.cs
+++ b/ProxySU_Core/Views/RecordEditorWindow.xaml.cs
@@ -48,5 +48,10 @@ namespace ProxySU_Core.Views
DialogResult = true;
Close();
}
+
+ public void RandomUuid(object sender, RoutedEventArgs e)
+ {
+ Settings.UUID = Guid.NewGuid().ToString();
+ }
}
}
diff --git a/ProxySU_Core/Views/TerminalWindow.xaml b/ProxySU_Core/Views/TerminalWindow.xaml
index d31972f..ff0576b 100644
--- a/ProxySU_Core/Views/TerminalWindow.xaml
+++ b/ProxySU_Core/Views/TerminalWindow.xaml
@@ -46,6 +46,13 @@
Height="26"
IsEnabled="{Binding HasConnected}"
Width="120"/>
+
+
-