feat: [用户前端]补全可选订阅类型

This commit is contained in:
xboard 2023-11-19 14:15:52 +08:00
parent 4353fe1bee
commit 6773c87d8e
5 changed files with 603 additions and 601 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@
/public/hot
/public/storage
/public/env.example.js
*.user.ini
/storage/*.key
/vendor
.env

View File

@ -17,6 +17,7 @@ class ClientController extends Controller
// 节点类型筛选
$allowedTypes = ['vmess', 'vless', 'trojan', 'hysteria', 'hysteria2', 'shadowsocks'];
$types = $request->input('types', "vmess|vless|trojan|hysteria|shadowsocks");
if ($types === "all") $types = implode('|', $allowedTypes);
$typesArr = $types ? collect(explode('|', str_replace(['|','',','], "|" , $types)))->reject(function($type) use ($allowedTypes){
return !in_array($type, $allowedTypes);
})->values()->all() : [];

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.