|
|
|
@ -1509,13 +1509,16 @@ namespace v2rayN.Handler
|
|
|
|
|
|
|
|
|
|
public static int InitBuiltinRouting(ref Config config, bool blImportAdvancedRules = false)
|
|
|
|
|
{
|
|
|
|
|
if (blImportAdvancedRules || LazyConfig.Instance.RoutingItems().Count <= 0)
|
|
|
|
|
var items = LazyConfig.Instance.RoutingItems();
|
|
|
|
|
if (blImportAdvancedRules || items.Count <= 0)
|
|
|
|
|
{
|
|
|
|
|
var maxSort = items.Max(t => t.sort);
|
|
|
|
|
//Bypass the mainland
|
|
|
|
|
var item2 = new RoutingItem()
|
|
|
|
|
{
|
|
|
|
|
remarks = "绕过大陆(Whitelist)",
|
|
|
|
|
url = string.Empty,
|
|
|
|
|
sort = maxSort + 1,
|
|
|
|
|
};
|
|
|
|
|
AddBatchRoutingRules(ref item2, Utils.GetEmbedText(Global.CustomRoutingFileName + "white"));
|
|
|
|
|
|
|
|
|
@ -1524,6 +1527,7 @@ namespace v2rayN.Handler
|
|
|
|
|
{
|
|
|
|
|
remarks = "黑名单(Blacklist)",
|
|
|
|
|
url = string.Empty,
|
|
|
|
|
sort = maxSort + 2,
|
|
|
|
|
};
|
|
|
|
|
AddBatchRoutingRules(ref item3, Utils.GetEmbedText(Global.CustomRoutingFileName + "black"));
|
|
|
|
|
|
|
|
|
@ -1532,6 +1536,7 @@ namespace v2rayN.Handler
|
|
|
|
|
{
|
|
|
|
|
remarks = "全局(Global)",
|
|
|
|
|
url = string.Empty,
|
|
|
|
|
sort = maxSort + 3,
|
|
|
|
|
};
|
|
|
|
|
AddBatchRoutingRules(ref item1, Utils.GetEmbedText(Global.CustomRoutingFileName + "global"));
|
|
|
|
|
|
|
|
|
|