diff --git a/ProxySU_Core/ProxySU_Core.csproj b/ProxySU_Core/ProxySU_Core.csproj
index f54fa71..f40e48b 100644
--- a/ProxySU_Core/ProxySU_Core.csproj
+++ b/ProxySU_Core/ProxySU_Core.csproj
@@ -205,6 +205,9 @@
TerminalWindow.xaml
+
+ XrayWindow.xaml
+
@@ -291,6 +294,10 @@
MSBuild:Compile
Designer
+
+ Designer
+ MSBuild:Compile
+
diff --git a/ProxySU_Core/ViewModels/Developers/XrayProject.cs b/ProxySU_Core/ViewModels/Developers/XrayProject.cs
index 70c2e7a..34359d5 100644
--- a/ProxySU_Core/ViewModels/Developers/XrayProject.cs
+++ b/ProxySU_Core/ViewModels/Developers/XrayProject.cs
@@ -24,8 +24,6 @@ namespace ProxySU_Core.ViewModels.Developers
private const string ServerReverseDir = @"Templates\xray\server\09_reverse";
private const string CaddyFileDir = @"Templates\xray\caddy";
- private int randomCaddyListenPort = 8800;
-
public XrayProject(SshClient sshClient, XrayParameters parameters, Action writeOutput) : base(sshClient, parameters, writeOutput)
{
}
diff --git a/ProxySU_Core/Views/TerminalWindow.xaml b/ProxySU_Core/Views/TerminalWindow.xaml
index e57d59f..8ee8744 100644
--- a/ProxySU_Core/Views/TerminalWindow.xaml
+++ b/ProxySU_Core/Views/TerminalWindow.xaml
@@ -14,7 +14,7 @@
Foreground="LawnGreen"
FontSize="14"
FontFamily="Consolas"
- Height="400">
+ Height="320">
@@ -23,9 +23,11 @@
-
-
+
+
diff --git a/ProxySU_Core/Views/TerminalWindow.xaml.cs b/ProxySU_Core/Views/TerminalWindow.xaml.cs
index 010086d..828f95b 100644
--- a/ProxySU_Core/Views/TerminalWindow.xaml.cs
+++ b/ProxySU_Core/Views/TerminalWindow.xaml.cs
@@ -1,6 +1,7 @@
using MahApps.Metro.Controls.Dialogs;
using ProxySU_Core.ViewModels;
using ProxySU_Core.ViewModels.Developers;
+using ProxySU_Core.Views;
using Renci.SshNet;
using System;
using System.Collections.Generic;
@@ -106,22 +107,9 @@ namespace ProxySU_Core
private void Install(object sender, RoutedEventArgs e)
{
- var project = new XrayProject(
- _sshClient,
- new XrayParameters { Port = 443 },
- WriteShell
- );
- Task.Run(() =>
- {
- try
- {
- project.Execute();
- }
- catch (Exception ex)
- {
- _vm.AddOutput(ex.Message);
- }
- });
+ var xrayWindow = new XrayWindow();
+ xrayWindow.ShowDialog();
+
}
diff --git a/ProxySU_Core/Views/XrayWindow.xaml b/ProxySU_Core/Views/XrayWindow.xaml
new file mode 100644
index 0000000..348aeb9
--- /dev/null
+++ b/ProxySU_Core/Views/XrayWindow.xaml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ProxySU_Core/Views/XrayWindow.xaml.cs b/ProxySU_Core/Views/XrayWindow.xaml.cs
new file mode 100644
index 0000000..51acdcb
--- /dev/null
+++ b/ProxySU_Core/Views/XrayWindow.xaml.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace ProxySU_Core.Views
+{
+ ///
+ /// XrayWindow.xaml 的交互逻辑
+ ///
+ public partial class XrayWindow
+ {
+ public XrayWindow()
+ {
+ InitializeComponent();
+ }
+ }
+}