111 lines
2.3 KiB
TOML
111 lines
2.3 KiB
TOML
# 定义 dht-search 的全部运行配置
|
|
|
|
data_dir = "data"
|
|
persistence_queue_capacity = 8192
|
|
stats_interval_secs = 10
|
|
# run_duration_secs = 3600
|
|
index_batch_size = 1024
|
|
index_interval_millis = 5000
|
|
|
|
[disk_guard]
|
|
enabled = true
|
|
check_interval_secs = 10
|
|
minimum_free_bytes = 5368709120
|
|
resume_free_bytes = 6442450944
|
|
|
|
[backup]
|
|
enabled = true
|
|
directory = "data/backups"
|
|
interval_secs = 21600
|
|
retain_checkpoints = 3
|
|
create_on_start = true
|
|
|
|
[diagnostics]
|
|
enabled = true
|
|
database = "data/diagnostics.sqlite3"
|
|
sample_interval_secs = 10
|
|
raw_retention_hours = 24
|
|
minute_retention_days = 30
|
|
queue_capacity = 128
|
|
|
|
[logging]
|
|
directory = "data/logs"
|
|
file_enabled = true
|
|
console_enabled = false
|
|
rotation = "daily"
|
|
retain_files = 7
|
|
file_prefix = "dht-search"
|
|
|
|
[metadata_limits]
|
|
max_metadata_bytes = 10485760
|
|
max_files = 20000
|
|
max_name_bytes = 1024
|
|
max_path_bytes = 4096
|
|
max_path_depth = 64
|
|
|
|
[content_filter]
|
|
version = 1
|
|
|
|
[[content_filter.file_rules]]
|
|
id = "bitcomet-padding-file"
|
|
enabled = true
|
|
field = "file-name"
|
|
match = "prefix"
|
|
value = "_____padding_file_"
|
|
case_sensitive = false
|
|
action = "hide"
|
|
reason = "BitComet 分片边界填充文件"
|
|
|
|
[[content_filter.file_rules]]
|
|
id = "generic-pad-directory"
|
|
enabled = true
|
|
field = "file-path"
|
|
match = "regex"
|
|
value = '(^|/)\.pad/'
|
|
case_sensitive = false
|
|
action = "hide"
|
|
reason = "客户端分片边界填充目录"
|
|
|
|
[[content_filter.file_rules]]
|
|
id = "libtorrent-padding-directory"
|
|
enabled = true
|
|
field = "file-path"
|
|
match = "regex"
|
|
value = '(^|/)\.____padding_file/'
|
|
case_sensitive = false
|
|
action = "hide"
|
|
reason = "libtorrent 分片边界填充目录"
|
|
|
|
[dht]
|
|
port = 12313
|
|
netmode = "ipv4-only"
|
|
hash_queue_capacity = 20000
|
|
max_outbound_queries_per_second = 1000
|
|
outbound_query_burst = 200
|
|
metadata_timeout_secs = 6
|
|
metadata_queue_capacity = 20000
|
|
metadata_workers = 400
|
|
metadata_connects_per_second = 400
|
|
sample_queries_per_second = 60
|
|
sample_max_in_flight = 100
|
|
sample_new_node_percent = 50
|
|
sample_candidate_queue_capacity = 8192
|
|
sample_fallback_to_iterative = false
|
|
peer_lookups_per_second = 200
|
|
peer_lookup_max_active = 200
|
|
find_node_queries_per_second = 10
|
|
find_node_max_in_flight = 100
|
|
new_destinations_per_minute = 12000
|
|
|
|
[http]
|
|
listen = "127.0.0.1:8080"
|
|
web_dir = "src/web/dist"
|
|
|
|
[verification]
|
|
enabled = true
|
|
queue_capacity = 10000
|
|
max_active = 8
|
|
max_peer_attempts = 3
|
|
lease_secs = 60
|
|
poll_interval_millis = 250
|