refactor(discovery): use ping for discovery and fill MAC via SSH

This commit is contained in:
12600k-rog-d4
2026-08-12 21:45:51 +08:00
parent 906bb54aaa
commit 175c5e8c6c
21 changed files with 542 additions and 310 deletions

View File

@@ -27,8 +27,9 @@ type Config struct {
// ScanConfig 网段扫描
type ScanConfig struct {
CIDR string `yaml:"cidr"`
Timeout time.Duration `yaml:"timeout"`
CIDR string `yaml:"cidr"`
Timeout time.Duration `yaml:"timeout"`
Concurrency int `yaml:"concurrency"` // 并发探测数,默认 30
}
// SSHConfig SSH 认证
@@ -73,8 +74,9 @@ type WorkflowConfig struct {
func Default() *Config {
return &Config{
Scan: ScanConfig{
CIDR: "192.168.1.0/24",
Timeout: 3 * time.Second,
CIDR: "192.168.1.0/24",
Timeout: 3 * time.Second,
Concurrency: 30,
},
SSH: SSHConfig{
User: "root",