feat: 节点本地内容支持 JSON5

This commit is contained in:
xream
2025-07-10 01:37:16 +08:00
parent aa5b51a3cc
commit f34eac9568
2 changed files with 4 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.19.69",
"version": "2.19.70",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
"main": "src/main.js",
"scripts": {

View File

@@ -12,6 +12,7 @@ import getLoonParser from './peggy/loon';
import getQXParser from './peggy/qx';
import getTrojanURIParser from './peggy/trojan-uri';
import $ from '@/core/app';
import JSON5 from 'json5';
import { Base64 } from 'js-base64';
@@ -1130,14 +1131,14 @@ function Clash_All() {
const name = 'Clash Parser';
const test = (line) => {
try {
JSON.parse(line);
JSON5.parse(line);
} catch (e) {
return false;
}
return true;
};
const parse = (line) => {
const proxy = JSON.parse(line);
const proxy = JSON5.parse(line);
if (
![
'anytls',