config.example.json 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {
  2. "api": {
  3. "url": "https://example.com/api/domains",
  4. "method": "GET",
  5. "headers": {
  6. "Authorization": "Bearer <token>"
  7. },
  8. "params": {
  9. "page": 1
  10. },
  11. "body": null,
  12. "timeout_sec": 10
  13. },
  14. "parser": {
  15. "field_paths": [
  16. "data.good[].ip"
  17. ],
  18. "json_paths": [],
  19. "regex": "[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}"
  20. },
  21. "record_filter": {
  22. "enabled": false,
  23. "records_path": "data.good[]",
  24. "domain_field": "ip",
  25. "exclude_if_any": [
  26. {
  27. "field_path": "locationCountry",
  28. "contains": "泛播",
  29. "case_sensitive": false
  30. },
  31. {
  32. "field_path": "provider",
  33. "equals": "internal",
  34. "case_sensitive": false
  35. },
  36. {
  37. "field_path": "tags",
  38. "regex": "(test|staging)",
  39. "case_sensitive": false
  40. }
  41. ]
  42. },
  43. "domain_filter": {
  44. "include_suffixes": [],
  45. "exclude_regex": [
  46. "^(?: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}$"
  47. ]
  48. },
  49. "scoring": {
  50. "enabled": true,
  51. "records_path": "data.good[]",
  52. "ip_field": "ip",
  53. "created_time_field": "createdTime",
  54. "score_fields": [
  55. "avgScore"
  56. ],
  57. "within_hours": 24,
  58. "prefer_lower": false,
  59. "use_api_order": false
  60. },
  61. "healthcheck": {
  62. "enabled": false,
  63. "attempts": 2,
  64. "timeout_ms": 1800,
  65. "port": 443,
  66. "tls_verify": true
  67. },
  68. "selection": {
  69. "top_n": 3
  70. },
  71. "output": {
  72. "runtime_dir": "./runtime",
  73. "current_domain_file": "current_domain.txt",
  74. "current_domain_json": "current_domain.json",
  75. "state_file": "state.json",
  76. "substore_vars_file": "substore_vars.json"
  77. },
  78. "v2ray": {
  79. "template_file": "",
  80. "output_file": "",
  81. "replace_token": "__AUTO_DOMAIN__"
  82. },
  83. "notify": {
  84. "command": ""
  85. }
  86. }