config.json 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. {
  2. "api": {
  3. "url": "https://vps789.com/openApi/cfIpTop20",
  4. "method": "GET",
  5. "headers": {},
  6. "params": {},
  7. "timeout_sec": 10
  8. },
  9. "parser": {
  10. "field_paths": [
  11. "data.good[].ip"
  12. ],
  13. "json_paths": [],
  14. "regex": "[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}"
  15. },
  16. "record_mapping": {
  17. "records_path": "data.good[]",
  18. "field_map": {
  19. "domain": "ip",
  20. "created_at": "createdTime",
  21. "avg_score": "avgScore",
  22. "yd_score": "ydScore",
  23. "dx_score": "dxScore",
  24. "lt_score": "ltScore",
  25. "avg_latency": "avgLatency",
  26. "avg_pkg_lost_rate": "avgPkgLostRate",
  27. "yd_latency": "ydLatency",
  28. "yd_pkg_lost_rate": "ydPkgLostRate",
  29. "lt_latency": "ltLatency",
  30. "lt_pkg_lost_rate": "ltPkgLostRate",
  31. "dx_latency": "dxLatency",
  32. "dx_pkg_lost_rate": "dxPkgLostRate",
  33. "location_country": "locationCountry",
  34. "location_city": "locationCity",
  35. "host_provider": "hostProvider"
  36. },
  37. "created_time_formats": [
  38. "%Y-%m-%d %H:%M:%S"
  39. ],
  40. "created_time_timezone": "UTC"
  41. },
  42. "record_filter": {
  43. "enabled": true,
  44. "exclude_if_any": [
  45. {
  46. "field": "host_provider",
  47. "equals": "CF优选IP",
  48. "case_sensitive": false
  49. },
  50. {
  51. "field": "domain",
  52. "equals": "openai.com",
  53. "case_sensitive": false
  54. }
  55. ]
  56. },
  57. "domain_filter": {
  58. "include_suffixes": [],
  59. "exclude_regex": [
  60. "^(?: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}$"
  61. ]
  62. },
  63. "scoring": {
  64. "enabled": true,
  65. "strategy": "weighted_average",
  66. "weighted_fields": [
  67. {
  68. "field": "dx_score",
  69. "weight": 1.0
  70. }
  71. ],
  72. "prefer_lower": true,
  73. "within_hours": 24,
  74. "tie_breakers": [
  75. {
  76. "field": "created_at",
  77. "order": "desc"
  78. },
  79. {
  80. "field": "domain",
  81. "order": "asc"
  82. }
  83. ]
  84. },
  85. "healthcheck": {
  86. "enabled": true,
  87. "attempts": 5,
  88. "timeout_ms": 1800,
  89. "port": 443,
  90. "tls_verify": true
  91. },
  92. "selection": {
  93. "top_n": 3
  94. },
  95. "output": {
  96. "runtime_dir": "./runtime",
  97. "current_domain_file": "current_domain.txt",
  98. "current_domain_json": "current_domain.json",
  99. "state_file": "state.json",
  100. "substore_vars_file": "substore_vars.json"
  101. },
  102. "v2ray": {
  103. "template_file": "",
  104. "output_file": "",
  105. "replace_token": "__AUTO_DOMAIN__"
  106. },
  107. "notify": {
  108. "command": ""
  109. }
  110. }