Skip to content

Commit

Permalink
1.1.2 -> 1.1.3 第21次更新
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceTimee committed Oct 21, 2024
1 parent 3b48344 commit b78c982
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Wins/MainWin.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,7 @@ private async void NoClickButton_Click(object sender, RoutedEventArgs e)
return;
}
++GameClickTime;
switch (GameClickTime)
switch (++GameClickTime)
{
case 1:
MessageBox.Show(MainConst._GameClickOnceMsg);
Expand Down Expand Up @@ -565,7 +563,7 @@ private void NginxConfWatcher_Changed(object sender, FileSystemEventArgs e)
if (extraNginxConfigToken is GroupToken extraNginxConfigGroupToken && extraNginxConfigGroupToken.Key.Equals("http", StringComparison.InvariantCultureIgnoreCase))
{
foreach (IToken serverToken in extraNginxConfigGroupToken.Tokens)
if (serverToken is GroupToken serverGroupServer && extraNginxConfigGroupToken.Key.Equals("server", StringComparison.InvariantCultureIgnoreCase))
if (serverToken is GroupToken serverGroupToken && serverGroupToken.Key.Equals("server", StringComparison.InvariantCultureIgnoreCase))
++serverIndex;

break;
Expand All @@ -576,13 +574,12 @@ private void NginxConfWatcher_Changed(object sender, FileSystemEventArgs e)
.AddOrUpdate("events:worker_connections", "65536")
.AddOrUpdate("http:proxy_set_header", "Host $http_host")
.AddOrUpdate("http:proxy_ssl_server_name", !MainPres.IsFlashing ? "on" : "off")
.AddOrUpdate($"http:server[{serverIndex}]:listen", "80 default_server")
.AddOrUpdate($"http:server[{serverIndex}]:return", "https://$host$request_uri");

foreach (List<(List<(string cealHostIncludeDomain, string cealHostExcludeDomain)> cealHostDomainPairs, string? cealHostSni, string cealHostIp)> cealHostRules in CealHostRulesDict.Values)
foreach ((List<(string cealHostIncludeDomain, string cealHostExcludeDomain)> cealHostDomainPairs, string? cealHostSni, string cealHostIp) in cealHostRules)
{
++serverIndex;

string serverName = "~";

foreach ((string cealHostIncludeDomain, string cealHostExcludeDomain) in cealHostDomainPairs)
Expand All @@ -594,6 +591,11 @@ private void NginxConfWatcher_Changed(object sender, FileSystemEventArgs e)
cealHostIncludeDomain.TrimStart('$').Replace(".", "\\.").Replace("*", ".*") + "$|";
}

if (serverName == "~")
continue;

++serverIndex;

NginxConfs = NginxConfs
.AddOrUpdate($"http:server[{serverIndex}]:server_name", serverName.TrimEnd('|'))
.AddOrUpdate($"http:server[{serverIndex}]:listen", "443 ssl")
Expand Down

0 comments on commit b78c982

Please sign in to comment.