diff --git a/Consts/MainMultilangConst.Designer.cs b/Consts/MainMultilangConst.Designer.cs index d1a8f38..bbeb568 100644 --- a/Consts/MainMultilangConst.Designer.cs +++ b/Consts/MainMultilangConst.Designer.cs @@ -159,6 +159,15 @@ namespace Sheas_Cealer.Consts { } } + /// + /// 查找类似 Please remember to come back and stop the proxy manually after use. Do you want to continue? 的本地化字符串。 + /// + public static string _LaunchProxyPrompt { + get { + return ResourceManager.GetString("_LaunchProxyPrompt", resourceCulture); + } + } + /// /// 查找类似 There is an update available. Do you want to update upstream host? If No it will only open the upstream host page for you 的本地化字符串。 /// diff --git a/Consts/MainMultilangConst.resx b/Consts/MainMultilangConst.resx index a431cac..c345d5e 100644 --- a/Consts/MainMultilangConst.resx +++ b/Consts/MainMultilangConst.resx @@ -273,6 +273,9 @@ All processes of the selected browser will be closed before launching. Do you want to continue? + + Please remember to come back and stop the proxy manually after use. Do you want to continue? + There is an update available. Do you want to update upstream host? If No it will only open the upstream host page for you diff --git a/Consts/MainMultilangConst.zh.resx b/Consts/MainMultilangConst.zh.resx index bb35642..810b148 100644 --- a/Consts/MainMultilangConst.zh.resx +++ b/Consts/MainMultilangConst.zh.resx @@ -273,6 +273,9 @@ 启动前将关闭所选浏览器的所有进程,是否继续? + + 使用完请务必记得回来手动关闭代理,是否继续? + 上游规则有更新可用,需要更新吗?否则只为你打开上游规则网页 diff --git a/Wins/MainWin.xaml.cs b/Wins/MainWin.xaml.cs index 6d7db43..089ffec 100644 --- a/Wins/MainWin.xaml.cs +++ b/Wins/MainWin.xaml.cs @@ -156,6 +156,9 @@ public partial class MainWin : Window if (!Directory.Exists(tempPath)) Directory.CreateDirectory(tempPath); + if (MessageBox.Show(MainConst._LaunchProxyPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes) + return; + new NginxProc().ShellRun(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, @"-c nginx.conf"); } else @@ -189,6 +192,9 @@ public partial class MainWin : Window if (!configMapNode.Children.TryGetValue("mixed-port", out mihomoPortNode!) && !configMapNode.Children.TryGetValue("port", out mihomoPortNode!)) mihomoPortNode = "7890"; + if (MessageBox.Show(MainConst._LaunchProxyPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes) + return; + proxyKey.SetValue("ProxyEnable", 1); proxyKey.SetValue("ProxyServer", "127.0.0.1:" + mihomoPortNode);