Browse Source

update: clash enhanced mode force fake-ip

v2board 2 years ago
parent
commit
2f04505562
1 changed files with 0 additions and 8 deletions
  1. 0 8
      app/Http/Controllers/Client/Protocols/Clash.php

+ 0 - 8
app/Http/Controllers/Client/Protocols/Clash.php

@@ -34,7 +34,6 @@ class Clash
         } else {
             $config = Yaml::parseFile($defaultConfig);
         }
-        $this->patch($config);
         $proxy = [];
         $proxies = [];
 
@@ -179,11 +178,4 @@ class Clash
     {
         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';
-    }
 }