mirror of
https://github.com/2dust/v2rayN.git
synced 2026-05-30 01:34:08 +00:00
Fix
This commit is contained in:
parent
9714f70ed5
commit
be73ff9b40
2 changed files with 4 additions and 2 deletions
|
|
@ -355,7 +355,8 @@ public partial class CoreConfigSingboxService
|
||||||
if (expectedIPsRegions.Count > 0 && rule.geosite?.Count > 0 && !regionName.IsNullOrEmpty())
|
if (expectedIPsRegions.Count > 0 && rule.geosite?.Count > 0 && !regionName.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
var regionGeosite = rule.geosite.Where(g => g.EndsWith($"-{regionName}", StringComparison.OrdinalIgnoreCase)
|
var regionGeosite = rule.geosite.Where(g => g.EndsWith($"-{regionName}", StringComparison.OrdinalIgnoreCase)
|
||||||
|| g.EndsWith($"@{regionName}", StringComparison.OrdinalIgnoreCase)).ToList();
|
|| g.EndsWith($"@{regionName}", StringComparison.OrdinalIgnoreCase)
|
||||||
|
|| g == regionName).ToList();
|
||||||
if (regionGeosite.Count > 0)
|
if (regionGeosite.Count > 0)
|
||||||
{
|
{
|
||||||
rule.geosite.RemoveAll(regionGeosite.Contains);
|
rule.geosite.RemoveAll(regionGeosite.Contains);
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,8 @@ public partial class CoreConfigV2rayService
|
||||||
{
|
{
|
||||||
var isExpectedDomain = !regionName.IsNullOrEmpty()
|
var isExpectedDomain = !regionName.IsNullOrEmpty()
|
||||||
|| normalizedDomain.EndsWith($"-{regionName}")
|
|| normalizedDomain.EndsWith($"-{regionName}")
|
||||||
|| normalizedDomain.EndsWith($"@{regionName}");
|
|| normalizedDomain.EndsWith($"@{regionName}")
|
||||||
|
|| normalizedDomain == Global.GeoSitePrefix + regionName;
|
||||||
var targetList = isExpectedDomain ? expectedDomainList : directGeositeList;
|
var targetList = isExpectedDomain ? expectedDomainList : directGeositeList;
|
||||||
targetList.Add(normalizedDomain);
|
targetList.Add(normalizedDomain);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue