meta-json-schema 1.18.3-beta → 1.18.4-beta3

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.
@@ -0,0 +1,44 @@
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
@@ -0,0 +1,18 @@
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"
@@ -1,3 +1,3 @@
1
1
  {
2
- "recommendations": ["redhat.vscode-yaml"]
2
+ "recommendations": ["redhat.vscode-yaml", "usernamehw.errorlens"]
3
3
  }
@@ -1,18 +1,30 @@
1
1
  {
2
2
  "json.schemas": [
3
3
  {
4
+ // src 目录的JSON文件使用JSON Schema Draft 07
4
5
  "url": "http://json-schema.org/draft-07/schema",
5
6
  "fileMatch": ["/src/**/*.json"]
6
7
  }
7
8
  ],
8
9
  "yaml.schemas": {
10
+ // test/clash-meta 目录的 YAML 文件使用编译后的 meta-json-schema.json
9
11
  ".temp/meta-json-schema.json": "test/clash-meta/**/*.yaml",
12
+ // test/clash-verge 目录的 YAML 文件使用编译后的 clash-verge-merge-json-schema.json
10
13
  ".temp/clash-verge-merge-json-schema.json": "test/clash-verge/**/*.yaml"
11
14
  },
15
+ // 使用两空格缩进
12
16
  "editor.tabSize": 2,
17
+ // 在 workspace 中排除下列文件
13
18
  "files.exclude": {
14
19
  ".gitattributes": true,
15
20
  ".gitignore": true,
16
- "package-lock.json": true
21
+ "package-lock.json": true,
22
+ "CHANGELOG": true
23
+ },
24
+ // 搜索排除下列目录
25
+ "search.exclude": {
26
+ "node_modules": true, // 忽略模块目录
27
+ ".temp": true, // 忽略编译输出目录
28
+ "schemas": true // 忽略构建发布目录
17
29
  }
18
30
  }
package/CHANGELOG.md CHANGED
@@ -1,3 +1,34 @@
1
+ ## v1.18.4-beta3
2
+
3
+ ### Changes
4
+
5
+ - 新增: `dns` 新增配置项 `use-system-hosts`
6
+ - 调整: 调整部分配置描述
7
+ - 移除: Clash Verge Merge 配置移除`prepend-rule-providers`、`prepend-proxy-providers`、`append-rule-providers`、`append-proxy-providers`
8
+
9
+ ### Bugs Fixes
10
+
11
+ - 修复: cipher 缺少 `none`
12
+ - 修复: `default-nameserver`类型错误
13
+
14
+ ---
15
+
16
+ ## v1.18.4
17
+
18
+ ### Changes
19
+
20
+ - 新增: `proxy-providers` 新增配置项 `header`
21
+ - 调整: `proxy-providers`,`proxy-group` 配置项 `health-check`的`interval` 和 `timeout` 属性类型变更(`integer` --> `string`), 支持配置时间单位
22
+ - 新增: 新增配置项`external-controller-unix`,允许使用Unix Socket访问API
23
+
24
+ ### Bugs Fixes
25
+
26
+ - 字符串数组类型错误
27
+ - 监听地址支持`:port`
28
+ - sniffer的http ports类型错误
29
+
30
+ ---
31
+
1
32
  ## v1.18.3
2
33
 
3
34
  ### Features
package/README.md CHANGED
@@ -1,4 +1,8 @@
1
- ## 用法
1
+ ### 🧩 VSCode 插件
2
+
3
+ VS Code 扩展商店搜索 `Meta JSON Schema` 或 `ClashMeta.meta-json-schema`,安装扩展后即可获取 `Clash.Meta`的语法支持。
4
+
5
+ ## 💡 用法
2
6
 
3
7
  <details>
4
8
  <summary>Visual Studio Code中使用</summary>
@@ -35,16 +39,16 @@
35
39
  2. 配置`vite.config.ts`。
36
40
 
37
41
  ```javascript
38
- import { defineConfig } from 'vite';
39
- import monacoEditor from 'vite-plugin-monaco-editor';
42
+ import { defineConfig } from "vite";
43
+ import monacoEditor from "vite-plugin-monaco-editor";
40
44
  export default defineConfig({
41
45
  plugins: [
42
46
  monacoEditor({
43
- languageWorkers: ['editorWorkerService'],
47
+ languageWorkers: ["editorWorkerService"],
44
48
  customWorkers: [
45
49
  {
46
- label: 'yaml',
47
- entry: 'monaco-yaml/yaml.worker'
50
+ label: "yaml",
51
+ entry: "monaco-yaml/yaml.worker"
48
52
  }
49
53
  ]
50
54
  })
@@ -55,16 +59,16 @@
55
59
  3. 代码中配置schema(请根据需求自行修改`fileMatch`)。
56
60
 
57
61
  ```javascript
58
- import * as monaco from 'monaco-editor';
59
- import { configureMonacoYaml } from 'monaco-yaml';
62
+ import * as monaco from "monaco-editor";
63
+ import { configureMonacoYaml } from "monaco-yaml";
60
64
 
61
65
  configureMonacoYaml(monaco, {
62
66
  validate: true,
63
67
  enableSchemaRequest: true,
64
68
  schemas: [
65
69
  {
66
- uri: 'https://fastly.jsdelivr.net/gh/dongchengjie/airport@main/meta-json-schema.json',
67
- fileMatch: ['**/*.clash.yaml']
70
+ uri: "https://fastly.jsdelivr.net/gh/dongchengjie/airport@main/meta-json-schema.json",
71
+ fileMatch: ["**/*.clash.yaml"]
68
72
  }
69
73
  ]
70
74
  });
@@ -78,7 +82,7 @@
78
82
 
79
83
  - <a href="https://dongchengjie.github.io/meta-json-schema/?schema=https://raw.githubusercontent.com/dongchengjie/meta-json-schema/main/schemas/clash-verge-merge-json-schema.json" target="_blank">clash-verge-merge-json-schema</a>
80
84
 
81
- ## 开发
85
+ ## 🖥️ 开发
82
86
 
83
87
  1. 下载代码
84
88
 
@@ -140,11 +144,11 @@ npm run release
140
144
  interface JSONSchema {
141
145
  // 自定义Snippet建议(数组)
142
146
  defaultSnippets?: {
143
- label?: string; // 标题
144
- description?: string; // 描述
145
- markdownDescription?: string; // 描述(markdown格式)
146
- body?: any; // 内容
147
- bodyText?: string; // 内容文本
147
+ label: string; // 标签文本(索引)
148
+ description?: string; // 标签描述(需要点击展开)
149
+ markdownDescription?: string; // 标签描述(需要点击展开,markdown格式,优先级高于description,)
150
+ body: any; // 实际取值内容
151
+ bodyText?: string; // 实际取值内容文本(暂无作用)
148
152
  }[];
149
153
  errorMessage?: string; // 错误信息
150
154
  patternErrorMessage?: string; // 格式错误信息(优先级高于errorMessage)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meta-json-schema",
3
- "version": "1.18.3-beta",
3
+ "version": "1.18.4-beta3",
4
4
  "keywords": [
5
5
  "clash",
6
6
  "clash.meta",
@@ -9,6 +9,7 @@
9
9
  "publishConfig": {
10
10
  "registry": "https://registry.npmjs.org"
11
11
  },
12
+ "license": "MIT",
12
13
  "config": {
13
14
  "watches": [
14
15
  "./src/meta-json-schema.json",
@@ -1,5 +1,7 @@
1
- import bundle from './util/bundle.mjs';
2
- import { pkg, resolve } from './util/env.mjs';
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";
3
5
 
4
6
  (async () => {
5
7
  // 读取release配置
@@ -13,4 +15,15 @@ import { pkg, resolve } from './util/env.mjs';
13
15
  await bundle(source, target, optimization, true);
14
16
  }
15
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
+ );
16
29
  })();
@@ -7,9 +7,7 @@
7
7
  "definitions": {
8
8
  "meta-json-schema": { "$ref": "./meta-json-schema.json" },
9
9
  "proxies": { "$ref": "./modules/config/proxies.json" },
10
- "proxy-providers": { "$ref": "./modules/config/proxy-providers.json" },
11
10
  "proxy-groups": { "$ref": "./modules/config/proxy-groups.json" },
12
- "rule-providers": { "$ref": "./modules/rules/provider/provider.json" },
13
11
  "rules": { "$ref": "./modules/config/rules.json" }
14
12
  },
15
13
  "allOf": [
@@ -21,25 +19,11 @@
21
19
  "prepend-rules": { "title": "前置规则配置", "$ref": "#/definitions/rules" }
22
20
  }
23
21
  },
24
- {
25
- "type": "object",
26
- "title": "前置规则集合配置",
27
- "properties": {
28
- "prepend-rule-providers": { "title": "前置规则集合配置", "$ref": "#/definitions/rule-providers" }
29
- }
30
- },
31
22
  {
32
23
  "type": "object",
33
24
  "title": "前置代理节点配置",
34
25
  "properties": {
35
- "prepend-proxies": { "title": "prepend-proxies", "$ref": "#/definitions/proxies" }
36
- }
37
- },
38
- {
39
- "type": "object",
40
- "title": "前置代理集合配置",
41
- "properties": {
42
- "prepend-proxy-providers": { "title": "前置代理集合配置", "$ref": "#/definitions/proxy-providers" }
26
+ "prepend-proxies": { "title": "前置代理节点配置", "$ref": "#/definitions/proxies" }
43
27
  }
44
28
  },
45
29
  {
@@ -56,13 +40,6 @@
56
40
  "append-rules": { "title": "后置规则配置", "$ref": "#/definitions/rules" }
57
41
  }
58
42
  },
59
- {
60
- "type": "object",
61
- "title": "后置规则集合配置",
62
- "properties": {
63
- "append-rule-providers": { "title": "后置规则集合配置", "$ref": "#/definitions/rule-providers" }
64
- }
65
- },
66
43
  {
67
44
  "type": "object",
68
45
  "title": "后置代理节点配置",
@@ -70,13 +47,6 @@
70
47
  "append-proxies": { "title": "后置代理节点配置", "$ref": "#/definitions/proxies" }
71
48
  }
72
49
  },
73
- {
74
- "type": "object",
75
- "title": "后置代理集合配置",
76
- "properties": {
77
- "append-proxy-providers": { "title": "后置代理集合配置", "$ref": "#/definitions/proxy-providers" }
78
- }
79
- },
80
50
  {
81
51
  "type": "object",
82
52
  "title": "后置代理组配置",
@@ -2,6 +2,7 @@
2
2
  "cipher": {
3
3
  "description": "加密方法",
4
4
  "enum": [
5
+ "none",
5
6
  "auto",
6
7
  "dummy",
7
8
  "aes-128-gcm",
@@ -18,7 +18,7 @@
18
18
  "errorMessage": "无效的IPv4地址"
19
19
  },
20
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])$",
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
22
  "errorMessage": "无效的IPv4地址:端口"
23
23
  },
24
24
  "ipv4CIDR": {
@@ -30,7 +30,7 @@
30
30
  "errorMessage": "无效的IPv6地址"
31
31
  },
32
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])$",
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
34
  "errorMessage": "无效的[IPv6地址]:端口"
35
35
  },
36
36
  "ipv6CIDR": {
@@ -1,155 +1,70 @@
1
1
  {
2
2
  "stringArray": {
3
- "anyOf": [
4
- {
5
- "type": "array",
6
- "items": { "$ref": "compatible.json#/string" }
7
- },
8
- { "$ref": "compatible.json#/string" }
9
- ]
3
+ "type": "array",
4
+ "items": { "$ref": "compatible.json#/string" }
10
5
  },
11
6
  "portArray": {
12
- "anyOf": [
13
- {
14
- "type": "array",
15
- "items": { "$ref": "patterns.json#/port" }
16
- },
17
- { "$ref": "patterns.json#/port" }
18
- ]
7
+ "type": "array",
8
+ "items": { "$ref": "patterns.json#/port" }
19
9
  },
20
10
  "portRangeArray": {
21
- "anyOf": [
22
- {
23
- "type": "array",
24
- "items": { "$ref": "patterns.json#/portRange" }
25
- },
26
- { "$ref": "patterns.json#/portRange" }
27
- ]
11
+ "type": "array",
12
+ "items": { "$ref": "patterns.json#/portRange" }
28
13
  },
29
14
  "ipv4Array": {
30
- "anyOf": [
31
- {
32
- "type": "array",
33
- "items": { "$ref": "patterns.json#/ipv4" }
34
- },
35
- { "$ref": "patterns.json#/ipv4" }
36
- ]
15
+ "type": "array",
16
+ "items": { "$ref": "patterns.json#/ipv4" }
37
17
  },
38
18
  "ipv4PortArray": {
39
- "anyOf": [
40
- {
41
- "type": "array",
42
- "items": { "$ref": "patterns.json#/ipv4Port" }
43
- },
44
- { "$ref": "patterns.json#/ipv4Port" }
45
- ]
19
+ "type": "array",
20
+ "items": { "$ref": "patterns.json#/ipv4Port" }
46
21
  },
47
22
  "ipv4CIDRArray": {
48
- "anyOf": [
49
- {
50
- "type": "array",
51
- "items": { "$ref": "patterns.json#/ipv4CIDR" }
52
- },
53
- { "$ref": "patterns.json#/ipv4CIDR" }
54
- ]
23
+ "type": "array",
24
+ "items": { "$ref": "patterns.json#/ipv4CIDR" }
55
25
  },
56
26
  "ipv6Array": {
57
- "anyOf": [
58
- {
59
- "type": "array",
60
- "items": { "$ref": "patterns.json#/ipv6" }
61
- },
62
- { "$ref": "patterns.json#/ipv6" }
63
- ]
27
+ "type": "array",
28
+ "items": { "$ref": "patterns.json#/ipv6" }
64
29
  },
65
30
  "ipv6PortArray": {
66
- "anyOf": [
67
- {
68
- "type": "array",
69
- "items": { "$ref": "patterns.json#/ipv6Port" }
70
- },
71
- { "$ref": "patterns.json#/ipv6Port" }
72
- ]
31
+ "type": "array",
32
+ "items": { "$ref": "patterns.json#/ipv6Port" }
73
33
  },
74
34
  "ipv6CIDRArray": {
75
- "anyOf": [
76
- {
77
- "type": "array",
78
- "items": { "$ref": "patterns.json#/ipv6CIDR" }
79
- },
80
- { "$ref": "patterns.json#/ipv6CIDR" }
81
- ]
35
+ "type": "array",
36
+ "items": { "$ref": "patterns.json#/ipv6CIDR" }
82
37
  },
83
38
  "ipArray": {
84
- "anyOf": [
85
- {
86
- "type": "array",
87
- "items": { "$ref": "patterns.json#/ip" }
88
- },
89
- { "$ref": "patterns.json#/ip" }
90
- ]
39
+ "type": "array",
40
+ "items": { "$ref": "patterns.json#/ip" }
91
41
  },
92
42
  "ipPortArray": {
93
- "anyOf": [
94
- {
95
- "type": "array",
96
- "items": { "$ref": "patterns.json#/ipPort" }
97
- },
98
- { "$ref": "patterns.json#/ipPort" }
99
- ]
43
+ "type": "array",
44
+ "items": { "$ref": "patterns.json#/ipPort" }
100
45
  },
101
46
  "ipCIDRArray": {
102
- "anyOf": [
103
- {
104
- "type": "array",
105
- "items": { "$ref": "patterns.json#/ipCIDR" }
106
- },
107
- { "$ref": "patterns.json#/ipCIDR" }
108
- ]
47
+ "type": "array",
48
+ "items": { "$ref": "patterns.json#/ipCIDR" }
109
49
  },
110
50
  "serverArray": {
111
- "anyOf": [
112
- {
113
- "type": "array",
114
- "items": { "$ref": "patterns.json#/server" }
115
- },
116
- { "$ref": "patterns.json#/server" }
117
- ]
51
+ "type": "array",
52
+ "items": { "$ref": "patterns.json#/server" }
118
53
  },
119
54
  "domainArray": {
120
- "anyOf": [
121
- {
122
- "type": "array",
123
- "items": { "$ref": "patterns.json#/domain" }
124
- },
125
- { "$ref": "patterns.json#/domain" }
126
- ]
55
+ "type": "array",
56
+ "items": { "$ref": "patterns.json#/domain" }
127
57
  },
128
58
  "domainWildcardArray": {
129
- "anyOf": [
130
- {
131
- "type": "array",
132
- "items": { "$ref": "patterns.json#/domainWildcard" }
133
- },
134
- { "$ref": "patterns.json#/domainWildcard" }
135
- ]
59
+ "type": "array",
60
+ "items": { "$ref": "patterns.json#/domainWildcard" }
136
61
  },
137
62
  "urlArray": {
138
- "anyOf": [
139
- {
140
- "type": "array",
141
- "items": { "$ref": "patterns.json#/url" }
142
- },
143
- { "$ref": "patterns.json#/url" }
144
- ]
63
+ "type": "array",
64
+ "items": { "$ref": "patterns.json#/url" }
145
65
  },
146
66
  "httpUrlArray": {
147
- "anyOf": [
148
- {
149
- "type": "array",
150
- "items": { "$ref": "patterns.json#/httpUrl" }
151
- },
152
- { "$ref": "patterns.json#/httpUrl" }
153
- ]
67
+ "type": "array",
68
+ "items": { "$ref": "patterns.json#/httpUrl" }
154
69
  }
155
70
  }
@@ -8,20 +8,20 @@
8
8
  "enums": { "$ref": "../../../definitions/enums.json" },
9
9
  "base-option": {
10
10
  "type": "object",
11
- "title": "outbound基础配置",
11
+ "title": "出站基础配置",
12
12
  "properties": {
13
13
  "name": {
14
14
  "$ref": "#/definitions/compatible/string",
15
- "title": "outbound名称",
16
- "description": "outbound名称",
17
- "markdownDescription": "outbound名称"
15
+ "title": "出站名称",
16
+ "description": "出站名称",
17
+ "markdownDescription": "出站名称"
18
18
  },
19
19
  "type": {
20
20
  "enum": ["select", "url-test", "fallback", "load-balance", "relay"],
21
21
  "markdownEnumDescriptions": ["手动选择", "延迟选优", "故障转移", "负载均衡", "链式代理"],
22
- "title": "outbound类型",
23
- "description": "outbound类型",
24
- "markdownDescription": "outbound类型"
22
+ "title": "出站类型",
23
+ "description": "出站类型",
24
+ "markdownDescription": "出站类型"
25
25
  },
26
26
  "interface-name": {
27
27
  "$ref": "#/definitions/compatible/string",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "basic-option": {
41
41
  "type": "object",
42
- "title": "outbound基本配置",
42
+ "title": "出站基本配置",
43
43
  "properties": {
44
44
  "tfo": {
45
45
  "$ref": "#/definitions/compatible/boolean",
@@ -9,7 +9,7 @@
9
9
  "health-check": { "$ref": "../provider/health-check.json" }
10
10
  },
11
11
  "allOf": [
12
- { "title": "outbound基础配置", "required": ["name", "type"], "$ref": "#/definitions/base-option" },
12
+ { "title": "出站基础配置", "required": ["name", "type"], "$ref": "#/definitions/base-option" },
13
13
  {
14
14
  "allOf": [
15
15
  {
@@ -31,8 +31,8 @@
31
31
  "max-failed-times": {
32
32
  "type": "integer",
33
33
  "title": "最大失败次数",
34
- "description": "在timeout时间长度内,请求失败max-failed-times次,提前主动触发健康检查",
35
- "markdownDescription": "在`timeout`时间长度内,请求失败`max-failed-times`次,提前主动触发健康检查",
34
+ "description": "在timeout时间长度内,请求失败max-failed-times次,强制提前主动触发健康检查",
35
+ "markdownDescription": "在`timeout`时间长度内,请求失败`max-failed-times`次,强制提前主动触发健康检查",
36
36
  "default": 5
37
37
  },
38
38
  "disable-udp": {
@@ -2,6 +2,7 @@
2
2
  "type": "object",
3
3
  "title": "健康检查",
4
4
  "definitions": {
5
+ "compatible": { "$ref": "../../../definitions/compatible.json" },
5
6
  "types": { "$ref": "../../../definitions/types.json" },
6
7
  "patterns": { "$ref": "../../../definitions/patterns.json" },
7
8
  "enums": { "$ref": "../../../definitions/enums.json" }
@@ -22,18 +23,18 @@
22
23
  "default": "https://www.gstatic.com/generate_204"
23
24
  },
24
25
  "interval": {
25
- "type": "integer",
26
+ "$ref": "#/definitions/compatible/string",
26
27
  "title": "健康检查间隔",
27
- "description": "单位:s",
28
- "markdownDescription": "单位:s",
29
- "default": 300
28
+ "description": "格式: <时长>[ms或s(默认:s)]",
29
+ "markdownDescription": "格式: <时长>[ms或s(默认:s)]",
30
+ "default": "300"
30
31
  },
31
32
  "timeout": {
32
- "type": "integer",
33
+ "$ref": "#/definitions/compatible/string",
33
34
  "title": "健康检查超时",
34
- "description": "单位:ms",
35
- "markdownDescription": "单位:ms",
36
- "default": 5000
35
+ "description": "格式: <时长>[ms或s(默认:ms)]",
36
+ "markdownDescription": "格式: <时长>[ms或s(默认:ms)]",
37
+ "default": "5000"
37
38
  },
38
39
  "lazy": {
39
40
  "type": "boolean",
@@ -18,6 +18,12 @@
18
18
  "description": "可以使用RESTful API over HTTPS来控制内核",
19
19
  "markdownDescription": "可以使用RESTful API over HTTPS来控制内核"
20
20
  },
21
+ "external-controller-unix": {
22
+ "type": "string",
23
+ "title": "外部控制器(Unix Socket)监听地址",
24
+ "description": "从Unix Socket访问api接口不会验证secret,如果开启请自行保证安全问题(Windows版本大于17063也可以使用,即大于等于1803/RS4版本即可使用)",
25
+ "markdownDescription": "从Unix Socket访问api接口不会验证secret,如果开启请自行保证安全问题(Windows版本大于17063也可以使用,即大于等于1803/RS4版本即可使用)"
26
+ },
21
27
  "external-ui": {
22
28
  "type": "string",
23
29
  "title": "外部用户界面路径(默认:工作目录/ui)",