config.server.json 2.5 KB

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