fix: Web 全局状态同步、字典文件错误提示、长驻插件连接可取消

- scan.go: Web API 构建 config/state 后同步到全局实例
- config_builder.go: 用户名/密码/URL 文件读取失败时输出错误日志
- reverseshell.go: 读命令设 1s 超时,超时后检查 ctx 实现可取消
- forwardshell.go: handleClient 接受 ctx,取消时关闭连接解除阻塞
- socks5proxy.go: handleClient 接受 ctx,取消时关闭连接解除 IO 阻塞
This commit is contained in:
ZacharyZcR
2026-04-27 21:45:16 +08:00
parent 653f11295a
commit 3d7cdcbe5f
5 changed files with 42 additions and 8 deletions
+3 -1
View File
@@ -206,9 +206,11 @@ func (h *ScanHandler) runScan(req ScanRequest) {
fv.DisableSave = true // Web模式不保存到文件
fv.Silent = true // 静默模式
// 构建Config
// 构建Config,同步到全局实例供 network/限速等模块使用
config := common.BuildConfigFromFlags(fv)
state := common.NewState()
common.SetGlobalConfig(config)
common.SetGlobalState(state)
// 设置WebSocket结果回调
common.SetResultCallback(func(result interface{}) {