v2.json 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema",
  3. "$id": "https://ddns.newfuture.cc/schema/v2.json",
  4. "description": "DDNS 配置文件 https://github.com/NewFuture/DDNS",
  5. "type": "object",
  6. "properties": {
  7. "$schema": {
  8. "type": "string",
  9. "enum": [
  10. "https://ddns.newfuture.cc/schema/v2.json",
  11. "http://ddns.newfuture.cc/schema/v2.json",
  12. "./schema/v2.json"
  13. ],
  14. "default": "https://ddns.newfuture.cc/schema/v2.json"
  15. },
  16. "id": {
  17. "$id": "/properties/id",
  18. "type": "string",
  19. "title": "ID or Email",
  20. "description": "DNS服务API认证的ID或者邮箱",
  21. "default": ""
  22. },
  23. "token": {
  24. "$id": "/properties/token",
  25. "type": "string",
  26. "title": "API Token",
  27. "description": "DNS服务商的访问Token或者Key",
  28. "default": ""
  29. },
  30. "dns": {
  31. "$id": "/properties/dns",
  32. "type": "string",
  33. "title": "DNS Provider",
  34. "description": "dns服务商:阿里为alidns,DNS.COM为dnscom,DNSPOD国际版为dnspod_com,cloudflare",
  35. "default": "dnspod",
  36. "examples": ["dnspod", "alidns", "cloudflare"],
  37. "enum": ["dnspod", "alidns", "cloudflare", "dnspod_com", "dnscom"]
  38. },
  39. "ipv4": {
  40. "$id": "/properties/ipv4",
  41. "title": "IPv4 domain list",
  42. "description": "待更新的IPv4 域名列表",
  43. "type": "array",
  44. "uniqueItems": true,
  45. "items": {
  46. "$id": "/properties/ipv4/items",
  47. "title": "ipv4 domain for DDNS",
  48. "type": "string",
  49. "pattern": "^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,18}$",
  50. "examples": ["newfuture.cc", "ipv4.example.newfuture.cc"]
  51. }
  52. },
  53. "ipv6": {
  54. "$id": "/properties/ipv6",
  55. "type": "array",
  56. "title": "IPv6 domain list",
  57. "description": "待更新的IPv6 域名列表",
  58. "uniqueItems": true,
  59. "items": {
  60. "$id": "/properties/ipv6/items",
  61. "title": "The ipv6 domain for DDNS",
  62. "type": "string",
  63. "pattern": "^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}$",
  64. "examples": ["newfuture.cc", "ipv6.example.newfuture.cc"]
  65. }
  66. },
  67. "index4": {
  68. "$id": "/properties/index4",
  69. "type": ["string", "integer", "boolean"],
  70. "title": "IPv4 address Setting",
  71. "description": "本机 IPv4 获取方式\n`default`默认请求IP\n`public`公网\n数字表示网卡\n`url:http://myip.com`从URL的返回结果中提取\n`reg:xxx`正则提取IPconfig\n`cmd:xxx`或`shell:xx`命令行提取",
  72. "default": "default",
  73. "examples": [
  74. "default",
  75. "public",
  76. 0,
  77. 1,
  78. "regex:192\\\\.168\\\\..*",
  79. "url:https://ipinfo.io/ip",
  80. false
  81. ]
  82. },
  83. "index6": {
  84. "$id": "/properties/index6",
  85. "type": ["string", "integer", "boolean"],
  86. "title": "IPv6 address Setting",
  87. "description": "本机 IPv6 获取方式:`default`默认请求IP\n`public`公网\n数字表示网卡\n`url:http://myip.com`从URL的返回结果中提取\n`reg:xxx`正则提取IPconfig\n`cmd:xxx`或`shell:xx`命令行提取",
  88. "default": "default",
  89. "examples": [
  90. "default",
  91. "public",
  92. 0,
  93. 1,
  94. "regex:2404:f801:10:.*",
  95. "url:https://api6.ipify.org/",
  96. false
  97. ]
  98. },
  99. "proxy": {
  100. "$id": "/properties/proxy",
  101. "type": ["string", "null"],
  102. "title": "HTTP Proxy Setting",
  103. "description": "DIRECT表示直连,多个代理分号(;)分割,逐个尝试直到成功",
  104. "pattern": "^[a-zA-Z0-9\\-;_:\\.]*$",
  105. "examples": ["127.0.0.1:1080;DIRECT"],
  106. "default": "null"
  107. },
  108. "debug": {
  109. "$id": "/properties/debug",
  110. "type": "boolean",
  111. "title": "Enable Debug Mode",
  112. "description": "是否启用调试模式显示更多信息",
  113. "default": false,
  114. "examples": [false, true]
  115. },
  116. "cache": {
  117. "$id": "/properties/cache",
  118. "type": "boolean",
  119. "title": "Enable Cache",
  120. "description": "是否使用缓存",
  121. "default": true,
  122. "examples": [false, true]
  123. }
  124. },
  125. "required": ["id", "token"],
  126. "additionalProperties": false
  127. }