From bbc508557b2e0bfe19853c339fb222c9440f6502 Mon Sep 17 00:00:00 2001 From: autumn Date: Wed, 4 Aug 2021 10:57:15 +0800 Subject: [PATCH] fix xray port --- ProxySuper.Core/Services/XrayProject.cs | 3 ++- ProxySuper.WPF/Views/XrayInstallerView.xaml.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ProxySuper.Core/Services/XrayProject.cs b/ProxySuper.Core/Services/XrayProject.cs index 2a8e54f..4dc8146 100644 --- a/ProxySuper.Core/Services/XrayProject.cs +++ b/ProxySuper.Core/Services/XrayProject.cs @@ -163,7 +163,7 @@ namespace ProxySuper.Core.Services /// /// 安装证书 /// - public void InstallCertToXray() + public void InstallCertToXray(bool restartXray = false) { EnsureRootAuth(); EnsureSystemEnv(); @@ -173,6 +173,7 @@ namespace ProxySuper.Core.Services keyName: "xray_ssl.key"); WriteOutput("************ 安装证书完成 ************"); + RunCmd("systemctl restart xray"); } /// diff --git a/ProxySuper.WPF/Views/XrayInstallerView.xaml.cs b/ProxySuper.WPF/Views/XrayInstallerView.xaml.cs index 66a2b85..e6632fc 100644 --- a/ProxySuper.WPF/Views/XrayInstallerView.xaml.cs +++ b/ProxySuper.WPF/Views/XrayInstallerView.xaml.cs @@ -166,7 +166,7 @@ namespace ProxySuper.WPF.Views private void InstallCert(object sender, RoutedEventArgs e) { - Task.Factory.StartNew(Project.InstallCertToXray); + Task.Factory.StartNew(() => Project.InstallCertToXray(restartXray: true)); } private void UninstallXray(object sender, RoutedEventArgs e)