config.json 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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": "lt_score",
  64. "weight": 1.0
  65. }
  66. ],
  67. "prefer_lower": true,
  68. "within_hours": 24,
  69. "tie_breakers": [
  70. {
  71. "field": "created_at",
  72. "order": "desc"
  73. },
  74. {
  75. "field": "domain",
  76. "order": "asc"
  77. }
  78. ]
  79. },
  80. "healthcheck": {
  81. "enabled": true,
  82. "attempts": 5,
  83. "timeout_ms": 1800,
  84. "port": 443,
  85. "tls_verify": true
  86. },
  87. "selection": {
  88. "top_n": 3
  89. },
  90. "output": {
  91. "runtime_dir": "./runtime",
  92. "current_domain_file": "current_domain.txt",
  93. "current_domain_json": "current_domain.json",
  94. "state_file": "state.json",
  95. "substore_vars_file": "substore_vars.json"
  96. },
  97. "v2ray": {
  98. "template_file": "",
  99. "output_file": "",
  100. "replace_token": "__AUTO_DOMAIN__"
  101. },
  102. "notify": {
  103. "command": ""
  104. }
  105. }