From 6ad9cb3c7208ec1ce9dc928c9ee9941f95cd0132 Mon Sep 17 00:00:00 2001 From: Space Time Date: Fri, 4 Oct 2024 21:29:12 +0800 Subject: [PATCH] =?UTF-8?q?1.1.1=20->=201.1.2=20=E7=AC=AC29=E6=AC=A1?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Wins/MainWin.xaml.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Wins/MainWin.xaml.cs b/Wins/MainWin.xaml.cs index 918d361..002823c 100644 --- a/Wins/MainWin.xaml.cs +++ b/Wins/MainWin.xaml.cs @@ -194,6 +194,9 @@ public partial class MainWin : Window continue; hostsAppendContent += $"127.0.0.1 {hostIncludeDomainWithoutWildcard.Split('^', 2)[0]}\n"; + + if (hostIncludeDomain.StartsWith('*')) + hostsAppendContent += $"127.0.0.1 www.{hostIncludeDomainWithoutWildcard.Split('^', 2)[0]}\n"; } hostsAppendContent += "# Cealing Nginx End"; @@ -202,7 +205,7 @@ public partial class MainWin : Window new NginxProc().ShellRun(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, @"-c nginx.conf"); - await Task.Delay(2000); + await Task.Delay(2500); File.WriteAllText(Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "nginx.conf"), ExtraConfs); ConfWatcher.EnableRaisingEvents = true;