| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621 |
- {
- "$schema": "http://json-schema.org/draft-07/schema",
- "$id": "https://ddns.newfuture.cc/schema/v4.1.json",
- "description": "DNS 配置文件 https://github.com/NewFuture/DDNS",
- "type": "object",
- "properties": {
- "$schema": {
- "type": "string",
- "title": "please use https://ddns.newfuture.cc/schema/v4.1.json",
- "description": "请更换为 https://ddns.newfuture.cc/schema/v4.1.json",
- "default": "https://ddns.newfuture.cc/schema/v4.1.json",
- "enum": [
- "https://ddns.newfuture.cc/schema/v4.1.json",
- "http://ddns.newfuture.cc/schema/v4.1.json",
- "./schema/v4.1.json"
- ]
- },
- "providers": {
- "$id": "/properties/providers",
- "type": "array",
- "title": "DNS Providers List",
- "description": "DNS服务提供商列表,支持多个不同的DNS服务商",
- "items": {
- "type": "object",
- "properties": {
- "provider": {
- "type": "string",
- "title": "DNS Provider Name",
- "description": "dns服务商:阿里为alidns,阿里ESA为aliesa,DNS.COM为dnscom,DNSPOD国际版为(dnspod_com),cloudflare,HE.net为he,华为DNS为huaweidns,NameSilo为namesilo,腾讯云为tencentcloud,腾讯云EdgeOne为edgeone,腾讯云EdgeOne DNS为edgeone_dns,自定义回调为callback",
- "enum": [
- "51dns",
- "alidns",
- "aliesa",
- "callback",
- "cloudflare",
- "debug",
- "dnscom",
- "dnspod_com",
- "dnspod",
- "edgeone",
- "edgeone_dns",
- "he",
- "huaweidns",
- "namesilo",
- "noip",
- "tencentcloud"
- ]
- },
- "id": {
- "type": [
- "string",
- "null"
- ],
- "title": "ID or Email",
- "description": "DNS服务API认证的ID或者邮箱"
- },
- "token": {
- "type": "string",
- "title": "API Token",
- "description": "DNS服务商的访问Token或者Key"
- },
- "endpoint": {
- "type": [
- "string",
- "null"
- ],
- "title": "API Endpoint",
- "description": "DNS服务商的API端点URL,用于自定义或私有部署的API地址",
- "default": null
- },
- "ipv4": {
- "title": "IPv4 domain list",
- "description": "待更新的IPv4 域名列表",
- "type": "array",
- "uniqueItems": true,
- "items": {
- "title": "ipv4 domain for DDNS",
- "type": "string",
- "pattern": "^(?:\\*\\.)?(?:[a-zA-Z0-9](?:[a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,18}$"
- }
- },
- "ipv6": {
- "type": "array",
- "title": "IPv6 domain list",
- "description": "待更新的IPv6 域名列表",
- "uniqueItems": true,
- "items": {
- "title": "The ipv6 domain for DDNS",
- "type": "string",
- "pattern": "^(?:\\*\\.)?(?:[a-zA-Z0-9](?:[a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,18}$"
- }
- },
- "index4": {
- "type": [
- "string",
- "integer",
- "boolean",
- "array"
- ],
- "items": {
- "type": [
- "string",
- "integer"
- ],
- "minimum": 0
- },
- "uniqueItems": true,
- "minItems": 1,
- "minimum": 0,
- "title": "IPv4 address Setting",
- "description": "本机 IPv4 获取方式设置,支持数组、字符串(逗号/分号分隔)等多种格式",
- "default": [
- "default"
- ]
- },
- "index6": {
- "type": [
- "string",
- "integer",
- "boolean",
- "array"
- ],
- "items": {
- "type": [
- "string",
- "integer"
- ],
- "minimum": 0
- },
- "uniqueItems": true,
- "minItems": 1,
- "minimum": 0,
- "title": "IPv6 address Setting",
- "description": "本机 IPv6 获取方式设置,支持数组、字符串(逗号/分号分隔)等多种格式",
- "default": [
- "default"
- ]
- },
- "ttl": {
- "type": [
- "number",
- "null"
- ],
- "title": "TTL",
- "description": "设置DNS TTL,默认不填读取DNS服务商的配置",
- "default": null
- },
- "line": {
- "type": [
- "string",
- "null"
- ],
- "title": "DNS Line/Route",
- "description": "DNS线路设置,如电信、联通、移动等,支持中文和英文线路名称",
- "default": null
- },
- "cache": {
- "type": [
- "string",
- "boolean"
- ],
- "title": "Enable Cache",
- "description": "是否启用缓存记录以避免频繁更新",
- "default": true,
- "examples": [
- true,
- false,
- "/path/to/cache/ddns.cache"
- ]
- },
- "log": {
- "type": "object",
- "title": "Log Config",
- "description": "日志配置,仅支持设置日志级别",
- "properties": {
- "level": {
- "type": "string",
- "title": "Log Level",
- "description": "日志级别,如 DEBUG、INFO、WARNING、ERROR、CRITICAL",
- "default": "INFO",
- "enum": [
- "DEBUG",
- "INFO",
- "WARNING",
- "ERROR",
- "CRITICAL"
- ]
- }
- },
- "required": [],
- "additionalProperties": false
- },
- "proxy": {
- "type": [
- "string",
- "null",
- "array"
- ],
- "title": "HTTP Proxy Setting",
- "description": "该Provider专用的HTTP代理设置,支持多种格式:http://host:port(具体代理)、DIRECT(强制直连)、SYSTEM/DEFAULT(系统代理),多个代理逐个尝试直到成功",
- "pattern": "^(https?://[a-zA-Z0-9\\-_:\\.]+|[a-zA-Z0-9\\-_:\\.]+:[0-9]+|DIRECT|SYSTEM|DEFAULT)(;(https?://[a-zA-Z0-9\\-_:\\.]+|[a-zA-Z0-9\\-_:\\.]+:[0-9]+|DIRECT|SYSTEM|DEFAULT))*$",
- "examples": [
- "http://127.0.0.1:1080",
- "http://proxy.example.com:8080",
- "DIRECT",
- "SYSTEM",
- "DEFAULT"
- ],
- "uniqueItems": true,
- "items": {
- "title": "proxy setting for HTTP requests",
- "type": "string",
- "pattern": "^(https?://[a-zA-Z0-9\\-_:\\.]+|[a-zA-Z0-9\\-_:\\.]+:[0-9]+|DIRECT|SYSTEM|DEFAULT)$",
- "examples": [
- "http://127.0.0.1:1080",
- "https://proxy.example.com:8080",
- "DIRECT",
- "SYSTEM",
- "DEFAULT"
- ]
- }
- },
- "extra": {
- "type": "object",
- "title": "Extra Fields",
- "description": "额外的自定义字段,用于传递DNS服务商特定的参数,如Cloudflare的proxied、comment、tags等",
- "additionalProperties": true,
- "examples": [
- {
- "proxied": true,
- "comment": "Managed by DDNS"
- }
- ]
- }
- },
- "required": [
- "provider"
- ],
- "additionalProperties": true
- }
- },
- "id": {
- "$id": "/properties/id",
- "type": [
- "string",
- "null"
- ],
- "title": "ID or Email",
- "description": "DNS服务API认证的ID或者邮箱"
- },
- "token": {
- "$id": "/properties/token",
- "type": "string",
- "title": "API Token",
- "description": "DNS服务商的访问Token或者Key"
- },
- "endpoint": {
- "$id": "/properties/endpoint",
- "type": [
- "string",
- "null"
- ],
- "title": "API Endpoint",
- "description": "DNS服务商的API端点URL,用于自定义或私有部署的API地址",
- "default": null,
- "examples": [
- "https://dnsapi.com",
- null
- ]
- },
- "dns": {
- "$id": "/properties/dns",
- "type": "string",
- "title": "DNS Provider",
- "description": "dns服务商:阿里为alidns,阿里ESA为aliesa,DNS.COM为dnscom,DNSPOD国际版为(dnspod_com),cloudflare,HE.net为he,华为DNS为huaweidns,NameSilo为namesilo,腾讯云为tencentcloud,腾讯云EdgeOne为edgeone,腾讯云EdgeOne DNS为edgeone_dns,自定义回调为callback",
- "default": "dnspod",
- "examples": [
- "dnspod",
- "alidns",
- "cloudflare"
- ],
- "enum": [
- "51dns",
- "alidns",
- "aliesa",
- "callback",
- "cloudflare",
- "debug",
- "dnscom",
- "dnspod_com",
- "dnspod",
- "edgeone",
- "edgeone_dns",
- "he",
- "huaweidns",
- "namesilo",
- "noip",
- "tencentcloud"
- ]
- },
- "ipv4": {
- "$id": "/properties/ipv4",
- "title": "IPv4 domain list",
- "description": "待更新的IPv4 域名列表",
- "type": "array",
- "uniqueItems": true,
- "items": {
- "$id": "/properties/ipv4/items",
- "title": "ipv4 domain for DDNS",
- "type": "string",
- "pattern": "^(?:\\*\\.)?(?:[a-zA-Z0-9](?:[a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,18}$",
- "examples": [
- "newfuture.cc",
- "ipv4.example.newfuture.cc"
- ]
- }
- },
- "ipv6": {
- "$id": "/properties/ipv6",
- "type": "array",
- "title": "IPv6 domain list",
- "description": "待更新的IPv6 域名列表",
- "uniqueItems": true,
- "items": {
- "$id": "/properties/ipv6/items",
- "title": "The ipv6 domain for DDNS",
- "type": "string",
- "pattern": "^(?:\\*\\.)?(?:[a-zA-Z0-9](?:[a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,18}$",
- "examples": [
- "newfuture.cc",
- "ipv6.example.newfuture.cc"
- ]
- }
- },
- "index4": {
- "$id": "/properties/index4",
- "type": [
- "string",
- "integer",
- "boolean",
- "array"
- ],
- "items": {
- "type": [
- "string",
- "integer"
- ],
- "minimum": 0
- },
- "uniqueItems": true,
- "minItems": 1,
- "minimum": 0,
- "title": "IPv4 address Setting",
- "description": "本机 IPv4 获取方式设置,支持数组、字符串(逗号/分号分隔)等多种格式",
- "default": [
- "default"
- ],
- "examples": [
- "default",
- "public",
- 0,
- "192\\\\.168\\\\..*",
- "public,regex:192\\\\.168\\\\..*",
- [
- "public",
- "default"
- ],
- false
- ]
- },
- "index6": {
- "$id": "/properties/index6",
- "type": [
- "string",
- "integer",
- "boolean",
- "array"
- ],
- "items": {
- "type": [
- "string",
- "integer"
- ],
- "minimum": 0
- },
- "uniqueItems": true,
- "minItems": 1,
- "minimum": 0,
- "title": "IPv6 address Setting",
- "description": "本机 IPv6 获取方式设置,支持数组、字符串(逗号/分号分隔)等多种格式",
- "default": [
- "default"
- ],
- "examples": [
- "default",
- "public",
- 0,
- 1,
- "2404:f801:10:.*",
- "public;regex:2404:f801:.*",
- [
- "public",
- "default"
- ],
- false
- ]
- },
- "ttl": {
- "$id": "/properties/ttl",
- "type": [
- "number",
- "null"
- ],
- "title": "TTL",
- "description": "设置DNS TTL,默认不填读取DNS服务商的配置",
- "default": null,
- "examples": [
- 600,
- null
- ]
- },
- "line": {
- "$id": "/properties/line",
- "type": [
- "string",
- "null"
- ],
- "title": "DNS Line/Route",
- "description": "DNS线路设置,如电信、联通、移动等,支持中文和英文线路名称",
- "default": null,
- "examples": [
- "telecom",
- "电信",
- "default",
- "默认"
- ]
- },
- "proxy": {
- "$id": "/properties/proxy",
- "type": [
- "string",
- "null",
- "array"
- ],
- "title": "HTTP Proxy Setting",
- "description": "HTTP代理设置,支持多种格式:http://host:port(具体代理)、DIRECT(强制直连)、SYSTEM/DEFAULT(系统代理),多个代理逐个尝试直到成功",
- "pattern": "^(https?://[a-zA-Z0-9\\-_:\\.]+|[a-zA-Z0-9\\-_:\\.]+:[0-9]+|DIRECT|SYSTEM|DEFAULT)(;(https?://[a-zA-Z0-9\\-_:\\.]+|[a-zA-Z0-9\\-_:\\.]+:[0-9]+|DIRECT|SYSTEM|DEFAULT))*$",
- "examples": [
- "http://127.0.0.1:1080",
- "http://proxy.example.com:8080",
- "DIRECT",
- "SYSTEM",
- "DEFAULT",
- "http://127.0.0.1:1080;DIRECT"
- ],
- "uniqueItems": true,
- "items": {
- "$id": "/properties/proxy/items",
- "title": "proxy setting for HTTP requests",
- "type": "string",
- "pattern": "^(https?://[a-zA-Z0-9\\-_:\\.]+|[a-zA-Z0-9\\-_:\\.]+:[0-9]+|DIRECT|SYSTEM|DEFAULT)$",
- "examples": [
- "http://127.0.0.1:1080",
- "https://proxy.example.com:8080",
- "DIRECT",
- "SYSTEM",
- "DEFAULT"
- ]
- }
- },
- "cache": {
- "$id": "/properties/cache",
- "type": [
- "string",
- "boolean"
- ],
- "title": "Enable Cache",
- "description": "是否启用缓存记录以避免频繁更新",
- "default": true,
- "examples": [
- true,
- false,
- "/path/to/cache/ddns.cache"
- ]
- },
- "ssl": {
- "$id": "/properties/ssl",
- "type": [
- "string",
- "boolean"
- ],
- "title": "SSL/TLS Setting",
- "description": "SSL/TLS连接设置,auto表示自动检测,true强制使用SSL,false禁用SSL",
- "default": "auto",
- "examples": [
- "auto",
- true,
- false
- ]
- },
- "log": {
- "$id": "/properties/log",
- "type": "object",
- "title": "Log Config",
- "description": "日志配置,支持自定义日志级别、输出位置、格式和日期格式。可通过命令行 --log.level, --log.file, --log.format, --log.datefmt 或环境变量 DDNS_LOG_LEVEL, DDNS_LOG_FILE, DDNS_LOG_FORMAT, DDNS_LOG_DATEFMT 设置。",
- "properties": {
- "level": {
- "type": "string",
- "title": "Log Level",
- "description": "日志级别,如 DEBUG、INFO、WARNING、ERROR、CRITICAL",
- "default": "INFO",
- "enum": [
- "DEBUG",
- "INFO",
- "WARNING",
- "ERROR",
- "CRITICAL"
- ]
- },
- "file": {
- "type": [
- "string",
- "null"
- ],
- "title": "Log Output File",
- "description": "日志输出文件路径,留空或为null时输出到控制台"
- },
- "format": {
- "type": [
- "string",
- "null"
- ],
- "title": "Log Format",
- "description": "日志格式,参考Python logging模块的格式字符串",
- "default": "%(asctime)s %(levelname)s [%(module)s]: %(message)s"
- },
- "datefmt": {
- "type": [
- "string",
- "null"
- ],
- "title": "Date Format",
- "description": "日期时间格式,参考Python time.strftime()的格式字符串",
- "default": "%Y-%m-%dT%H:%M:%S"
- }
- },
- "required": [],
- "additionalProperties": false
- },
- "extra": {
- "$id": "/properties/extra",
- "type": "object",
- "title": "Extra Fields",
- "description": "额外的自定义字段,用于传递DNS服务商特定的参数,如Cloudflare的proxied、comment、tags等",
- "additionalProperties": true,
- "examples": [
- {
- "proxied": true,
- "comment": "Managed by DDNS",
- "tags": ["production", "ddns"]
- }
- ]
- }
- },
- "not": {
- "allOf": [
- {
- "required": [
- "providers"
- ]
- },
- {
- "anyOf": [
- {
- "required": [
- "dns"
- ]
- },
- {
- "required": [
- "id"
- ]
- },
- {
- "required": [
- "token"
- ]
- },
- {
- "required": [
- "ipv4"
- ]
- },
- {
- "required": [
- "ipv6"
- ]
- },
- {
- "required": [
- "endpoint"
- ]
- }
- ]
- }
- ]
- },
- "anyOf": [
- {
- "required": [
- "token"
- ]
- },
- {
- "required": [
- "providers"
- ]
- }
- ],
- "additionalProperties": true
- }
|