mirror of https://github.com/2dust/v2rayN
refine UserPAC setting
parent
f48468029e
commit
5b3f09aaf7
|
@ -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);
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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…
Reference in New Issue