Browse Source

refine UserPAC setting

pull/695/head
YFdyh000 5 years ago
parent
commit
5b3f09aaf7
  1. 2
      v2rayN/v2rayN/Forms/OptionSettingForm.cs
  2. 2
      v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx
  3. 4
      v2rayN/v2rayN/Tool/Utils.cs

2
v2rayN/v2rayN/Forms/OptionSettingForm.cs

@ -373,7 +373,7 @@ namespace v2rayN.Forms
private int SaveUserPAC()
{
string userPacRule = txtuserPacRule.Text.TrimEx();
userPacRule = userPacRule.Replace("\"", "");
userPacRule = userPacRule.Replace("\"", "").Replace("'", "");
config.userPacRule = Utils.String2List(userPacRule);

2
v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx

@ -282,7 +282,7 @@
<value>协议</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>*设置用户PAC规则,用逗号(,)隔开</value>
<value>*用户PAC内的自定条目。用逗号(,)或换行隔开的匹配模式(pattern)。英文单引号、双引号将被忽略。</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 12</value>

4
v2rayN/v2rayN/Tool/Utils.cs

@ -168,7 +168,7 @@ namespace v2rayN
}
}
/// <summary>
/// 逗号分隔的字符串,转List<string>
/// 换行或逗号分隔的字符串,转List<string>
/// </summary>
/// <param name="str"></param>
/// <returns></returns>
@ -176,7 +176,7 @@ namespace v2rayN
{
try
{
str = str.Replace(Environment.NewLine, "");
str = str.Replace("\r", ",").Replace("\n", ","); // 用户复制的可能是\r、\n或\r\n
return new List<string>(str.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries));
}
catch

Loading…
Cancel
Save