mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
update: clash enhanced mode force fake-ip
This commit is contained in:
parent
4ba6edc328
commit
2f04505562
@ -34,7 +34,6 @@ class Clash
|
|||||||
} else {
|
} else {
|
||||||
$config = Yaml::parseFile($defaultConfig);
|
$config = Yaml::parseFile($defaultConfig);
|
||||||
}
|
}
|
||||||
$this->patch($config);
|
|
||||||
$proxy = [];
|
$proxy = [];
|
||||||
$proxies = [];
|
$proxies = [];
|
||||||
|
|
||||||
@ -179,11 +178,4 @@ class Clash
|
|||||||
{
|
{
|
||||||
return @preg_match($exp, null) !== false;
|
return @preg_match($exp, null) !== false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function patch(&$config)
|
|
||||||
{
|
|
||||||
// fix clash x dns mode
|
|
||||||
preg_match('#(ClashX)[/ ]([0-9.]*)#', $_SERVER['HTTP_USER_AGENT'], $matches);
|
|
||||||
if (isset($matches[2]) && $matches[2] < '1.96.2') $config['dns']['enhanced-mode'] = 'redir-host';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user