-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
settings.schema.json
167 lines (167 loc) · 6.6 KB
/
settings.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"title": "家庭公网IP用DDNS服务",
"additionalProperties": false,
"required": [
"$schema",
"version",
"global",
"services"
],
"properties": {
"$schema": {
"type": "string",
"description": "The schema to verify this document against.",
"default": "./settings.v2.schema.json"
},
"version": {
"type": "number",
"title": "配置文件版本",
"description": "当配置文件版本为1时,不存在此字段",
"const": 2,
"default": 2
},
"global": {
"type": "object",
"description": "部分全局设置",
"required": [
"disableIPv6",
"disableIPv4",
"TTL"
],
"properties": {
"disableIPv6": {
"type": "boolean",
"description": "禁用IPv6设置(不设置AAAA记录)",
"default": false
},
"disableIPv4": {
"type": "boolean",
"description": "禁用IPv4设置(不设置A记录)",
"default": false
},
"TTL": {
"type": "number",
"description": "域名记录TTL值",
"default": 600
}
}
},
"services": {
"type": "array",
"description": "使用的域名服务配置",
"minItems": 1,
"items": {
"type": "object",
"title": "域名服务配置",
"additionalProperties": false,
"required": [
"name",
"apiKey",
"apiSecret",
"domains"
],
"properties": {
"name": {
"type": "string",
"title": "服务名称",
"description": "指定配置使用的服务名称",
"enum": [
"aliyun",
"cloudflare"
]
},
"apiKey": {
"type": "string",
"title": "API Key",
"description": "Aliyun:具有Domain和DNS权限的API Key\nCloudflare:使用API令牌时为空,否则为账户邮箱"
},
"apiSecret": {
"type": "string",
"title": "API Secret",
"description": "Aliyun:具有Domain和DNS权限的API Secret\nCloudflare:使用API令牌填写API令牌,否则为API密钥"
},
"domains": {
"type": "array",
"title": "域名列表",
"minItems": 1,
"items": {
"type": "object",
"title": "DDNS域名设置",
"additionalProperties": false,
"required": [
"domainName",
"resourceRecords"
],
"properties": {
"domainName": {
"type": "string",
"title": "域名"
},
"resourceRecords": {
"type": "array",
"title": "域名记录列表",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"resourceRecord"
],
"properties": {
"resourceRecord": {
"type": "string",
"title": "域名记录"
},
"disableIPv6": {
"type": "boolean",
"title": "禁用IPv6设置(不设置AAAA记录)",
"default": false
},
"disableIPv4": {
"type": "boolean",
"title": "禁用IPv4设置(不设置A记录)",
"default": false
},
"TTL": {
"type": "number",
"title": "域名记录TTL值",
"description": "请谨慎使用小于600的值",
"default": 600,
"minimum": 1
}
}
}
}
}
}
}
}
}
},
"schedule": {
"type": "object",
"additionalProperties": false,
"required": [
"immediate"
],
"properties": {
"immediate": {
"type": "boolean",
"default": true
},
"hour": {
"type": "string",
"default": "*",
"pattern": "^(\\*|2[0-3]|1[0-9]|[0-9]|\/[2-9]|\/1[0-2])$"
},
"minute": {
"type": "string",
"default": "/5",
"pattern": "^(\\*|[0-9]|[1-5][0-9]|\/[2-9]|\/[1-5][0-9])$"
}
}
}
}
}