{ "api": { "url": "https://example.com/api/domains", "method": "GET", "headers": { "Authorization": "Bearer " }, "params": { "page": 1 }, "body": null, "timeout_sec": 10 }, "parser": { "field_paths": [ "data.good[].ip" ], "json_paths": [], "regex": "[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}" }, "record_mapping": { "_comment_required": "必填。记录白名单注册表:所有在过滤/排序里会用到的 API 字段都必须先在 field_map 注册,否则会 fail-fast。", "records_path": "data.good[]", "field_map": { "domain": "ip", "created_at": "createdTime", "avg_score": "avgScore", "yd_score": "ydScore", "dx_score": "dxScore", "lt_score": "ltScore", "avg_latency": "avgLatency", "avg_pkg_lost_rate": "avgPkgLostRate", "yd_latency": "ydLatency", "yd_pkg_lost_rate": "ydPkgLostRate", "lt_latency": "ltLatency", "lt_pkg_lost_rate": "ltPkgLostRate", "dx_latency": "dxLatency", "dx_pkg_lost_rate": "dxPkgLostRate", "location_country": "locationCountry", "location_city": "locationCity" }, "created_time_formats": [ "%Y-%m-%d %H:%M:%S" ], "created_time_timezone": "UTC" }, "record_filter": { "_comment": "可选。按记录字段排除候选(字段名必须来自 record_mapping.field_map)。", "enabled": false, "exclude_if_any": [ { "field": "location_country", "contains": "泛播", "case_sensitive": false }, { "field": "location_city", "contains": "泛播", "case_sensitive": false }, { "field": "domain", "regex": "(test|staging)", "case_sensitive": false } ] }, "domain_filter": { "include_suffixes": [], "exclude_regex": [ "^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}$" ] }, "scoring": { "_comment_required": "enabled=true 时必须配置 strategy。weighted_average 需 weighted_fields;lexicographic 需 lexicographic_fields。", "enabled": true, "strategy": "weighted_average", "weighted_fields": [ { "field": "avg_score", "weight": 0.5 }, { "field": "yd_score", "weight": 0.2 }, { "field": "dx_score", "weight": 0.1 }, { "field": "lt_score", "weight": 0.2 } ], "lexicographic_fields": [ { "field": "avg_score", "order": "desc" }, { "field": "created_at", "order": "desc" } ], "prefer_lower": false, "within_hours": 24, "tie_breakers": [ { "field": "created_at", "order": "desc" }, { "field": "domain", "order": "asc" } ] }, "healthcheck": { "enabled": false, "attempts": 2, "timeout_ms": 1800, "port": 443, "tls_verify": true }, "selection": { "top_n": 3 }, "output": { "runtime_dir": "./runtime", "current_domain_file": "current_domain.txt", "current_domain_json": "current_domain.json", "state_file": "state.json", "substore_vars_file": "substore_vars.json" }, "v2ray": { "template_file": "", "output_file": "", "replace_token": "__AUTO_DOMAIN__" }, "notify": { "command": "" } }