diff --git a/ProxySU/ClassModel.cs b/ProxySU/ClassModel.cs index a393688..4bea9a7 100644 --- a/ProxySU/ClassModel.cs +++ b/ProxySU/ClassModel.cs @@ -2,26 +2,81 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Text.RegularExpressions; +using System.Threading; +using System.Threading.Tasks; +using System.IO; +using Renci.SshNet; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using System.Drawing; +using QRCoder; +using System.Net; +using System.ComponentModel; +using System.Net.Sockets; +using System.Runtime.InteropServices; +using System.Runtime; +using System.Globalization; +using Microsoft.Win32; +using System.Security; namespace ProxySU { class ClassModel { + //检测域名是否为空 + public static bool TestDomainIsEmpty(string domainStr) + { + domainStr = domainStr.Trim(); + if (string.IsNullOrEmpty(domainStr) == true) + { + //****** "域名不能为空,请检查相关参数设置!" ****** + MessageBox.Show(Application.Current.FindResource("MessageBoxShow_DomainNotEmpty").ToString()); + return false; + } + else + { + return true; + } + } + //伪装网站预处理 + public static bool PreDomainMask(string uri) + { + uri = uri.Trim(); + if (String.IsNullOrEmpty(uri) == false) + { + if (uri.Contains("/") == true) + { + //MessageBox.Show("伪装网址输入格式错误!请重新输入!"); + MessageBox.Show(Application.Current.FindResource("MessageBoxShow_MaskSitesToolTip").ToString()); + return false; + } + } + return true; + } //伪装网址的处理 public static string DisguiseURLprocessing(string fakeUrl) { - var uri = new Uri(fakeUrl); - return uri.Host; - //Console.WriteLine(uri.Host); - - ////处理伪装网站域名中的前缀 + fakeUrl = fakeUrl.Trim(); + return fakeUrl; + //处理伪装网站域名中的前缀 //if (fakeUrl.Length >= 7) //{ // string testDomainMask = fakeUrl.Substring(0, 7); // if (String.Equals(testDomainMask, "https:/") || String.Equals(testDomainMask, "http://")) // { - // string[] tmpUrl = fakeUrl.Split('/'); - // fakeUrl = tmpUrl[2]; + // var uri = new Uri(fakeUrl); + // return uri.Host; // } //} diff --git a/ProxySU/MainWindow.xaml b/ProxySU/MainWindow.xaml index a4be79b..9193bf7 100644 --- a/ProxySU/MainWindow.xaml +++ b/ProxySU/MainWindow.xaml @@ -355,7 +355,7 @@ - + @@ -408,7 +408,7 @@ - + @@ -461,7 +461,7 @@ - + @@ -564,7 +564,7 @@ --> - + @@ -671,7 +671,7 @@ - + diff --git a/ProxySU/MainWindow.xaml.cs b/ProxySU/MainWindow.xaml.cs index 71dc791..9f64ef0 100644 --- a/ProxySU/MainWindow.xaml.cs +++ b/ProxySU/MainWindow.xaml.cs @@ -779,7 +779,7 @@ namespace ProxySU TextBlockCurrentlySelectedPlanPort.Text = ReceiveConfigurationParameters[1]; //服务器端口 TextBlockCurrentlySelectedPlanUUID.Text = ReceiveConfigurationParameters[2]; //UUID TextBlockCurrentlySelectedPlanPathSeedKey.Text = ReceiveConfigurationParameters[6]; //mKCP Seed\Quic Key\Path - + //MessageBox.Show(ReceiveConfigurationParameters[7]); TextBlockCurrentlySelectedPlanFakeWebsite.Text = ReceiveConfigurationParameters[7]; //伪装网站 if (String.Equals(ReceiveConfigurationParameters[0], "TCP") == true @@ -2979,10 +2979,16 @@ namespace ProxySU { ReceiveConfigurationParameters[i] = ""; } - if (string.IsNullOrEmpty(PreTrim(TextBoxTrojanHostDomain.Text)) == true) + bool preDomainMask = ClassModel.PreDomainMask(TextBoxTrojanSites.Text); + bool domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxTrojanHostDomain.Text); + //if (string.IsNullOrEmpty(PreTrim(TextBoxTrojanHostDomain.Text)) == true) + //{ + // //****** "域名不能为空,请检查相关参数设置!" ****** + // MessageBox.Show(Application.Current.FindResource("MessageBoxShow_DomainNotEmpty").ToString()); + // return; + //} + if (domainNotEmpty == false || preDomainMask == false) { - //****** "域名不能为空,请检查相关参数设置!" ****** - MessageBox.Show(Application.Current.FindResource("MessageBoxShow_DomainNotEmpty").ToString()); return; } //传递模板类型 @@ -3540,12 +3546,12 @@ namespace ProxySU //NaiveProxy一键安装开始传递参数 private void ButtonNavieSetUp_Click(object sender, RoutedEventArgs e) { - if (string.IsNullOrEmpty(PreTrim(TextBoxNaiveHostDomain.Text)) == true) - { - //****** "域名不能为空,请检查相关参数设置!" ****** - MessageBox.Show(Application.Current.FindResource("MessageBoxShow_DomainNotEmpty").ToString()); - return; - } + //if (string.IsNullOrEmpty(PreTrim(TextBoxNaiveHostDomain.Text)) == true) + //{ + // //****** "域名不能为空,请检查相关参数设置!" ****** + // MessageBox.Show(Application.Current.FindResource("MessageBoxShow_DomainNotEmpty").ToString()); + // return; + //} ConnectionInfo connectionInfo = GenerateConnectionInfo(); if (connectionInfo == null) @@ -3554,7 +3560,19 @@ namespace ProxySU MessageBox.Show(Application.Current.FindResource("MessageBoxShow_ErrorHostConnection").ToString()); return; } + //清空参数空间 + for (int i = 0; i != ReceiveConfigurationParameters.Length; i++) + { + ReceiveConfigurationParameters[i] = ""; + } + + bool preDomainMask = ClassModel.PreDomainMask(TextBoxNaiveSites.Text); + bool domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxNaiveHostDomain.Text); + if (domainNotEmpty == false || preDomainMask == false) + { + return; + } //传递参数 ReceiveConfigurationParameters[4] = PreTrim(TextBoxNaiveHostDomain.Text);//传递域名 ReceiveConfigurationParameters[1] = "443";//传递端口 @@ -3937,12 +3955,19 @@ namespace ProxySU { ReceiveConfigurationParameters[i] = ""; } - if (string.IsNullOrEmpty(PreTrim(TextBoxSSRHostDomain.Text)) == true) + + bool domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxSSRHostDomain.Text); + bool preDomainMask = ClassModel.PreDomainMask(TextBoxSSRSites.Text); + if (domainNotEmpty == false || preDomainMask == false) { - //****** "域名不能为空,请检查相关参数设置!" ****** - MessageBox.Show(Application.Current.FindResource("MessageBoxShow_DomainNotEmpty").ToString()); return; } + //if (string.IsNullOrEmpty(PreTrim(TextBoxSSRHostDomain.Text)) == true) + //{ + // //****** "域名不能为空,请检查相关参数设置!" ****** + // MessageBox.Show(Application.Current.FindResource("MessageBoxShow_DomainNotEmpty").ToString()); + // return; + //} //传递域名 ReceiveConfigurationParameters[4] = PreTrim(TextBoxSSRHostDomain.Text); @@ -7257,9 +7282,11 @@ namespace ProxySU #region 测试用代码 private void Button_Click(object sender, RoutedEventArgs e) { - saveShellScriptFileName = GenerateRandomScriptFileName(GenerateRandomStr(10)); + string host = ClassModel.DisguiseURLprocessing("www.google.com/accout/"); + MessageBox.Show(host); + //saveShellScriptFileName = GenerateRandomScriptFileName(GenerateRandomStr(10)); //saveShellScriptFileName = "tmp." + saveShellScriptFileName + ".sh"; - MessageBox.Show(saveShellScriptFileName); + //MessageBox.Show(saveShellScriptFileName); //var rand = System.Security.Cryptography.RandomNumberGenerator.Create(); //byte[] bytes = new byte[8]; //rand.GetBytes(bytes); diff --git a/ProxySU/SSpluginWindow.xaml b/ProxySU/SSpluginWindow.xaml index e750198..8c9fa12 100644 --- a/ProxySU/SSpluginWindow.xaml +++ b/ProxySU/SSpluginWindow.xaml @@ -266,7 +266,7 @@ - + diff --git a/ProxySU/SSpluginWindow.xaml.cs b/ProxySU/SSpluginWindow.xaml.cs index 341b524..f1f508b 100644 --- a/ProxySU/SSpluginWindow.xaml.cs +++ b/ProxySU/SSpluginWindow.xaml.cs @@ -92,7 +92,8 @@ namespace ProxySU private void ButtondDecide_Click(object sender, RoutedEventArgs e) { - bool testDomain = true; + bool preDomainMask = ClassModel.PreDomainMask(TextBoxMaskSites.Text); + bool domainNotEmpty = true; //UncheckLayouts(TabControlTemplate); //SS 经典模式被选中 if (RadioButtonNonePluginSS.IsChecked == true) @@ -116,7 +117,7 @@ namespace ProxySU else if (RadioButtonObfsPluginHttpsWebSS.IsChecked == true) { - testDomain = TestDomainIsEmpty(); + domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxDomainSS.Text); //传递模板类型 MainWindow.ReceiveConfigurationParameters[0] = "ObfsPluginHttpsWebSS"; //传递方案名称 @@ -142,7 +143,7 @@ namespace ProxySU //V2Ray-Plugin SS+WebSocket+TLS+Web模式被选中 else if (RadioButtonWebSocketTLSWebFrontSS.IsChecked == true || RadioButtonWebSocketTLSWebFrontSSHot.IsChecked == true) { - testDomain = TestDomainIsEmpty(); + domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxDomainSS.Text); //传递模板类型 MainWindow.ReceiveConfigurationParameters[0] = "WebSocketTLSWebFrontSS"; //传递方案名称 @@ -159,7 +160,7 @@ namespace ProxySU //V2Ray-Plugin SS+QUIC模式被选中 else if (RadioButtonQuicSS.IsChecked == true) { - testDomain = TestDomainIsEmpty(); + domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxDomainSS.Text); //传递模板类型 MainWindow.ReceiveConfigurationParameters[0] = "QuicSS"; //传递方案名称 @@ -181,7 +182,7 @@ namespace ProxySU //SS+GoQuiet-Plugin模式被选中 else if (RadioButtonGoQuietPluginSS.IsChecked == true) { - testDomain = TestDomainIsEmpty(); + domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxDomainSS.Text); //传递模板类型 MainWindow.ReceiveConfigurationParameters[0] = "GoQuietPluginSS"; //传递方案名称 @@ -193,7 +194,7 @@ namespace ProxySU //SS+Cloak-Plugin模式被选中 else if (RadioButtonCloakPluginSS.IsChecked == true) { - testDomain = TestDomainIsEmpty(); + domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxDomainSS.Text); //传递模板类型 MainWindow.ReceiveConfigurationParameters[0] = "CloakPluginSS"; //传递方案名称 @@ -210,11 +211,11 @@ namespace ProxySU //传递加密方式 MainWindow.ReceiveConfigurationParameters[3] = GetEncryptionMethodSS(); - if (testDomain) + if (domainNotEmpty == true && preDomainMask == true) { this.Close(); } - + } private void ButtondCancel_Click(object sender, RoutedEventArgs e) => Close(); @@ -376,18 +377,18 @@ namespace ProxySU } //域名检测是否为空 - private bool TestDomainIsEmpty() - { - if (string.IsNullOrEmpty(PreTrim(TextBoxDomainSS.Text)) == true) - { - //****** "域名不能为空,请检查相关参数设置!" ****** - MessageBox.Show(Application.Current.FindResource("MessageBoxShow_DomainNotEmpty").ToString()); - return false; - } - else - { - return true; - } - } + //private bool TestDomainIsEmpty() + //{ + // if (string.IsNullOrEmpty(PreTrim(TextBoxDomainSS.Text)) == true) + // { + // //****** "域名不能为空,请检查相关参数设置!" ****** + // MessageBox.Show(Application.Current.FindResource("MessageBoxShow_DomainNotEmpty").ToString()); + // return false; + // } + // else + // { + // return true; + // } + //} } } diff --git a/ProxySU/Translations/ProxySU.en-US.xaml b/ProxySU/Translations/ProxySU.en-US.xaml index 701ebd1..d5f3eae 100644 --- a/ProxySU/Translations/ProxySU.en-US.xaml +++ b/ProxySU/Translations/ProxySU.en-US.xaml @@ -175,6 +175,8 @@ Domain name: Mask a website: Set this option to increase proxy concealment (can be empty) + Enter only the domain name, excluding "http" and "/" etc. + The input format of the fake URL is wrong! please enter again! Strong stability, Caddy2 as the front, hidden proxy feature, recognized as https traffic to the website, the strongest anti-blocking recognition, domain name is required, CDN support based on HTTP/2 transmission. Completely implemented in accordance with the HTTP/2 standard, with Caddy2 as the front, hidden proxy features, H2C protocol forwarding to V2Ray, domain name is required, and CloudFlare CDN is not currently supported VLESS over TCP with XTLS + fallback and shunt to WHATEVER (ultimate configuration), configured and recommended by rprx boss (author of xtls), configure the following five solutions at the same time on the server side, sharing the same domain name and port 443, WS can pass through CDN. diff --git a/ProxySU/Translations/ProxySU.zh-CN.xaml b/ProxySU/Translations/ProxySU.zh-CN.xaml index c501b62..51fe4f8 100644 --- a/ProxySU/Translations/ProxySU.zh-CN.xaml +++ b/ProxySU/Translations/ProxySU.zh-CN.xaml @@ -178,6 +178,8 @@ 域名: 伪装网站: 设置此项可增加代理的隐蔽(可为空) + 仅仅输入域名,不包括"http"及"/"等 + 伪装网址输入格式错误!请重新输入! 稳定性强,Caddy2做前置,隐藏代理特征,被识别为访问网站的https流量,抗封锁识别最强,需要域名,支持CDN 基于 HTTP/2 传输。完整按 HTTP/2 标准实现,Caddy2做前置,隐藏代理特征,H2C协议转发到V2Ray,需要域名,暂不支持CloudFlare的CDN VLESS over TCP with XTLS + 回落 and 分流 to WHATEVER(终极配置),由rprx大佬 (xtls作者) 配置并推荐,在服务端同时配置以下五种方案,共用同一域名与443端口,其中 WS 都可以通过 CDN。 diff --git a/ProxySU/Translations/ProxySU.zh-TW.xaml b/ProxySU/Translations/ProxySU.zh-TW.xaml index e1bdc74..a3b1c24 100644 --- a/ProxySU/Translations/ProxySU.zh-TW.xaml +++ b/ProxySU/Translations/ProxySU.zh-TW.xaml @@ -175,6 +175,8 @@ 域名: 偽裝網站: 設置此項可增加代理的隱蔽(可為空) + 僅僅輸入域名,不包括"http"及"/"等 + 偽裝網址輸入格式錯誤!請重新輸入! 穩定性強,Caddy2做前置,隱藏代理特徵,被識別為訪問網站的https流量,抗封鎖識別最強,需要域名,支持CDN 基於 HTTP/2 傳輸。完整按 HTTP/2 標準實現,Caddy2做前置,隱藏代理特徵,H2C協議轉發到V2Ray,需要域名,暫不支持CloudFlare的CDN VLESS over TCP with XTLS + 回落and 分流to WHATEVER(終極配置),由rprx大佬(xtls作者)配置並推薦,在服務端同時配置以下五種方案,共用同一域名與443端口,其中 WS 都可以通過 CDN。 diff --git a/ProxySU/TrojanGoTemplateWindow.xaml b/ProxySU/TrojanGoTemplateWindow.xaml index e85fb44..1c59fa4 100644 --- a/ProxySU/TrojanGoTemplateWindow.xaml +++ b/ProxySU/TrojanGoTemplateWindow.xaml @@ -110,7 +110,7 @@ - + diff --git a/ProxySU/TrojanGoTemplateWindow.xaml.cs b/ProxySU/TrojanGoTemplateWindow.xaml.cs index 8928c13..59816c7 100644 --- a/ProxySU/TrojanGoTemplateWindow.xaml.cs +++ b/ProxySU/TrojanGoTemplateWindow.xaml.cs @@ -28,12 +28,15 @@ namespace ProxySU } private void ButtondDecide_Click(object sender, RoutedEventArgs e) { - if (string.IsNullOrEmpty(PreTrim(TextBoxDomain.Text)) == true) - { - //****** "域名不能为空,请检查相关参数设置!" ****** - MessageBox.Show(Application.Current.FindResource("MessageBoxShow_DomainNotEmpty").ToString()); - return; - } + bool preDomainMask = ClassModel.PreDomainMask(TextBoxMaskSites.Text); + bool domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxDomain.Text); + + //if (string.IsNullOrEmpty(PreTrim(TextBoxDomain.Text)) == true) + //{ + // //****** "域名不能为空,请检查相关参数设置!" ****** + // MessageBox.Show(Application.Current.FindResource("MessageBoxShow_DomainNotEmpty").ToString()); + // return; + //} //传递域名 MainWindow.ReceiveConfigurationParameters[4] = PreTrim(TextBoxDomain.Text); //传递伪装网站 @@ -67,7 +70,11 @@ namespace ProxySU MainWindow.ReceiveConfigurationParameters[3] = PreTrim(TextBoxConcurrency.Text); MainWindow.ReceiveConfigurationParameters[5] = PreTrim(TextBoxIdle_timeout.Text); } - this.Close(); + if (domainNotEmpty == true && preDomainMask == true) + { + this.Close(); + } + } //更新密码 private void ButtonNewUUID_Click(object sender, RoutedEventArgs e) @@ -134,19 +141,19 @@ namespace ProxySU return path; } //域名检测是否为空 - private bool TestDomainIsEmpty() - { - if (string.IsNullOrEmpty(PreTrim(TextBoxDomain.Text)) == true) - { - //****** "域名不能为空,请检查相关参数设置!" ****** - MessageBox.Show(Application.Current.FindResource("MessageBoxShow_DomainNotEmpty").ToString()); - return false; - } - else - { - return true; - } - } + //private bool TestDomainIsEmpty() + //{ + // if (string.IsNullOrEmpty(PreTrim(TextBoxDomain.Text)) == true) + // { + // //****** "域名不能为空,请检查相关参数设置!" ****** + // MessageBox.Show(Application.Current.FindResource("MessageBoxShow_DomainNotEmpty").ToString()); + // return false; + // } + // else + // { + // return true; + // } + //} private void CheckBoxMuxSelect_Checked(object sender, RoutedEventArgs e) { diff --git a/ProxySU/V2RayTemplateWindow.xaml b/ProxySU/V2RayTemplateWindow.xaml index 09724d2..a8cf780 100644 --- a/ProxySU/V2RayTemplateWindow.xaml +++ b/ProxySU/V2RayTemplateWindow.xaml @@ -373,7 +373,7 @@ - + diff --git a/ProxySU/V2RayTemplateWindow.xaml.cs b/ProxySU/V2RayTemplateWindow.xaml.cs index e543113..2905c72 100644 --- a/ProxySU/V2RayTemplateWindow.xaml.cs +++ b/ProxySU/V2RayTemplateWindow.xaml.cs @@ -74,6 +74,7 @@ namespace ProxySU //传递所选择的参数与模板方案 private void ButtondDecide_Click(object sender, RoutedEventArgs e) { + bool preDomainMask = ClassModel.PreDomainMask(TextBoxMaskSites.Text); bool domainNotEmpty = true; #region TCP 传输协议(VMESS) @@ -103,7 +104,7 @@ namespace ProxySU //TCP+TLS模式被选中 else if (RadioButtonTCP2TLS.IsChecked == true) { - domainNotEmpty = TestDomainIsEmpty(); + domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxDomain.Text); //传递模板类型 MainWindow.ReceiveConfigurationParameters[0] = "tcpTLS"; @@ -135,7 +136,7 @@ namespace ProxySU //VLESS+TCP+XTLS+Web模式选中 else if (RadioButtonVlessXtlsTcp.IsChecked == true) { - domainNotEmpty = TestDomainIsEmpty(); + domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxDomain.Text); //传递模板类型 MainWindow.ReceiveConfigurationParameters[0] = "VlessXtlsTcp"; @@ -152,7 +153,7 @@ namespace ProxySU //VLESS+TCP+TLS+Web模式选中 else if (RadioButtonVlessTcpTlsWeb.IsChecked == true) { - domainNotEmpty = TestDomainIsEmpty(); + domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxDomain.Text); //传递模板类型 MainWindow.ReceiveConfigurationParameters[0] = "VlessTcpTlsWeb"; @@ -169,7 +170,7 @@ namespace ProxySU //VLESS+WebSocket+TLS+Web模式选中 else if (RadioButtonVlessWebSocketTlsWeb.IsChecked == true) { - domainNotEmpty = TestDomainIsEmpty(); + domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxDomain.Text); //传递模板类型 MainWindow.ReceiveConfigurationParameters[0] = "VlessWebSocketTlsWeb"; @@ -187,7 +188,7 @@ namespace ProxySU //VLESS+http2+TLS+Web模式选中 else if (RadioButtonVlessHttp2Web.IsChecked == true) { - domainNotEmpty = TestDomainIsEmpty(); + domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxDomain.Text); //传递模板类型 MainWindow.ReceiveConfigurationParameters[0] = "VlessHttp2Web"; @@ -205,7 +206,7 @@ namespace ProxySU //VLESS+VMESS+XTLS+TCP+WebSocket+Web模式被选中 else if (RadioButtonVlessVmessXtlsTcpWebSocketHot.IsChecked == true) { - domainNotEmpty = TestDomainIsEmpty(); + domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxDomain.Text); //传递模板类型 MainWindow.ReceiveConfigurationParameters[0] = "VlessVmessXtlsTcpWebSocketWeb"; //传递方案名称 @@ -241,7 +242,7 @@ namespace ProxySU //WebSocket+TLS模式被选中 else if (RadioButtonWebSocketTLS.IsChecked == true) { - domainNotEmpty = TestDomainIsEmpty(); + domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxDomain.Text); //传递模板类型 MainWindow.ReceiveConfigurationParameters[0] = "WebSocketTLS"; @@ -257,7 +258,7 @@ namespace ProxySU //WebSocket+TLS+Web模式被选中 else if (RadioButtonWebSocketTLS2Web.IsChecked == true|| RadioButtonWebSocketTLS2WebHot.IsChecked==true) { - domainNotEmpty = TestDomainIsEmpty(); + domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxDomain.Text); //传递模板类型 MainWindow.ReceiveConfigurationParameters[0] = "WebSocketTLS2Web"; @@ -295,7 +296,7 @@ namespace ProxySU //http2模式被选中 else if (RadioButtonHTTP2.IsChecked == true) { - domainNotEmpty = TestDomainIsEmpty(); + domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxDomain.Text); //传递模板类型 MainWindow.ReceiveConfigurationParameters[0] = "Http2"; @@ -312,7 +313,7 @@ namespace ProxySU //http2+TLS+Web模式被选中 else if (RadioButtonHTTP2Web.IsChecked == true || RadioButtonHTTP2WebHot.IsChecked == true) { - domainNotEmpty = TestDomainIsEmpty(); + domainNotEmpty = ClassModel.TestDomainIsEmpty(TextBoxDomain.Text); //传递模板类型 MainWindow.ReceiveConfigurationParameters[0] = "http2Web"; @@ -553,7 +554,7 @@ namespace ProxySU MainWindow.mKCPvlessIsSet = false; } - if (domainNotEmpty) + if (domainNotEmpty == true && preDomainMask == true) { this.Close(); } @@ -1085,19 +1086,19 @@ namespace ProxySU return path; } //域名检测是否为空 - private bool TestDomainIsEmpty() - { - if (string.IsNullOrEmpty(PreTrim(TextBoxDomain.Text)) == true) - { - //****** "域名不能为空,请检查相关参数设置!" ****** - MessageBox.Show(Application.Current.FindResource("MessageBoxShow_DomainNotEmpty").ToString()); - return false; - } - else - { - return true; - } - } + //private bool TestDomainIsEmpty() + //{ + // if (string.IsNullOrEmpty(PreTrim(TextBoxDomain.Text)) == true) + // { + // //****** "域名不能为空,请检查相关参数设置!" ****** + // MessageBox.Show(Application.Current.FindResource("MessageBoxShow_DomainNotEmpty").ToString()); + // return false; + // } + // else + // { + // return true; + // } + //} //加密方法更改后的动作 private void ComboBoxEncryptionMethodInfo_SelectionChanged(object sender, SelectionChangedEventArgs e) diff --git a/ProxySU/bin/Beta/Beta.zip b/ProxySU/bin/Beta/Beta.zip index 19dea19..dee3737 100644 Binary files a/ProxySU/bin/Beta/Beta.zip and b/ProxySU/bin/Beta/Beta.zip differ