mirror of
https://github.com/SpaceTimee/Sheas-Cealer.git
synced 2025-07-14 05:12:09 +08:00
1.0.4 更新
This commit is contained in:
parent
202aba02f0
commit
d7e87278bf
@ -128,8 +128,13 @@ namespace Sheas_Cealer
|
|||||||
if (ClashButton.Content.ToString() == "启动代理")
|
if (ClashButton.Content.ToString() == "启动代理")
|
||||||
{
|
{
|
||||||
YamlStream configStream = new();
|
YamlStream configStream = new();
|
||||||
configStream.Load(File.OpenText(Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, @"config.yaml")));
|
YamlMappingNode configMap;
|
||||||
YamlMappingNode configMap = (YamlMappingNode)configStream.Documents[0].RootNode;
|
try
|
||||||
|
{
|
||||||
|
configStream.Load(File.OpenText(Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, @"config.yaml")));
|
||||||
|
configMap = (YamlMappingNode)configStream.Documents[0].RootNode;
|
||||||
|
}
|
||||||
|
catch { throw new Exception("规则无法识别,请检查代理规则是否含有语法错误"); }
|
||||||
|
|
||||||
proxyKey.SetValue("ProxyEnable", 1);
|
proxyKey.SetValue("ProxyEnable", 1);
|
||||||
proxyKey.SetValue("ProxyServer", "127.0.0.1:" + configMap["mixed-port"]);
|
proxyKey.SetValue("ProxyServer", "127.0.0.1:" + configMap["mixed-port"]);
|
||||||
@ -150,6 +155,8 @@ namespace Sheas_Cealer
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(CEALING_ARGUMENT))
|
||||||
|
throw new Exception("规则无法识别,请检查伪造规则是否含有语法错误");
|
||||||
if (MessageBox.Show("启动前将关闭所选浏览器的所有进程,是否继续?", string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes)
|
if (MessageBox.Show("启动前将关闭所选浏览器的所有进程,是否继续?", string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user