mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-03 18:40:52 +08:00
fix: Remove forced direct IP rule for nodes
This commit is contained in:
@@ -126,13 +126,13 @@ class ClashMeta implements ProtocolInterface
|
||||
if ($subsDomain) {
|
||||
array_unshift($config['rules'], "DOMAIN,{$subsDomain},DIRECT");
|
||||
}
|
||||
// Force the nodes ip to be a direct rule
|
||||
collect($this->servers)->pluck('host')->map(function ($host) {
|
||||
$host = trim($host);
|
||||
return filter_var($host, FILTER_VALIDATE_IP) ? [$host] : Helper::getIpByDomainName($host);
|
||||
})->flatten()->unique()->each(function ($nodeIP) use (&$config) {
|
||||
array_unshift($config['rules'], "IP-CIDR,{$nodeIP}/32,DIRECT,no-resolve");
|
||||
});
|
||||
// // Force the nodes ip to be a direct rule
|
||||
// collect($this->servers)->pluck('host')->map(function ($host) {
|
||||
// $host = trim($host);
|
||||
// return filter_var($host, FILTER_VALIDATE_IP) ? [$host] : Helper::getIpByDomainName($host);
|
||||
// })->flatten()->unique()->each(function ($nodeIP) use (&$config) {
|
||||
// array_unshift($config['rules'], "IP-CIDR,{$nodeIP}/32,DIRECT,no-resolve");
|
||||
// });
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user