diff --git a/Consts/MainConst.cs b/Consts/MainConst.cs index e65dfe8..e08cb25 100644 --- a/Consts/MainConst.cs +++ b/Consts/MainConst.cs @@ -26,6 +26,7 @@ internal abstract partial class MainConst : MainMultilangConst internal static string HostsConfStartMarker => $"# Cealing Nginx Start{Environment.NewLine}"; internal static string HostsConfEndMarker => "# Cealing Nginx End"; + internal static string ConginxPath => Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "Cealing-Conginx.exe"); internal static string NginxPath => Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "Cealing-Nginx.exe"); internal static string NginxConfPath => Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "nginx.conf"); internal static string NginxLogsPath => Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "logs"); @@ -36,6 +37,7 @@ internal abstract partial class MainConst : MainMultilangConst internal static string NginxRootCertSubjectName => "CN=Cealing Cert Root"; internal static string NginxChildCertSubjectName => "CN=Cealing Cert Child"; + internal static string ComihomoPath => Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "Cealing-Comihomo.exe"); internal static string MihomoPath => Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "Cealing-Mihomo.exe"); internal static string MihomoConfPath => Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "config.yaml"); internal static string[] MihomoNameServers => ["https://doh.apad.pro/dns-query", "https://ns.net.kg/dns-query"]; diff --git a/Proces/ComihomoProc.cs b/Proces/ComihomoProc.cs new file mode 100644 index 0000000..b2865ac --- /dev/null +++ b/Proces/ComihomoProc.cs @@ -0,0 +1,9 @@ +using Sheas_Cealer.Consts; +using Sheas_Core; + +namespace Sheas_Cealer.Proces; + +internal class ComihomoProc : Proc +{ + internal ComihomoProc() : base(MainConst.ComihomoPath) { } +} \ No newline at end of file diff --git a/Proces/ConginxProc.cs b/Proces/ConginxProc.cs new file mode 100644 index 0000000..2d32816 --- /dev/null +++ b/Proces/ConginxProc.cs @@ -0,0 +1,13 @@ +using Sheas_Cealer.Consts; +using Sheas_Cealer.Utils; +using Sheas_Core; +using System; + +namespace Sheas_Cealer.Proces; + +internal class ConginxProc : Proc +{ + internal ConginxProc() : base(MainConst.ConginxPath) { } + + protected override async void Process_Exited(object? sender, EventArgs e) => await NginxCleaner.Clean(); +} \ No newline at end of file