How mohsenbg/bgscan works
bgscan is a keyboard-driven terminal application for chained, multi-protocol IP scanning. The documented workflow is to choose targets and scan stages in the TUI, run concurrent probes, and persist results for review or reuse as later scan input. The graph also preserves configuration, Xray outbound validation/speed testing, and logging capabilities. Probe-family wiring is summarized from the README; sampled source confirms IP streaming, worker execution, DNS query behavior, result persistence, and embedded Xray operation, but not every stage-builder connection.
Main entry points: app TUI application · probe Protocol probes · main.go Program entry · scanner Scan dashboard
Components 20
Terminal interface
- Program entry
cmd/bgscan/main.go - TUI application
internal/ui/main/app - Scan dashboard
internal/ui/components/scanner - Settings inspector
internal/ui/components/inspector - Outbound manager
internal/ui/components/tables/outbounds - Target selection
internal/ui/components/menus/targetsource - Result browser
internal/ui/components/tables/resultlist
Scan pipeline
- Pipeline engine
internal/core/scanner/engine - Stage builder
internal/core/scanner/stagebuilder.go - Protocol probes
internal/core/scanner/probe - DNS resolver
internal/core/dns/query.go
Inputs and results
- IP list streamer
internal/core/iplist - Result writer
internal/core/result/manager.go
Supporting services
- Configuration
internal/core/config - Embedded Xray
internal/core/xray/service.go - Outbound speed test
internal/core/speedtest/service.go - Logging
internal/logger
Other components
- Operator
- Target networks
- Slipstream binary
Connections 21
- Operator → Program entry: launches
- Program entry → TUI application: starts
- TUI application → Scan dashboard: presents
- TUI application → Settings inspector: presents
- TUI application → Outbound manager: presents
- TUI application → Result browser: presents
- Settings inspector → Configuration: edits
- Scan dashboard → Target selection: selects targets
- Target selection → IP list streamer: streams targets
- IP list streamer → Pipeline engine: feeds IPs
- Scan dashboard → Pipeline engine: starts scan
- Pipeline engine → Stage builder: builds stages
- Stage builder → Protocol probes: selects probes
- Protocol probes → Target networks: probes
- Protocol probes → DNS resolver: queries DNS
- Protocol probes → Result writer: writes results
- Result browser → Result writer: reads results
- Outbound manager → Embedded Xray: manages outbounds
- Embedded Xray → Outbound speed test: supports testing
- Program entry → Logging: initializes
- Protocol probes → Slipstream binary: uses when enabled