-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
71 lines (54 loc) · 1.95 KB
/
Copy pathconfig.example.yaml
File metadata and controls
71 lines (54 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Fetch-Down 配置文件
# ========================
# 运行模式: "bandwidth"(带宽模式)或 "traffic"(流量模式)
mode: "bandwidth"
# --- 带宽模式设置 ---
# 目标下行/上行比例(如 2.0 表示下行 = 上行 × 2)
ratio: 2.0
# --- 流量模式设置 ---
# 目标:入网总流量 = 出网总流量 × 倍数
cumulative_multiplier: 1.0
# 时间窗口(支持 Go duration 格式,如 "24h"、"1h"、"30m")
window_duration: "24h"
# --- 下载设置 ---
# 下载 URL 列表(轮询选择),仅允许 http/https
download_urls:
- "http://speedtest.tele2.net/10MB.zip"
- "http://speedtest.tele2.net/100MB.zip"
# 最大并发下载数
max_concurrent: 4
# 总下载速率限制(Mbps),0 = 不限制
# 设置此项以避免占满网络接口带宽
bandwidth_limit_mbps: 100
# --- 连接设置 ---
# 单主机最大连接数(含活跃与空闲),0 = 不限制
# 建议设置为 max_concurrent 或略高,防止连接堆积导致丢包
max_conns_per_host: 4
# 空闲连接池上限,0 = 自动(max_concurrent × 2)
# 连接池全局共享复用,连接用完归还,不反复新建
max_idle_conns: 0
# --- 流量采集 ---
# 上行监控的网卡名称
# 留空则自动检测
uplink_interface: "eth0"
# 采样间隔(秒)
uplink_sample_interval: 1
# --- 连接设置 ---
# 连接超时(秒),应用于 TCP 握手和响应头等待
connect_timeout_sec: 10
# 读取超时(秒),应用于单次下载尝试的最大时长
read_timeout_sec: 30
# 最大重试次数(指数退避 + 随机抖动)
max_retries: 3
# --- 日志 ---
# 日志级别: "debug"、"info"、"warn"、"error"
log_level: "info"
# 统计信息输出间隔(秒)
stats_interval_sec: 10
# --- 状态持久化 ---
# 状态文件路径
# 留空则禁用持久化(带宽模式默认禁用)
# 流量模式留空时自动使用 "fetch-down-state.json"
state_file: ""
# 自动保存间隔(秒),0 = 仅退出时保存
state_save_interval: 60