meta-json-schema 1.18.4-beta4 → 1.18.4-beta5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -40
- package/LICENSE +21 -21
- package/README.md +204 -204
- package/package.json +50 -41
- package/schemas/clash-verge-merge-json-schema.json +1 -1
- package/schemas/meta-json-schema.json +1 -1
- package/.gitattributes +0 -2
- package/.github/workflows/release_on_tag.yml +0 -44
- package/.github/workflows/workflow_runs_cleaner.yml +0 -18
- package/.vscode/extensions.json +0 -3
- package/.vscode/settings.json +0 -30
- package/scripts/release.mjs +0 -29
- package/scripts/util/bundle.mjs +0 -91
- package/scripts/util/env.mjs +0 -9
- package/scripts/util/file.mjs +0 -13
- package/scripts/watch.mjs +0 -28
- package/src/clash-verge-merge-json-schema.json +0 -58
- package/src/definitions/compatible.json +0 -6
- package/src/definitions/enums.json +0 -58
- package/src/definitions/patterns.json +0 -87
- package/src/definitions/types.json +0 -70
- package/src/meta-json-schema.json +0 -168
- package/src/modules/adapter/outbound/base.json +0 -91
- package/src/modules/adapter/outbound/direct.json +0 -39
- package/src/modules/adapter/outbound/dns.json +0 -39
- package/src/modules/adapter/outbound/http.json +0 -101
- package/src/modules/adapter/outbound/hysteria.json +0 -182
- package/src/modules/adapter/outbound/hysteria2.json +0 -146
- package/src/modules/adapter/outbound/reality.json +0 -25
- package/src/modules/adapter/outbound/shadowsocks.json +0 -308
- package/src/modules/adapter/outbound/shadowsocksr.json +0 -151
- package/src/modules/adapter/outbound/singmux.json +0 -95
- package/src/modules/adapter/outbound/snell.json +0 -65
- package/src/modules/adapter/outbound/socks5.json +0 -88
- package/src/modules/adapter/outbound/ssh.json +0 -87
- package/src/modules/adapter/outbound/trojan.json +0 -93
- package/src/modules/adapter/outbound/tuic.json +0 -213
- package/src/modules/adapter/outbound/vless.json +0 -146
- package/src/modules/adapter/outbound/vmess.json +0 -251
- package/src/modules/adapter/outbound/wireguard.json +0 -150
- package/src/modules/adapter/outboundgroup/fallback.json +0 -18
- package/src/modules/adapter/outboundgroup/groupbase.json +0 -98
- package/src/modules/adapter/outboundgroup/loadbalance.json +0 -29
- package/src/modules/adapter/outboundgroup/relay.json +0 -18
- package/src/modules/adapter/outboundgroup/urltest.json +0 -25
- package/src/modules/adapter/provider/health-check.json +0 -74
- package/src/modules/adapter/provider/provider.json +0 -159
- package/src/modules/config/authentication.json +0 -9
- package/src/modules/config/controller.json +0 -53
- package/src/modules/config/dns.json +0 -163
- package/src/modules/config/ebpf.json +0 -22
- package/src/modules/config/experimental.json +0 -29
- package/src/modules/config/general.json +0 -140
- package/src/modules/config/geox-url.json +0 -38
- package/src/modules/config/hosts.json +0 -9
- package/src/modules/config/inbound.json +0 -107
- package/src/modules/config/iptables.json +0 -38
- package/src/modules/config/listeners.json +0 -90
- package/src/modules/config/ntp.json +0 -50
- package/src/modules/config/profile.json +0 -24
- package/src/modules/config/proxies.json +0 -118
- package/src/modules/config/proxy-groups.json +0 -21
- package/src/modules/config/proxy-providers.json +0 -11
- package/src/modules/config/rules.json +0 -11
- package/src/modules/config/sniffer.json +0 -111
- package/src/modules/config/sub-rules.json +0 -14
- package/src/modules/config/tls.json +0 -28
- package/src/modules/config/tunnels.json +0 -49
- package/src/modules/listener/config/tuic.json +0 -102
- package/src/modules/listener/config/tun.json +0 -205
- package/src/modules/listener/inbound/base.json +0 -43
- package/src/modules/listener/inbound/http.json +0 -18
- package/src/modules/listener/inbound/hysteria2.json +0 -102
- package/src/modules/listener/inbound/mixed.json +0 -26
- package/src/modules/listener/inbound/mux.json +0 -42
- package/src/modules/listener/inbound/redir.json +0 -18
- package/src/modules/listener/inbound/shadowsocks.json +0 -41
- package/src/modules/listener/inbound/socks.json +0 -26
- package/src/modules/listener/inbound/tproxy.json +0 -26
- package/src/modules/listener/inbound/tuic.json +0 -84
- package/src/modules/listener/inbound/tun.json +0 -207
- package/src/modules/listener/inbound/tunnel.json +0 -33
- package/src/modules/listener/inbound/vmess.json +0 -72
- package/src/modules/listener/sing/sing.json +0 -42
- package/src/modules/rules/provider/provider.json +0 -71
- package/src/modules/rules/rule.json +0 -165
- package/test/clash-meta/example1.yaml +0 -3170
- package/test/clash-verge/merge.yaml +0 -212
package/.gitattributes
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
name: Release On Tag
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- "v*.*.*"
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
bundle_on_commit:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- name: Checkout Repository
|
|
13
|
-
uses: actions/checkout@v4
|
|
14
|
-
|
|
15
|
-
- uses: actions/checkout@v4
|
|
16
|
-
- name: Configure Git Credentials
|
|
17
|
-
run: |
|
|
18
|
-
git config user.name github-actions[bot]
|
|
19
|
-
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
20
|
-
|
|
21
|
-
- name: Install Node
|
|
22
|
-
uses: actions/setup-node@v4
|
|
23
|
-
with:
|
|
24
|
-
node-version: "20"
|
|
25
|
-
|
|
26
|
-
- name: Bundle
|
|
27
|
-
run: npm install && npm run release
|
|
28
|
-
|
|
29
|
-
- name: Release
|
|
30
|
-
uses: softprops/action-gh-release@v2
|
|
31
|
-
env:
|
|
32
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
33
|
-
with:
|
|
34
|
-
body_path: ${{ github.workspace }}/CHANGELOG
|
|
35
|
-
prerelease: false
|
|
36
|
-
make_latest: true
|
|
37
|
-
files: |
|
|
38
|
-
schemas/*
|
|
39
|
-
|
|
40
|
-
- name: Commit and Push
|
|
41
|
-
run: |
|
|
42
|
-
git add -f schemas
|
|
43
|
-
git commit -m "Release On Tag"
|
|
44
|
-
git push --force origin HEAD:main
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
name: Clean Workflow Runs
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
schedule:
|
|
5
|
-
- cron: "0 0 * * *"
|
|
6
|
-
workflow_dispatch:
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
delete-workflow-runs:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
|
|
12
|
-
steps:
|
|
13
|
-
- name: Delete workflow runs
|
|
14
|
-
uses: dongchengjie/workflow-runs-cleaner@v1
|
|
15
|
-
with:
|
|
16
|
-
repository: ${{ github.repository }}
|
|
17
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
18
|
-
maintain-span: "3d"
|
package/.vscode/extensions.json
DELETED
package/.vscode/settings.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"json.schemas": [
|
|
3
|
-
{
|
|
4
|
-
// src 目录的JSON文件使用JSON Schema Draft 07
|
|
5
|
-
"url": "http://json-schema.org/draft-07/schema",
|
|
6
|
-
"fileMatch": ["/src/**/*.json"]
|
|
7
|
-
}
|
|
8
|
-
],
|
|
9
|
-
"yaml.schemas": {
|
|
10
|
-
// test/clash-meta 目录的 YAML 文件使用编译后的 meta-json-schema.json
|
|
11
|
-
".temp/meta-json-schema.json": "test/clash-meta/**/*.yaml",
|
|
12
|
-
// test/clash-verge 目录的 YAML 文件使用编译后的 clash-verge-merge-json-schema.json
|
|
13
|
-
".temp/clash-verge-merge-json-schema.json": "test/clash-verge/**/*.yaml"
|
|
14
|
-
},
|
|
15
|
-
// 使用两空格缩进
|
|
16
|
-
"editor.tabSize": 2,
|
|
17
|
-
// 在 workspace 中排除下列文件
|
|
18
|
-
"files.exclude": {
|
|
19
|
-
".gitattributes": true,
|
|
20
|
-
".gitignore": true,
|
|
21
|
-
"package-lock.json": true,
|
|
22
|
-
"CHANGELOG": true
|
|
23
|
-
},
|
|
24
|
-
// 搜索排除下列目录
|
|
25
|
-
"search.exclude": {
|
|
26
|
-
"node_modules": true, // 忽略模块目录
|
|
27
|
-
".temp": true, // 忽略编译输出目录
|
|
28
|
-
"schemas": true // 忽略构建发布目录
|
|
29
|
-
}
|
|
30
|
-
}
|
package/scripts/release.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import bundle from "./util/bundle.mjs";
|
|
2
|
-
import { pkg, resolve } from "./util/env.mjs";
|
|
3
|
-
import { writeToFileSync } from "./util/file.mjs";
|
|
4
|
-
import fs from "fs";
|
|
5
|
-
|
|
6
|
-
(async () => {
|
|
7
|
-
// 读取release配置
|
|
8
|
-
const releases = pkg.config.releases;
|
|
9
|
-
for (let release of releases) {
|
|
10
|
-
if (release.enabled) {
|
|
11
|
-
const source = resolve(release.source);
|
|
12
|
-
const target = resolve(release.target);
|
|
13
|
-
const optimization = release.optimization;
|
|
14
|
-
// 执行bundle
|
|
15
|
-
await bundle(source, target, optimization, true);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// 提取CHANGELOG
|
|
20
|
-
const changelogs = fs.readFileSync(resolve("CHANGELOG.md"), "utf8");
|
|
21
|
-
writeToFileSync(
|
|
22
|
-
resolve("CHANGELOG"),
|
|
23
|
-
changelogs
|
|
24
|
-
.split("---")
|
|
25
|
-
.map(log => log.trim())
|
|
26
|
-
.filter(log => log.startsWith(`## v${pkg.version}`))
|
|
27
|
-
.filter(Boolean)?.[0] ?? ""
|
|
28
|
-
);
|
|
29
|
-
})();
|
package/scripts/util/bundle.mjs
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import $RefParser from '@apidevtools/json-schema-ref-parser';
|
|
2
|
-
import prettier from 'prettier';
|
|
3
|
-
import { writeToFileSync } from './file.mjs';
|
|
4
|
-
|
|
5
|
-
const print = (message, verbose) => {
|
|
6
|
-
if (verbose) console.log(message);
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
// 处理间接引用(引用的内容是另一个内容的引用)
|
|
10
|
-
// 间接引用虽然语法正确,但可能会无法被某些解析器正确解析
|
|
11
|
-
const handleIndirectReference = async jsonObject => {
|
|
12
|
-
// 先进行格式化,防止出错
|
|
13
|
-
let formatted = await format(JSON.stringify(jsonObject));
|
|
14
|
-
// 获取所有引用
|
|
15
|
-
let references = allReferences(formatted);
|
|
16
|
-
// 找出间接引用
|
|
17
|
-
let indirectReferences;
|
|
18
|
-
while ((indirectReferences = references.map(ref => indirectReference(jsonObject, ref)).filter(Boolean)).length > 0) {
|
|
19
|
-
// 替换间接引用为目标引用
|
|
20
|
-
indirectReferences.forEach(reference => {
|
|
21
|
-
formatted = formatted.replaceAll(reference.path, reference.target);
|
|
22
|
-
jsonObject = JSON.parse(formatted);
|
|
23
|
-
references = allReferences(formatted);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
return formatted;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
// 获取所有引用
|
|
30
|
-
const allReferences = formatted => {
|
|
31
|
-
let references = [];
|
|
32
|
-
const regex = /"\$ref": "(.*)"/gm;
|
|
33
|
-
let matcher;
|
|
34
|
-
while ((matcher = regex.exec(formatted)) !== null) {
|
|
35
|
-
regex.lastIndex += matcher.index === regex.lastIndex ? 1 : 0;
|
|
36
|
-
references.push(matcher[1]);
|
|
37
|
-
}
|
|
38
|
-
return [...new Set(references)];
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
// 获取间接引用
|
|
42
|
-
const indirectReference = (jsonObject, ref) => {
|
|
43
|
-
const nodes = ref?.replace('#/', '')?.split('/');
|
|
44
|
-
let path = '#';
|
|
45
|
-
let current = jsonObject;
|
|
46
|
-
let next;
|
|
47
|
-
if (nodes.length > 0) {
|
|
48
|
-
for (let node of nodes) {
|
|
49
|
-
if (!(next = current[node])) break;
|
|
50
|
-
path = `${path}/${node}`;
|
|
51
|
-
current = next;
|
|
52
|
-
if (typeof next === 'object' && next['$ref'] && Object.keys(next).length === 1) {
|
|
53
|
-
return {
|
|
54
|
-
path: path,
|
|
55
|
-
target: next['$ref']
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
const format = async json => {
|
|
63
|
-
// 格式化json内容
|
|
64
|
-
const options = {
|
|
65
|
-
parser: 'json',
|
|
66
|
-
quoteProps: 'as-needed', // 添加引号包裹
|
|
67
|
-
singleQuote: false, //使用单引号
|
|
68
|
-
trailingComma: 'all', // 添加尾随逗号
|
|
69
|
-
bracketSpacing: false, // 添加对象{}之间空格
|
|
70
|
-
proseWrap: 'preserve', // 换行行为
|
|
71
|
-
endOfLine: 'lf', // 换行符
|
|
72
|
-
embeddedLanguageFormatting: 'auto' // 格式化内容中的代码
|
|
73
|
-
};
|
|
74
|
-
return await prettier.format(json, options).then(formatted => formatted);
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export default async function (input, output, optimization, verbose) {
|
|
78
|
-
// bundle文件片段
|
|
79
|
-
print(`📦 Bundling...(${input})`, verbose);
|
|
80
|
-
await $RefParser.bundle(input).then(async jsonObject => {
|
|
81
|
-
// 间接引用解引用,提高兼容性()
|
|
82
|
-
let dereferred = await handleIndirectReference(jsonObject);
|
|
83
|
-
|
|
84
|
-
// 格式化 / 最小化(约缩减40%)
|
|
85
|
-
const schema = optimization ? JSON.stringify(JSON.parse(dereferred)) : (dereferred = await format(dereferred));
|
|
86
|
-
|
|
87
|
-
// 输出内容
|
|
88
|
-
writeToFileSync(output, schema, true);
|
|
89
|
-
print(`💾 Saving to: ${output}`, verbose);
|
|
90
|
-
});
|
|
91
|
-
}
|
package/scripts/util/env.mjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
|
|
4
|
-
// package.json对象
|
|
5
|
-
export const pkg = JSON.parse(fs.readFileSync(path.resolve('package.json'), 'utf8'));
|
|
6
|
-
|
|
7
|
-
// resolve路径
|
|
8
|
-
const workspace = path.dirname(path.resolve('package.json'));
|
|
9
|
-
export const resolve = (...args) => path.resolve(workspace, ...args);
|
package/scripts/util/file.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
|
|
4
|
-
export const writeToFileSync = (file, data, clean = true) => {
|
|
5
|
-
if (fs.existsSync(file) && clean) {
|
|
6
|
-
fs.rmSync(file);
|
|
7
|
-
}
|
|
8
|
-
const directory = path.dirname(file);
|
|
9
|
-
if (!fs.existsSync(directory)) {
|
|
10
|
-
fs.mkdirSync(directory, { recursive: true });
|
|
11
|
-
}
|
|
12
|
-
fs.writeFileSync(file, data);
|
|
13
|
-
};
|
package/scripts/watch.mjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import bundle from './util/bundle.mjs';
|
|
4
|
-
import { pkg, resolve } from './util/env.mjs';
|
|
5
|
-
|
|
6
|
-
const watchPath = resolve('./src');
|
|
7
|
-
(async () => {
|
|
8
|
-
console.log(`♻️ Watching for: ${watchPath} ...`);
|
|
9
|
-
|
|
10
|
-
for (let source of pkg.config.watches) {
|
|
11
|
-
const target = resolve(`./.temp/${source.substr(source.lastIndexOf('/') + 1)}`);
|
|
12
|
-
|
|
13
|
-
// 监测目录及子目录的文件变动
|
|
14
|
-
fs.watch(watchPath, { recursive: true }, async (_type, filename) => {
|
|
15
|
-
const file = path.resolve(watchPath, filename);
|
|
16
|
-
if (fs.existsSync(file)) {
|
|
17
|
-
try {
|
|
18
|
-
console.log(`Changes in: ${file}`);
|
|
19
|
-
|
|
20
|
-
// 执行bundle
|
|
21
|
-
await bundle(source, target, false, false);
|
|
22
|
-
} catch (error) {
|
|
23
|
-
console.error(`Error watching: ${file}: `, error);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
})();
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
-
"$id": "https://github.com/clash-verge-rev/clash-verge-rev/schemas/meta-json-schema.json",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"title": "Clash Verge Merge",
|
|
6
|
-
"additionalProperties": true,
|
|
7
|
-
"definitions": {
|
|
8
|
-
"meta-json-schema": { "$ref": "./meta-json-schema.json" },
|
|
9
|
-
"proxies": { "$ref": "./modules/config/proxies.json" },
|
|
10
|
-
"proxy-groups": { "$ref": "./modules/config/proxy-groups.json" },
|
|
11
|
-
"rules": { "$ref": "./modules/config/rules.json" }
|
|
12
|
-
},
|
|
13
|
-
"allOf": [
|
|
14
|
-
{ "title": "覆写profile配置", "$ref": "#/definitions/meta-json-schema" },
|
|
15
|
-
{
|
|
16
|
-
"type": "object",
|
|
17
|
-
"title": "前置规则配置",
|
|
18
|
-
"properties": {
|
|
19
|
-
"prepend-rules": { "title": "前置规则配置", "$ref": "#/definitions/rules" }
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"type": "object",
|
|
24
|
-
"title": "前置代理节点配置",
|
|
25
|
-
"properties": {
|
|
26
|
-
"prepend-proxies": { "title": "前置代理节点配置", "$ref": "#/definitions/proxies" }
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"type": "object",
|
|
31
|
-
"title": "前置代理组配置",
|
|
32
|
-
"properties": {
|
|
33
|
-
"prepend-proxy-groups": { "title": "前置代理组配置", "$ref": "#/definitions/proxy-groups" }
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"type": "object",
|
|
38
|
-
"title": "后置规则配置",
|
|
39
|
-
"properties": {
|
|
40
|
-
"append-rules": { "title": "后置规则配置", "$ref": "#/definitions/rules" }
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"type": "object",
|
|
45
|
-
"title": "后置代理节点配置",
|
|
46
|
-
"properties": {
|
|
47
|
-
"append-proxies": { "title": "后置代理节点配置", "$ref": "#/definitions/proxies" }
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"type": "object",
|
|
52
|
-
"title": "后置代理组配置",
|
|
53
|
-
"properties": {
|
|
54
|
-
"append-proxy-groups": { "title": "后置代理组配置", "$ref": "#/definitions/proxy-groups" }
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
]
|
|
58
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"string": { "anyOf": [{ "type": "string" }, { "pattern": "^\\d+(\\.\\d+)?$" }] },
|
|
3
|
-
"integer": { "anyOf": [{ "type": "integer" }, { "pattern": "^\\d+$" }] },
|
|
4
|
-
"number": { "anyOf": [{ "type": "number" }, { "pattern": "^\\d+(\\.\\d+)?$" }] },
|
|
5
|
-
"boolean": { "anyOf": [{ "type": "boolean" }, { "pattern": "^(?i)(true|false)$" }] }
|
|
6
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cipher": {
|
|
3
|
-
"description": "加密方法",
|
|
4
|
-
"enum": [
|
|
5
|
-
"none",
|
|
6
|
-
"auto",
|
|
7
|
-
"dummy",
|
|
8
|
-
"aes-128-gcm",
|
|
9
|
-
"aes-192-gcm",
|
|
10
|
-
"aes-256-gcm",
|
|
11
|
-
"lea-128-gcm",
|
|
12
|
-
"lea-192-gcm",
|
|
13
|
-
"lea-256-gcm",
|
|
14
|
-
"aes-128-gcm-siv",
|
|
15
|
-
"aes-256-gcm-siv",
|
|
16
|
-
"2022-blake3-aes-128-gcm",
|
|
17
|
-
"2022-blake3-aes-256-gcm",
|
|
18
|
-
"aes-128-cfb",
|
|
19
|
-
"aes-192-cfb",
|
|
20
|
-
"aes-256-cfb",
|
|
21
|
-
"aes-128-ctr",
|
|
22
|
-
"aes-192-ctr",
|
|
23
|
-
"aes-256-ctr",
|
|
24
|
-
"chacha20",
|
|
25
|
-
"chacha20-ietf",
|
|
26
|
-
"chacha20-ietf-poly1305",
|
|
27
|
-
"2022-blake3-chacha20-poly1305",
|
|
28
|
-
"rabbit128-poly1305",
|
|
29
|
-
"xchacha20-ietf-poly1305",
|
|
30
|
-
"xchacha20",
|
|
31
|
-
"aegis-128l",
|
|
32
|
-
"aegis-256",
|
|
33
|
-
"aez-384",
|
|
34
|
-
"deoxys-ii-256-128",
|
|
35
|
-
"rc4-md5"
|
|
36
|
-
]
|
|
37
|
-
},
|
|
38
|
-
"fingerprint": {
|
|
39
|
-
"description": "指纹",
|
|
40
|
-
"enum": [
|
|
41
|
-
"chrome",
|
|
42
|
-
"chrome_psk",
|
|
43
|
-
"chrome_psk_shuffle",
|
|
44
|
-
"chrome_padding_psk_shuffle",
|
|
45
|
-
"chrome_pq",
|
|
46
|
-
"chrome_pq_psk",
|
|
47
|
-
"firefox",
|
|
48
|
-
"safari",
|
|
49
|
-
"ios",
|
|
50
|
-
"android",
|
|
51
|
-
"edge",
|
|
52
|
-
"360",
|
|
53
|
-
"qq",
|
|
54
|
-
"random",
|
|
55
|
-
"randomized"
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"port": {
|
|
3
|
-
"anyOf": [
|
|
4
|
-
{ "type": "integer", "minimum": 0, "maximum": 65535 },
|
|
5
|
-
{
|
|
6
|
-
"type": "string",
|
|
7
|
-
"pattern": "^(?:[1-9]\\d{0,3}|[1-5]\\d{4}|6[0-4]\\d{3}|65[0-4]\\d{2}|655[0-2]\\d|6553[0-5])$",
|
|
8
|
-
"errorMessage": "无效的端口号(0~65535)"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
},
|
|
12
|
-
"portRange": {
|
|
13
|
-
"pattern": "^(?:[1-9]\\d{0,3}|[1-5]\\d{4}|6[0-4]\\d{3}|65[0-4]\\d{2}|655[0-2]\\d|6553[0-5])$|^([1-9]\\d{0,3}|[1-5]\\d{4}|6[0-4]\\d{3}|65[0-4]\\d{2}|655[0-2]\\d|6553[0-5])-(?:[1-9]\\d{0,3}|[1-5]\\d{4}|6[0-4]\\d{3}|65[0-4]\\d{2}|655[0-2]\\d|6553[0-5])$",
|
|
14
|
-
"errorMessage": "无效的端口范围(port 或 port1-port2)"
|
|
15
|
-
},
|
|
16
|
-
"ipv4": {
|
|
17
|
-
"pattern": "^(?:(?:[1-9]?[0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))\\.){3}(?:[1-9]?[0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))$",
|
|
18
|
-
"errorMessage": "无效的IPv4地址"
|
|
19
|
-
},
|
|
20
|
-
"ipv4Port": {
|
|
21
|
-
"pattern": "^((?:(?:[1-9]?[0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))\\.){3}(?:[1-9]?[0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5])))?:(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-5]{2}[0-3][0-5])$",
|
|
22
|
-
"errorMessage": "无效的IPv4地址:端口"
|
|
23
|
-
},
|
|
24
|
-
"ipv4CIDR": {
|
|
25
|
-
"pattern": "^(?:(?:[1-9]?[0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))\\.){3}(?:[1-9]?[0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))(?:\\/(?:[12]?[0-9]|3[0-2]))$",
|
|
26
|
-
"errorMessage": "无效的IPv4网段"
|
|
27
|
-
},
|
|
28
|
-
"ipv6": {
|
|
29
|
-
"pattern": "^([0-9a-fA-F]{1,4}(?::[0-9a-fA-F]{1,4}){7}|::|:(?::[0-9a-fA-F]{1,4}){1,6}|[0-9a-fA-F]{1,4}:(?::[0-9a-fA-F]{1,4}){1,5}|(?:[0-9a-fA-F]{1,4}:){2}(?::[0-9a-fA-F]{1,4}){1,4}|(?:[0-9a-fA-F]{1,4}:){3}(?::[0-9a-fA-F]{1,4}){1,3}|(?:[0-9a-fA-F]{1,4}:){4}(?::[0-9a-fA-F]{1,4}){1,2}|(?:[0-9a-fA-F]{1,4}:){5}:[0-9a-fA-F]{1,4}|(?:[0-9a-fA-F]{1,4}:){1,6}:)$",
|
|
30
|
-
"errorMessage": "无效的IPv6地址"
|
|
31
|
-
},
|
|
32
|
-
"ipv6Port": {
|
|
33
|
-
"pattern": "^(\\[([0-9a-fA-F]{1,4}(?::[0-9a-fA-F]{1,4}){7}|::|:(?::[0-9a-fA-F]{1,4}){1,6}|[0-9a-fA-F]{1,4}:(?::[0-9a-fA-F]{1,4}){1,5}|(?:[0-9a-fA-F]{1,4}:){2}(?::[0-9a-fA-F]{1,4}){1,4}|(?:[0-9a-fA-F]{1,4}:){3}(?::[0-9a-fA-F]{1,4}){1,3}|(?:[0-9a-fA-F]{1,4}:){4}(?::[0-9a-fA-F]{1,4}){1,2}|(?:[0-9a-fA-F]{1,4}:){5}:[0-9a-fA-F]{1,4}|(?:[0-9a-fA-F]{1,4}:){1,6}:)\\])?:(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-5]{2}[0-3][0-5])$",
|
|
34
|
-
"errorMessage": "无效的[IPv6地址]:端口"
|
|
35
|
-
},
|
|
36
|
-
"ipv6CIDR": {
|
|
37
|
-
"pattern": "^([0-9a-fA-F]{1,4}(?::[0-9a-fA-F]{1,4}){7}|::|:(?::[0-9a-fA-F]{1,4}){1,6}|[0-9a-fA-F]{1,4}:(?::[0-9a-fA-F]{1,4}){1,5}|(?:[0-9a-fA-F]{1,4}:){2}(?::[0-9a-fA-F]{1,4}){1,4}|(?:[0-9a-fA-F]{1,4}:){3}(?::[0-9a-fA-F]{1,4}){1,3}|(?:[0-9a-fA-F]{1,4}:){4}(?::[0-9a-fA-F]{1,4}){1,2}|(?:[0-9a-fA-F]{1,4}:){5}:[0-9a-fA-F]{1,4}|(?:[0-9a-fA-F]{1,4}:){1,6}:)\\/(?:12[0-8]|1[01][0-9]|[1-9]?[0-9])$",
|
|
38
|
-
"errorMessage": "无效的IPv6网段"
|
|
39
|
-
},
|
|
40
|
-
"ip": {
|
|
41
|
-
"anyOf": [
|
|
42
|
-
{ "description": "ipv4", "$ref": "#/ipv4" },
|
|
43
|
-
{ "description": "ipv6", "$ref": "#/ipv6" }
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
|
-
"ipPort": {
|
|
47
|
-
"anyOf": [
|
|
48
|
-
{ "description": "ipv4:端口", "$ref": "#/ipv4Port" },
|
|
49
|
-
{ "description": "[ipv6]:端口", "$ref": "#/ipv6Port" }
|
|
50
|
-
]
|
|
51
|
-
},
|
|
52
|
-
"ipCIDR": {
|
|
53
|
-
"anyOf": [
|
|
54
|
-
{ "description": "ipv4网段", "$ref": "#/ipv4CIDR" },
|
|
55
|
-
{ "description": "ipv6网段", "$ref": "#/ipv6CIDR" }
|
|
56
|
-
]
|
|
57
|
-
},
|
|
58
|
-
"domain": {
|
|
59
|
-
"pattern": "^(xn--)?[a-zA-Z0-9-_]+(?:\\.(xn--)?[a-zA-Z0-9-_]+)+$",
|
|
60
|
-
"errorMessage": "无效的域名"
|
|
61
|
-
},
|
|
62
|
-
"domainWildcard": {
|
|
63
|
-
"pattern": "^[\\.\\+]?(xn--)?[a-zA-Z0-9-_*]+(?:\\.(xn--)?[a-zA-Z0-9-_*]+)+$",
|
|
64
|
-
"errorMessage": "无效的域名通配"
|
|
65
|
-
},
|
|
66
|
-
"server": {
|
|
67
|
-
"anyOf": [
|
|
68
|
-
{ "description": "ipv4", "$ref": "#/ipv4" },
|
|
69
|
-
{ "description": "ipv4:端口", "$ref": "#/ipv4Port" },
|
|
70
|
-
{ "description": "ipv6", "$ref": "#/ipv6" },
|
|
71
|
-
{ "description": "[ipv6]:端口", "$ref": "#/ipv6Port" },
|
|
72
|
-
{ "description": "域名", "$ref": "#/domain" }
|
|
73
|
-
]
|
|
74
|
-
},
|
|
75
|
-
"url": {
|
|
76
|
-
"pattern": "^.+:\\/\\/([^\\s/$.?#].[^\\s]*)\\.[^\\s]{2,}(\\/[^\\s]*)?$",
|
|
77
|
-
"errorMessage": "无效的URL"
|
|
78
|
-
},
|
|
79
|
-
"httpUrl": {
|
|
80
|
-
"pattern": "^https?:\\/\\/([^\\s/$.?#].[^\\s]*)\\.[^\\s]{2,}(\\/[^\\s]*)?$",
|
|
81
|
-
"errorMessage": "无效的HTTP-URL"
|
|
82
|
-
},
|
|
83
|
-
"uuid": {
|
|
84
|
-
"pattern": "^[0-9a-fA-F]{8}(?:-?[0-9a-fA-F]{4}){3}-?[0-9a-fA-F]{12}$",
|
|
85
|
-
"errorMessage": "无效的UUID"
|
|
86
|
-
}
|
|
87
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"stringArray": {
|
|
3
|
-
"type": "array",
|
|
4
|
-
"items": { "$ref": "compatible.json#/string" }
|
|
5
|
-
},
|
|
6
|
-
"portArray": {
|
|
7
|
-
"type": "array",
|
|
8
|
-
"items": { "$ref": "patterns.json#/port" }
|
|
9
|
-
},
|
|
10
|
-
"portRangeArray": {
|
|
11
|
-
"type": "array",
|
|
12
|
-
"items": { "$ref": "patterns.json#/portRange" }
|
|
13
|
-
},
|
|
14
|
-
"ipv4Array": {
|
|
15
|
-
"type": "array",
|
|
16
|
-
"items": { "$ref": "patterns.json#/ipv4" }
|
|
17
|
-
},
|
|
18
|
-
"ipv4PortArray": {
|
|
19
|
-
"type": "array",
|
|
20
|
-
"items": { "$ref": "patterns.json#/ipv4Port" }
|
|
21
|
-
},
|
|
22
|
-
"ipv4CIDRArray": {
|
|
23
|
-
"type": "array",
|
|
24
|
-
"items": { "$ref": "patterns.json#/ipv4CIDR" }
|
|
25
|
-
},
|
|
26
|
-
"ipv6Array": {
|
|
27
|
-
"type": "array",
|
|
28
|
-
"items": { "$ref": "patterns.json#/ipv6" }
|
|
29
|
-
},
|
|
30
|
-
"ipv6PortArray": {
|
|
31
|
-
"type": "array",
|
|
32
|
-
"items": { "$ref": "patterns.json#/ipv6Port" }
|
|
33
|
-
},
|
|
34
|
-
"ipv6CIDRArray": {
|
|
35
|
-
"type": "array",
|
|
36
|
-
"items": { "$ref": "patterns.json#/ipv6CIDR" }
|
|
37
|
-
},
|
|
38
|
-
"ipArray": {
|
|
39
|
-
"type": "array",
|
|
40
|
-
"items": { "$ref": "patterns.json#/ip" }
|
|
41
|
-
},
|
|
42
|
-
"ipPortArray": {
|
|
43
|
-
"type": "array",
|
|
44
|
-
"items": { "$ref": "patterns.json#/ipPort" }
|
|
45
|
-
},
|
|
46
|
-
"ipCIDRArray": {
|
|
47
|
-
"type": "array",
|
|
48
|
-
"items": { "$ref": "patterns.json#/ipCIDR" }
|
|
49
|
-
},
|
|
50
|
-
"serverArray": {
|
|
51
|
-
"type": "array",
|
|
52
|
-
"items": { "$ref": "patterns.json#/server" }
|
|
53
|
-
},
|
|
54
|
-
"domainArray": {
|
|
55
|
-
"type": "array",
|
|
56
|
-
"items": { "$ref": "patterns.json#/domain" }
|
|
57
|
-
},
|
|
58
|
-
"domainWildcardArray": {
|
|
59
|
-
"type": "array",
|
|
60
|
-
"items": { "$ref": "patterns.json#/domainWildcard" }
|
|
61
|
-
},
|
|
62
|
-
"urlArray": {
|
|
63
|
-
"type": "array",
|
|
64
|
-
"items": { "$ref": "patterns.json#/url" }
|
|
65
|
-
},
|
|
66
|
-
"httpUrlArray": {
|
|
67
|
-
"type": "array",
|
|
68
|
-
"items": { "$ref": "patterns.json#/httpUrl" }
|
|
69
|
-
}
|
|
70
|
-
}
|