feat: stream large host scans

This commit is contained in:
ZacharyZcR
2026-06-01 02:55:28 +08:00
parent ac755a9b4a
commit 3e4e2db722
11 changed files with 660 additions and 71 deletions
+22
View File
@@ -0,0 +1,22 @@
package core
import (
"github.com/shadow1ng/fscan/common"
"github.com/shadow1ng/fscan/common/parsers"
)
const maxHostBatchSize = 65536
func targetHostBatchSize(config *common.Config) int {
size := parsers.DefaultHostBatchSize
if config != nil && config.ThreadNum > 0 {
threadWindow := config.ThreadNum * 8
if threadWindow > size {
size = threadWindow
}
}
if size > maxHostBatchSize {
return maxHostBatchSize
}
return size
}