v2board 2 лет назад
Родитель
Сommit
5e582292a8

+ 1 - 1
app/Http/Controllers/Client/Protocols/Clash.php

@@ -83,7 +83,7 @@ class Clash
             array_unshift($config['rules'], "DOMAIN,{$subsDomain},DIRECT");
         }
 
-        $yaml = Yaml::dump($config);
+        $yaml = Yaml::dump($config, 2, 4, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE);
         $yaml = str_replace('$app_name', config('v2board.app_name', 'V2Board'), $yaml);
         return $yaml;
     }

+ 1 - 1
app/Http/Controllers/Client/Protocols/ClashMeta.php

@@ -74,7 +74,7 @@ class ClashMeta
             array_unshift($config['rules'], "DOMAIN,{$subsDomain},DIRECT");
         }
 
-        $yaml = Yaml::dump($config);
+        $yaml = Yaml::dump($config, 2, 4, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE);
         $yaml = str_replace('$app_name', config('v2board.app_name', 'V2Board'), $yaml);
         return $yaml;
     }

+ 1 - 1
app/Http/Controllers/Client/Protocols/Stash.php

@@ -81,7 +81,7 @@ class Stash
             array_unshift($config['rules'], "DOMAIN,{$subsDomain},DIRECT");
         }
 
-        $yaml = Yaml::dump($config);
+        $yaml = Yaml::dump($config, 2, 4, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE);
         $yaml = str_replace('$app_name', config('v2board.app_name', 'V2Board'), $yaml);
         return $yaml;
     }