v2.8.json 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema",
  3. "$id": "https://ddns.newfuture.cc/schema/v2.8.json",
  4. "description": "DNS 配置文件 https://github.com/NewFuture/DDNS",
  5. "type": "object",
  6. "properties": {
  7. "$schema": {
  8. "type": "string",
  9. "title": "please use https://ddns.newfuture.cc/schema/v2.8.json",
  10. "description": "请更换为 https://ddns.newfuture.cc/schema/v2.8.json",
  11. "default": "https://ddns.newfuture.cc/schema/v2.8.json",
  12. "enum": [
  13. "https://ddns.newfuture.cc/schema/v2.8.json",
  14. "http://ddns.newfuture.cc/schema/v2.8.json",
  15. "./schema/v2.8.json"
  16. ]
  17. },
  18. "id": {
  19. "$id": "/properties/id",
  20. "type": [
  21. "string",
  22. "null"
  23. ],
  24. "title": "ID or Email",
  25. "description": "DNS服务API认证的ID或者邮箱"
  26. },
  27. "token": {
  28. "$id": "/properties/token",
  29. "type": "string",
  30. "title": "API Token",
  31. "description": "DNS服务商的访问Token或者Key"
  32. },
  33. "dns": {
  34. "$id": "/properties/dns",
  35. "type": "string",
  36. "title": "DNS Provider",
  37. "description": "dns服务商:阿里为alidns,DNS.COM为dnscom,DNSPOD国际版为(dnspod_com),cloudflare,HE.net为he,华为DNS为huaweidns,自定义回调为callback",
  38. "default": "dnspod",
  39. "examples": [
  40. "dnspod",
  41. "alidns",
  42. "cloudflare"
  43. ],
  44. "enum": [
  45. "dnspod",
  46. "alidns",
  47. "cloudflare",
  48. "dnspod_com",
  49. "dnscom",
  50. "he",
  51. "huaweidns",
  52. "callback"
  53. ]
  54. },
  55. "ipv4": {
  56. "$id": "/properties/ipv4",
  57. "title": "IPv4 domain list",
  58. "description": "待更新的IPv4 域名列表",
  59. "type": "array",
  60. "uniqueItems": true,
  61. "items": {
  62. "$id": "/properties/ipv4/items",
  63. "title": "ipv4 domain for DDNS",
  64. "type": "string",
  65. "pattern": "^(?:\\*\\.)?(?:[a-zA-Z0-9](?:[a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,18}$",
  66. "examples": [
  67. "newfuture.cc",
  68. "ipv4.example.newfuture.cc"
  69. ]
  70. }
  71. },
  72. "ipv6": {
  73. "$id": "/properties/ipv6",
  74. "type": "array",
  75. "title": "IPv6 domain list",
  76. "description": "待更新的IPv6 域名列表",
  77. "uniqueItems": true,
  78. "items": {
  79. "$id": "/properties/ipv6/items",
  80. "title": "The ipv6 domain for DDNS",
  81. "type": "string",
  82. "pattern": "^(?:\\*\\.)?(?:[a-zA-Z0-9](?:[a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,18}$",
  83. "examples": [
  84. "newfuture.cc",
  85. "ipv6.example.newfuture.cc"
  86. ]
  87. }
  88. },
  89. "index4": {
  90. "$id": "/properties/index4",
  91. "type": [
  92. "string",
  93. "integer",
  94. "boolean",
  95. "array"
  96. ],
  97. "items": {
  98. "type": [
  99. "string",
  100. "integer"
  101. ],
  102. "minimum": 0
  103. },
  104. "uniqueItems": true,
  105. "minItems": 1,
  106. "minimum": 0,
  107. "title": "IPv4 address Setting",
  108. "description": "本机 IPv4 获取方式设置",
  109. "default": "default",
  110. "examples": [
  111. "default",
  112. "public",
  113. 0,
  114. 1,
  115. "192\\\\.168\\\\..*",
  116. false
  117. ]
  118. },
  119. "index6": {
  120. "$id": "/properties/index6",
  121. "type": [
  122. "string",
  123. "integer",
  124. "boolean",
  125. "array"
  126. ],
  127. "items": {
  128. "type": [
  129. "string",
  130. "integer"
  131. ],
  132. "minimum": 0
  133. },
  134. "uniqueItems": true,
  135. "minItems": 1,
  136. "minimum": 0,
  137. "title": "IPv6 address Setting",
  138. "description": "本机 IPv6 获取方式设置",
  139. "default": "default",
  140. "examples": [
  141. "default",
  142. "public",
  143. 0,
  144. 1,
  145. "2404:f801:10:.*",
  146. false
  147. ]
  148. },
  149. "ttl": {
  150. "$id": "/properties/ttl",
  151. "type": [
  152. "number",
  153. "null"
  154. ],
  155. "title": "TTL",
  156. "description": "设置DNS TTL,默认不填读取DNS服务商的配置",
  157. "default": null,
  158. "examples": [
  159. 600,
  160. null
  161. ]
  162. },
  163. "proxy": {
  164. "$id": "/properties/proxy",
  165. "type": [
  166. "string",
  167. "null"
  168. ],
  169. "title": "HTTP Proxy Setting",
  170. "description": "DIRECT表示直连,多个代理分号(;)分割逐个尝试直到成功",
  171. "pattern": "^[a-zA-Z0-9\\-;_:\\.]*$",
  172. "examples": [
  173. "127.0.0.1:1080;DIRECT"
  174. ]
  175. },
  176. "debug": {
  177. "$id": "/properties/debug",
  178. "type": "boolean",
  179. "title": "Enable Debug Mode (deprecated, use logger instead)",
  180. "description": "是否启用调试模式显示更多信息(已废弃,请使用 logger 字段)",
  181. "default": false,
  182. "examples": [
  183. false,
  184. true
  185. ],
  186. "deprecated": true
  187. },
  188. "cache": {
  189. "$id": "/properties/cache",
  190. "type": [
  191. "string",
  192. "boolean"
  193. ],
  194. "title": "Enable Cache",
  195. "description": "是否启用缓存记录以避免频繁更新",
  196. "default": true,
  197. "examples": [
  198. true,
  199. false,
  200. "/path/to/cache/ddns.cache"
  201. ]
  202. }
  203. },
  204. "required": [
  205. "id",
  206. "token"
  207. ],
  208. "additionalProperties": false
  209. }