mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-25 04:31:52 +08:00
refactor: 清除 core/plugins 全局状态依赖,ProgressManager 缓存引用 (Phase 5)
- core/alive_scanner.go: GetFlagVars() → session.Params - core/service_scanner.go: GetFlagVars() → session.Params 和 config.Target.Ports - common/progress_manager.go: 缓存 State 和 NoColor 到字段,不再运行时读全局 - common/output_api.go: SaveResult 改用 GetGlobalConfig().Output.DisableSave - common/network.go: WrapperTcpWithTimeout 标记 Deprecated - core/ 和 plugins/ 下已无全局状态调用残留
This commit is contained in:
+2
-4
@@ -102,11 +102,9 @@ func createProxyConfig(timeout time.Duration) *proxy.ProxyConfig {
|
||||
// TCP 连接
|
||||
// =============================================================================
|
||||
|
||||
// WrapperTcpWithTimeout TCP连接包装器,带超时
|
||||
// 支持通过代理管理器进行SOCKS5和HTTP代理连接,并集成发包控制
|
||||
// 使用全局拨号器复用连接,避免重复创建代理握手开销
|
||||
// Deprecated: WrapperTcpWithTimeout 仅供 mylib/grdp 兼容使用,新代码请用 ScanSession.DialTCP
|
||||
//
|
||||
//nolint:revive // 保持向后兼容性,避免破坏大量现有代码
|
||||
//nolint:revive
|
||||
func WrapperTcpWithTimeout(network, address string, timeout time.Duration) (net.Conn, error) {
|
||||
// 检查发包限制 - 在代理连接前进行控制
|
||||
if canSend, reason := CanSendPacket(); !canSend {
|
||||
|
||||
Reference in New Issue
Block a user