1+ # daemon 存活时间, 设置为 0 秒时,daemon 将不会退出
2+ # dfget daemon 可以由 dfget 拉起
3+ aliveTime : 0s
4+
5+ # daemon gc 间隔
6+ gcInterval : 1m0s
7+
8+ # daemon 数据目录
9+ # linux 上默认目录为 $HOME/.dragonfly/dfget-daemon/
10+ # macos(仅开发、测试), 默认目录是 /Users/$USER/.dragonfly/dfdaemon/
11+ dataDir : /var/lib/dragonfly
12+
13+ # daemon 工作目录
14+ # linux 上默认目录 $HOME/.dragonfly/dfget-daemon/
15+ # macos(仅开发、测试), 默认目录是 /Users/$USER/.dragonfly/dfdaemon/
16+ workHome : /var/lib/dragonfly
17+
18+ # 当 daemon 退出是, 是否保存缓存数据
19+ # 保留缓存数据在升级 daemon 的时候比较有用
20+ # 默认为 false
21+ keepStorage : true
22+
23+ # 调度器地址
24+ # 尽量使用同一个地区的调度器.
25+ # daemon 将会根据 task id 来进行一致性 hash 来选择所有配置的调度器
26+ scheduler :
27+ # 调度超时
28+ scheduleTimeout : 30s
29+ # 是否禁用回源,禁用回源后,在调度失败时不在 daemon 回源,直接返错
30+ disableAutoBackSource : false
31+ # 调度器地址实例
32+ netAddrs :
33+ - type : tcp
34+ addr : 127.0.0.1:8002
35+
36+ # 是否开启 verbose 日志模式
37+ verbose : true
38+ # 遥测配置
39+ telemetry :
40+ # jaeger 地址, 例如: http://jaeger.dragonfly.svc:14268
41+ jaeger : " "
42+
43+ # 用于注册到调度器的 daemon 信息
44+ host :
45+ # 服务监听地址
46+ listenIP : 0.0.0.0
47+ # 访问 IP 地址
48+ # 其他 daemon 可以通过这个 IP 地址连接过来
49+ advertiseIP : 0.0.0.0
50+ # 地理信息和网络地址
51+ location : " "
52+ idc : " "
53+ securityDomain : " "
54+ netTopology : " "
55+
56+ # 下载服务选项
57+ download :
58+ # 总下载限速
59+ totalRateLimit : 200Mi
60+ # 单个任务下载限速
61+ perPeerRateLimit : 100Mi
62+ # 下载 GRPC 配置
63+ downloadGRPC :
64+ # 安全选项
65+ security :
66+ insecure : true
67+ cacert : " "
68+ cert : " "
69+ key : " "
70+ tlsConfig : null
71+ # 下载服务监听地址,dfget 下载文件将通过该地址连接到 daemon
72+ # 目前是支持 unix domain socket
73+ unixListen :
74+ # linux 上默认路径为 /var/run/dfdaemon.sock
75+ # macos(仅开发、测试), 默认目录是 /tmp/dfdaemon.sock
76+ socket : /var/run/dfdaemon.sock
77+ # peer grpc 选项
78+ # peer 之间通信和下载配置
79+ peerGRPC :
80+ security :
81+ insecure : true
82+ cacert : " "
83+ cert : " "
84+ key : " "
85+ tcpListen :
86+ # 监听地址
87+ listen : 0.0.0.0
88+ # 监听端口
89+ # 指定固定端口,也可以指定端口范围
90+ port : 65000
91+ # port:
92+ # start: 65000
93+ # end: 65009
94+
95+ # 上传服务选项
96+ upload :
97+ # 上传限速
98+ rateLimit : 100Mi
99+ security :
100+ insecure : true
101+ cacert : " "
102+ cert : " "
103+ key : " "
104+ tcpListen :
105+ # 监听地址
106+ listen : 0.0.0.0
107+ # 监听端口
108+ # 指定固定端口,也可以指定端口范围
109+ port : 65002
110+ # port:
111+ # start: 65020
112+ # end: 65029
113+
114+ # peer task 存储选项
115+ storage :
116+ # task data 过期时间
117+ # 超过指定时间没有访问之后,缓存数据将会被清理
118+ taskExpireTime : 3m0s
119+ # storage strategy when process task data
120+ # io.d7y.storage.v2.simple : download file to data directory first, then copy to output path, this is default action
121+ # the download file in date directory will be the peer data for uploading to other peers
122+ # io.d7y.storage.v2.advance: download file directly to output path with postfix, hard link to final output,
123+ # avoid copy to output path, fast than simple strategy, but:
124+ # the output file with postfix will be the peer data for uploading to other peers
125+ # when user delete or change this file, this peer data will be corrupted
126+ # default is io.d7y.storage.v2.advance
127+ strategy : io.d7y.storage.v2.advance
128+ # 磁盘 GC 阈值,缓存数据超过阈值后,最旧的缓存数据将会被清理
129+ diskGCThreshold : 50Gi
130+ # 相同 task id 的 peer task 是否复用缓存
131+ multiplex : true
132+
133+ # 代理服务配置文件,也可以使用下面的配置格式
134+ # proxy: ""
135+
136+ # 代理服务详细选项
137+ proxy :
138+ # 哈希 url 的时候的过滤选项
139+ # 例如:defaultFilter: "Expires&Signature":
140+ # http://localhost/xyz?Expires=111&Signature=222 and http://localhost/xyz?Expires=333&Signature=999
141+ # 是相同的 task
142+ defaultFilter : " Expires&Signature"
143+ security :
144+ insecure : true
145+ cacert : " "
146+ cert : " "
147+ key : " "
148+ tcpListen :
149+ # 监听的网络命名空间, 例如:/proc/1/ns/net
150+ # 主要用在部署 kubernetes 中的时候,daemon 不使用 host network 时,监听宿主机的端口
151+ # 仅支持 Linux
152+ namespace : " "
153+ # 监听地址
154+ listen : 0.0.0.0
155+ # 监听端口
156+ port : 65001
157+ registryMirror :
158+ # 开启时,使用 header 里的 "X-Dragonfly-Registry" 替换 url 里的 host
159+ dynamic : true
160+ # 镜像中心地址
161+ url : https://index.docker.io
162+ # 忽略镜像中心证书错误
163+ insecure : true
164+ # 镜像中心证书
165+ certs : []
166+ # 是否直连镜像中心,true 的话,流量不再走 p2p
167+ direct : false
168+
169+ proxies :
170+ # 代理镜像 blobs 信息
171+ - regx : blobs/sha256.*
172+ # 访问 some-registry 的时候,转换成 https 协议
173+ - regx : some-registry/
174+ useHTTPS : true
175+ # 直接透传流量,不走蜻蜓
176+ - regx : no-proxy-reg
177+ direct : true
178+ # 转发流量到指定地址
179+ - regx : some-registry
180+ redirect : another-registry
181+
182+ hijackHTTPS :
183+ # https 劫持的证书和密钥
184+ # 建议自签 CA 并更新主机证书链
185+ cert : " "
186+ key : " "
187+ # 需要走蜻蜓 p2p 的流量
188+ hosts :
189+ - regx : mirror.aliyuncs.com:443 # 正则匹配
190+ # 忽略证书错误
191+ insecure : true
192+ # 可选:对端证书
193+ certs : []
194+ # 白名单,如果设置了,仅白名单内可以走代理,其他的都拒绝
195+ whiteList :
196+ # 主机信息
197+ - host : " "
198+ # 正则匹配
199+ regx :
200+ # 端口白名单
201+ ports :
202+ # - 80
203+ # - 443
0 commit comments