增加CF-CDN说明

This commit is contained in:
NewName
2025-05-18 14:45:45 +08:00
parent 92b26bca67
commit 5d41fa979e
3 changed files with 49 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ import (
)
const (
sizeLimit = 1024 * 1024 * 1024 * 10 // 允许的文件大小,默认10GB
sizeLimit = 1024 * 1024 * 1024 * 2 // 允许的文件大小,默认2GB
host = "0.0.0.0" // 监听地址
port = 5000 // 监听端口
)

View File

@@ -1030,7 +1030,7 @@ func cleanupTempFiles() {
}
// 如果总大小超过10GB清理所有文件防止恶意下载导致磁盘爆满
if totalSize > 10*1024*1024*1024 { // 15GB
if totalSize > 10*1024*1024*1024 {
fmt.Printf("临时文件总大小超过10GB (当前: %.2f GB),清理所有文件\n", float64(totalSize)/(1024*1024*1024))
cleanAll()
} else {