forked from FacMata/YASS-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
38 lines (32 loc) · 1.37 KB
/
config.example.yaml
File metadata and controls
38 lines (32 loc) · 1.37 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
# YASS-Backend 配置文件示例
# 目录头配置
mount:
dir: "/mnt/media" # 挂载目录前缀
# 服务器配置
server:
port: "12180" # 服务监听端口
rate_limit: 100 # 带宽限制 (Mbps)
# 请求频率限制配置
request_limit:
requests_per_second: 2 # 每秒请求数限制
burst_size: 10 # 突发请求大小
cleanup_interval: 10 # 清理间隔(分钟)
expire_duration: 15 # 过期时间(分钟)
# 安全配置
security:
# AES密钥:必须是32位十六进制字符串 (16字节)
# 可以使用以下命令生成:openssl rand -hex 16
aes_key: "a1b2c3d4e5f6789012345678901234ab"
# HMAC密钥:有效的十六进制字符串
# 可以使用以下命令生成:openssl rand -hex 32
hmac_secret_key: "abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890"
# 签名有效时间(秒):防止重放攻击的时间窗口,默认300秒(5分钟)
signature_validity_period: 300
# 日志配置
log:
level: "info" # 日志级别: trace, debug, info, warn, error, fatal, panic
file: "logs/app.log" # 日志文件路径
max_size: 10 # 每个日志文件的最大大小(MB)
max_backups: 5 # 保留的旧日志文件最大个数
max_age: 30 # 保留旧日志文件的最大天数
compress: true # 是否压缩旧日志文件