meta-json-schema 1.18.3-beta

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.
Files changed (86) hide show
  1. package/.gitattributes +2 -0
  2. package/.vscode/extensions.json +3 -0
  3. package/.vscode/settings.json +18 -0
  4. package/CHANGELOG.md +9 -0
  5. package/LICENSE +21 -0
  6. package/README.md +200 -0
  7. package/package.json +40 -0
  8. package/schemas/clash-verge-merge-json-schema.json +1 -0
  9. package/schemas/meta-json-schema.json +1 -0
  10. package/scripts/release.mjs +16 -0
  11. package/scripts/util/bundle.mjs +91 -0
  12. package/scripts/util/env.mjs +9 -0
  13. package/scripts/util/file.mjs +13 -0
  14. package/scripts/watch.mjs +28 -0
  15. package/src/clash-verge-merge-json-schema.json +88 -0
  16. package/src/definitions/compatible.json +6 -0
  17. package/src/definitions/enums.json +57 -0
  18. package/src/definitions/patterns.json +87 -0
  19. package/src/definitions/types.json +155 -0
  20. package/src/meta-json-schema.json +168 -0
  21. package/src/modules/adapter/outbound/base.json +91 -0
  22. package/src/modules/adapter/outbound/direct.json +39 -0
  23. package/src/modules/adapter/outbound/dns.json +39 -0
  24. package/src/modules/adapter/outbound/http.json +101 -0
  25. package/src/modules/adapter/outbound/hysteria.json +182 -0
  26. package/src/modules/adapter/outbound/hysteria2.json +146 -0
  27. package/src/modules/adapter/outbound/reality.json +25 -0
  28. package/src/modules/adapter/outbound/shadowsocks.json +308 -0
  29. package/src/modules/adapter/outbound/shadowsocksr.json +151 -0
  30. package/src/modules/adapter/outbound/singmux.json +95 -0
  31. package/src/modules/adapter/outbound/snell.json +65 -0
  32. package/src/modules/adapter/outbound/socks5.json +88 -0
  33. package/src/modules/adapter/outbound/ssh.json +87 -0
  34. package/src/modules/adapter/outbound/trojan.json +93 -0
  35. package/src/modules/adapter/outbound/tuic.json +213 -0
  36. package/src/modules/adapter/outbound/vless.json +146 -0
  37. package/src/modules/adapter/outbound/vmess.json +251 -0
  38. package/src/modules/adapter/outbound/wireguard.json +150 -0
  39. package/src/modules/adapter/outboundgroup/fallback.json +18 -0
  40. package/src/modules/adapter/outboundgroup/groupbase.json +98 -0
  41. package/src/modules/adapter/outboundgroup/loadbalance.json +29 -0
  42. package/src/modules/adapter/outboundgroup/relay.json +18 -0
  43. package/src/modules/adapter/outboundgroup/urltest.json +25 -0
  44. package/src/modules/adapter/provider/health-check.json +73 -0
  45. package/src/modules/adapter/provider/provider.json +159 -0
  46. package/src/modules/config/authentication.json +9 -0
  47. package/src/modules/config/controller.json +47 -0
  48. package/src/modules/config/dns.json +156 -0
  49. package/src/modules/config/ebpf.json +22 -0
  50. package/src/modules/config/experimental.json +31 -0
  51. package/src/modules/config/general.json +140 -0
  52. package/src/modules/config/geox-url.json +38 -0
  53. package/src/modules/config/hosts.json +9 -0
  54. package/src/modules/config/inbound.json +98 -0
  55. package/src/modules/config/iptables.json +38 -0
  56. package/src/modules/config/listeners.json +90 -0
  57. package/src/modules/config/ntp.json +50 -0
  58. package/src/modules/config/profile.json +24 -0
  59. package/src/modules/config/proxies.json +118 -0
  60. package/src/modules/config/proxy-groups.json +21 -0
  61. package/src/modules/config/proxy-providers.json +11 -0
  62. package/src/modules/config/rules.json +11 -0
  63. package/src/modules/config/sniffer.json +111 -0
  64. package/src/modules/config/sub-rules.json +14 -0
  65. package/src/modules/config/tls.json +28 -0
  66. package/src/modules/config/tunnels.json +49 -0
  67. package/src/modules/listener/config/tuic.json +102 -0
  68. package/src/modules/listener/config/tun.json +205 -0
  69. package/src/modules/listener/inbound/base.json +43 -0
  70. package/src/modules/listener/inbound/http.json +18 -0
  71. package/src/modules/listener/inbound/hysteria2.json +102 -0
  72. package/src/modules/listener/inbound/mixed.json +26 -0
  73. package/src/modules/listener/inbound/mux.json +42 -0
  74. package/src/modules/listener/inbound/redir.json +18 -0
  75. package/src/modules/listener/inbound/shadowsocks.json +41 -0
  76. package/src/modules/listener/inbound/socks.json +26 -0
  77. package/src/modules/listener/inbound/tproxy.json +26 -0
  78. package/src/modules/listener/inbound/tuic.json +84 -0
  79. package/src/modules/listener/inbound/tun.json +207 -0
  80. package/src/modules/listener/inbound/tunnel.json +33 -0
  81. package/src/modules/listener/inbound/vmess.json +72 -0
  82. package/src/modules/listener/sing/sing.json +42 -0
  83. package/src/modules/rules/provider/provider.json +71 -0
  84. package/src/modules/rules/rule.json +165 -0
  85. package/test/clash-meta/example1.yaml +3170 -0
  86. package/test/clash-verge/merge.yaml +212 -0
@@ -0,0 +1,72 @@
1
+ {
2
+ "type": "object",
3
+ "title": "inbound-vmess",
4
+ "definitions": {
5
+ "types": { "$ref": "../../../definitions/types.json" },
6
+ "patterns": { "$ref": "../../../definitions/patterns.json" },
7
+ "enums": { "$ref": "../../../definitions/enums.json" },
8
+ "base-option": { "$ref": "./base.json" },
9
+ "mux-option": { "$ref": "./mux.json" },
10
+ "vmess-user": {
11
+ "type": "object",
12
+ "title": "vmess用户",
13
+ "required": ["uuid", "alterId"],
14
+ "properties": {
15
+ "username": {
16
+ "type": "string",
17
+ "title": "用户名",
18
+ "description": "认证用户名",
19
+ "markdownDescription": "认证用户名"
20
+ },
21
+ "uuid": {
22
+ "$ref": "#/definitions/patterns/uuid",
23
+ "title": "UUID",
24
+ "description": "UUID",
25
+ "markdownDescription": "UUID"
26
+ },
27
+ "alterId": {
28
+ "type": "integer",
29
+ "title": "AlterID",
30
+ "description": "Alternate ID(替代标识)",
31
+ "markdownDescription": "Alternate ID(替代标识)"
32
+ }
33
+ }
34
+ }
35
+ },
36
+ "allOf": [
37
+ { "title": "入站基础配置", "$ref": "#/definitions/base-option" },
38
+ {
39
+ "type": "object",
40
+ "title": "vmess配置",
41
+ "required": ["password", "cipher"],
42
+ "properties": {
43
+ "users": {
44
+ "type": "array",
45
+ "title": "用户列表",
46
+ "description": "用户列表",
47
+ "markdownDescription": "用户列表",
48
+ "items": { "$ref": "#/definitions/vmess-user" }
49
+ },
50
+ "ws-path": {
51
+ "type": "string",
52
+ "title": "ws路径",
53
+ "description": "ws路径",
54
+ "markdownDescription": "ws路径"
55
+ },
56
+ "certificate": {
57
+ "type": "string",
58
+ "title": "证书或证书路径",
59
+ "description": "PEM格式",
60
+ "markdownDescription": "PEM格式"
61
+ },
62
+ "private-key": {
63
+ "type": "string",
64
+ "title": "私钥",
65
+ "description": "私钥内容或私钥文件路径",
66
+ "markdownDescription": "私钥内容或私钥文件路径"
67
+ },
68
+ "mux-option": { "title": "多路复用配置", "$ref": "#/definitions/mux-option" }
69
+ }
70
+ }
71
+ ]
72
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "type": "object",
3
+ "title": "sing配置",
4
+ "definitions": {
5
+ "types": { "$ref": "../../../definitions/types.json" },
6
+ "patterns": { "$ref": "../../../definitions/patterns.json" },
7
+ "enums": { "$ref": "../../../definitions/enums.json" },
8
+ "brutal": {
9
+ "type": "object",
10
+ "title": "brutal配置",
11
+ "properties": {
12
+ "enabled": {
13
+ "type": "boolean",
14
+ "title": "启用Brutal拥塞控制算法",
15
+ "description": "启用Brutal拥塞控制算法",
16
+ "markdownDescription": "启用Brutal拥塞控制算法"
17
+ },
18
+ "up": {
19
+ "type": "integer",
20
+ "title": "上行带宽",
21
+ "description": "以Mbps为单位",
22
+ "markdownDescription": "以`Mbps`为单位"
23
+ },
24
+ "down": {
25
+ "type": "integer",
26
+ "title": "下行带宽",
27
+ "description": "以Mbps为单位",
28
+ "markdownDescription": "以`Mbps`为单位"
29
+ }
30
+ }
31
+ }
32
+ },
33
+ "properties": {
34
+ "padding": {
35
+ "type": "boolean",
36
+ "title": "启用填充",
37
+ "description": "启用填充",
38
+ "markdownDescription": "启用填充"
39
+ },
40
+ "brutal": { "title": "brutal配置", "$ref": "#/definitions/brutal" }
41
+ }
42
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "type": "object",
3
+ "title": "规则集合配置",
4
+ "definitions": {
5
+ "types": { "$ref": "../../../definitions/types.json" },
6
+ "patterns": { "$ref": "../../../definitions/patterns.json" },
7
+ "enums": { "$ref": "../../../definitions/enums.json" }
8
+ },
9
+ "additionalProperties": {
10
+ "type": "object",
11
+ "required": ["type", "behavior"],
12
+ "properties": {
13
+ "type": {
14
+ "enum": ["file", "http"],
15
+ "markdownEnumDescriptions": ["本地文件", "网络文件"],
16
+ "title": "provider类型",
17
+ "description": "provider类型",
18
+ "markdownDescription": "provider类型"
19
+ },
20
+ "behavior": {
21
+ "enum": ["domain", "ipcidr", "classical"],
22
+ "markdownEnumDescriptions": ["域名通配", "IP网段匹配", "支持除`rule-set`/`sub-rule`以外的全部路由规则"],
23
+ "title": "规则匹配行为",
24
+ "description": "规则匹配行为",
25
+ "markdownDescription": "规则匹配行为"
26
+ },
27
+ "path": {
28
+ "type": "string",
29
+ "title": "provider文件保存路径",
30
+ "description": "默认使用MD5(url)作为文件名。内核工作目录的相对路径(如果想保存到任意位置,配置环境变量SKIP_SAFE_PATH_CHECK=1)",
31
+ "markdownDescription": "默认使用MD5(`url`)作为文件名。内核工作目录的相对路径(如果想保存到任意位置,配置环境变量`SKIP_SAFE_PATH_CHECK=1`)"
32
+ },
33
+ "format": {
34
+ "enum": ["yaml", "text"],
35
+ "markdownEnumDescriptions": ["YAML格式", "普通文本格式"],
36
+ "title": "provider文件格式",
37
+ "description": "provider文件格式",
38
+ "markdownDescription": "provider文件格式",
39
+ "default": "yaml"
40
+ },
41
+ "interval": {
42
+ "type": "integer",
43
+ "title": "provider更新间隔",
44
+ "description": "单位:s",
45
+ "markdownDescription": "单位:s"
46
+ }
47
+ },
48
+ "if": {
49
+ "properties": {
50
+ "type": { "const": "http" }
51
+ }
52
+ },
53
+ "then": {
54
+ "required": ["url"],
55
+ "properties": {
56
+ "url": {
57
+ "$ref": "#/definitions/patterns/httpUrl",
58
+ "title": "provider网络文件地址",
59
+ "description": "provider网络文件地址",
60
+ "markdownDescription": "provider网络文件地址"
61
+ },
62
+ "proxy": {
63
+ "type": "string",
64
+ "title": "使用指定代理下载/更新provider",
65
+ "description": "使用指定代理下载/更新provider",
66
+ "markdownDescription": "使用指定代理下载/更新provider"
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,165 @@
1
+ {
2
+ "type": "string",
3
+ "definitions": {
4
+ "types": { "$ref": "../../definitions/types.json" },
5
+ "patterns": { "$ref": "../../definitions/patterns.json" },
6
+ "enums": { "$ref": "../../definitions/enums.json" }
7
+ },
8
+ "anyOf": [
9
+ {
10
+ "title": "匹配完整域名",
11
+ "pattern": "^DOMAIN((?:,[^,]+){2})$",
12
+ "errorMessage": "无效的规则"
13
+ },
14
+ {
15
+ "title": "匹配域名后缀",
16
+ "pattern": "^DOMAIN-SUFFIX((?:,[^,]+){2})$",
17
+ "errorMessage": "无效的规则"
18
+ },
19
+ {
20
+ "title": "匹配域名关键字",
21
+ "pattern": "^DOMAIN-KEYWORD((?:,[^,]+){2})$",
22
+ "errorMessage": "无效的规则"
23
+ },
24
+ {
25
+ "title": "匹配域名正则表达式",
26
+ "pattern": "^DOMAIN-REGEX((?:,[^,]+){2})$",
27
+ "errorMessage": "无效的规则"
28
+ },
29
+ {
30
+ "title": "匹配Geosite内的域名",
31
+ "pattern": "^GEOSITE((?:,[^,]+){2})$",
32
+ "errorMessage": "无效的规则"
33
+ },
34
+ {
35
+ "title": "匹配IP所属国家代码",
36
+ "pattern": "^GEOIP((?:,[^,]+){2})(,no-resolve)?$",
37
+ "errorMessage": "无效的规则"
38
+ },
39
+ {
40
+ "title": "匹配来源IP所属国家代码",
41
+ "pattern": "^SRC-GEOIP((?:,[^,]+){2})$",
42
+ "errorMessage": "无效的规则"
43
+ },
44
+ {
45
+ "title": "匹配IP所属ASN",
46
+ "pattern": "^IP-ASN((?:,[^,]+){2})(,no-resolve)?$",
47
+ "errorMessage": "无效的规则"
48
+ },
49
+ {
50
+ "title": "匹配来源IP所属ASN",
51
+ "pattern": "^SCR-IP-ASN((?:,[^,]+){2})$",
52
+ "errorMessage": "无效的规则"
53
+ },
54
+ {
55
+ "title": "匹配IP地址范围",
56
+ "pattern": "^IP-CIDR((?:,[^,]+){2})(,no-resolve)?$",
57
+ "errorMessage": "无效的规则"
58
+ },
59
+ {
60
+ "title": "匹配IP地址范围",
61
+ "pattern": "^IP-CIDR6((?:,[^,]+){2})(,no-resolve)?$",
62
+ "errorMessage": "无效的规则"
63
+ },
64
+ {
65
+ "title": "匹配来源IP地址范围",
66
+ "pattern": "^SRC-IP-CIDR((?:,[^,]+){2})$",
67
+ "errorMessage": "无效的规则"
68
+ },
69
+ {
70
+ "title": "匹配IP后缀范围",
71
+ "pattern": "^IP-SUFFIX((?:,[^,]+){2})(,no-resolve)?$",
72
+ "errorMessage": "无效的规则"
73
+ },
74
+ {
75
+ "title": "匹配来源IP后缀范围",
76
+ "pattern": "^SRC-IP-SUFFIX((?:,[^,]+){2})$",
77
+ "errorMessage": "无效的规则"
78
+ },
79
+ {
80
+ "title": "匹配请求来源端口范围",
81
+ "pattern": "^SRC-PORT((?:,[^,]+){2})$",
82
+ "errorMessage": "无效的规则"
83
+ },
84
+ {
85
+ "title": "匹配请求目标端口范围",
86
+ "pattern": "^DST-PORT((?:,[^,]+){2})$",
87
+ "errorMessage": "无效的规则"
88
+ },
89
+ {
90
+ "title": "匹配入站端口,可用端口范围",
91
+ "pattern": "^IN-PORT((?:,[^,]+){2})$",
92
+ "errorMessage": "无效的规则"
93
+ },
94
+ {
95
+ "title": "DSCP标记(仅限tproxy udp入站)",
96
+ "pattern": "^DSCP((?:,[^,]+){2})$",
97
+ "errorMessage": "无效的规则"
98
+ },
99
+ {
100
+ "title": "匹配进程名称(Android包名)",
101
+ "pattern": "^PROCESS-NAME((?:,[^,]+){2})$",
102
+ "errorMessage": "无效的规则"
103
+ },
104
+ {
105
+ "title": "匹配完整进程路径",
106
+ "pattern": "^PROCESS-PATH((?:,[^,]+){2})$",
107
+ "errorMessage": "无效的规则"
108
+ },
109
+ {
110
+ "title": "匹配传输协议(tcp/udp)",
111
+ "pattern": "^NETWORK((?:,[^,]+){2})$",
112
+ "errorMessage": "无效的规则"
113
+ },
114
+ {
115
+ "title": "匹配Linux USER ID",
116
+ "pattern": "^UID((?:,[^,]+){2})$",
117
+ "errorMessage": "无效的规则"
118
+ },
119
+ {
120
+ "title": "匹配入站类型",
121
+ "pattern": "^IN-TYPE((?:,[^,]+){2})$",
122
+ "errorMessage": "无效的规则"
123
+ },
124
+ {
125
+ "title": "匹配入站用户名",
126
+ "pattern": "^IN-USER((?:,[^,]+){2})$",
127
+ "errorMessage": "无效的规则"
128
+ },
129
+ {
130
+ "title": "匹配入站名称",
131
+ "pattern": "^IN-NAME((?:,[^,]+){2})$",
132
+ "errorMessage": "无效的规则"
133
+ },
134
+ {
135
+ "title": "子规则",
136
+ "pattern": "^SUB-RULE,\\([^,]+,[^,]+\\),.+$",
137
+ "errorMessage": "无效的规则"
138
+ },
139
+ {
140
+ "title": "匹配规则集(rule-providers中定义)",
141
+ "pattern": "^RULE-SET((?:,[^,]+){2})(,no-resolve)?$",
142
+ "errorMessage": "无效的规则"
143
+ },
144
+ {
145
+ "title": "逻辑和",
146
+ "pattern": "^AND,\\(\\(.+,.+\\)\\),.+$",
147
+ "errorMessage": "无效的规则"
148
+ },
149
+ {
150
+ "title": "逻辑或",
151
+ "pattern": "^OR,\\(\\(.+,.+\\)\\),.+$",
152
+ "errorMessage": "无效的规则"
153
+ },
154
+ {
155
+ "title": "逻辑非",
156
+ "pattern": "^NOT,\\(\\(.+,.+\\)\\),.+$",
157
+ "errorMessage": "无效的规则"
158
+ },
159
+ {
160
+ "title": "匹配所有请求(无需条件)",
161
+ "pattern": "^MATCH,.+$",
162
+ "errorMessage": "无效的规则"
163
+ }
164
+ ]
165
+ }