config.json 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. },
  52. "domain_filter": {
  53. "include_suffixes": [],
  54. "exclude_regex": [
  55. "^(?: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}$"
  56. ]
  57. },
  58. "scoring": {
  59. "enabled": true,
  60. "strategy": "weighted_average",
  61. "weighted_fields": [
  62. {
  63. "field": "avg_score",
  64. "weight": 0.5
  65. },
  66. {
  67. "field": "yd_score",
  68. "weight": 0.4
  69. },
  70. {
  71. "field": "dx_score",
  72. "weight": 0.05
  73. },
  74. {
  75. "field": "lt_score",
  76. "weight": 0.05
  77. }
  78. ],
  79. "prefer_lower": true,
  80. "within_hours": 24,
  81. "tie_breakers": [
  82. {
  83. "field": "created_at",
  84. "order": "desc"
  85. },
  86. {
  87. "field": "domain",
  88. "order": "asc"
  89. }
  90. ]
  91. },
  92. "healthcheck": {
  93. "enabled": true,
  94. "attempts": 5,
  95. "timeout_ms": 1800,
  96. "port": 443,
  97. "tls_verify": true
  98. },
  99. "selection": {
  100. "top_n": 3
  101. },
  102. "output": {
  103. "runtime_dir": "./runtime",
  104. "current_domain_file": "current_domain.txt",
  105. "current_domain_json": "current_domain.json",
  106. "state_file": "state.json",
  107. "substore_vars_file": "substore_vars.json"
  108. },
  109. "v2ray": {
  110. "template_file": "",
  111. "output_file": "",
  112. "replace_token": "__AUTO_DOMAIN__"
  113. },
  114. "notify": {
  115. "command": ""
  116. }
  117. }