<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Developer on Documentation</title><link>https://MohsenBg.github.io/bgscan/docs/developer/</link><description>Recent content in Developer on Documentation</description><generator>Hugo</generator><language>en</language><copyright>© 2026 MohsenBg. All rights reserved.</copyright><atom:link href="https://MohsenBg.github.io/bgscan/docs/developer/index.xml" rel="self" type="application/rss+xml"/><item><title>Getting Started</title><link>https://MohsenBg.github.io/bgscan/docs/developer/getting-started/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://MohsenBg.github.io/bgscan/docs/developer/getting-started/</guid><description>&lt;h1 id="getting-started-developer"&gt;Getting Started (Developer)&lt;a class="anchor" href="#getting-started-developer"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;This guide explains how to set up your environment, build, and run &lt;strong&gt;bgscan&lt;/strong&gt; locally for development.&lt;/p&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;&lt;strong&gt;Read first:&lt;/strong&gt; &lt;a href="../contributing/"&gt;Contributing&lt;/a&gt; — branching, commit conventions, and PR workflow.&lt;/p&gt;
&lt;/blockquote&gt;&lt;hr&gt;
&lt;h2 id="prerequisites"&gt;Prerequisites&lt;a class="anchor" href="#prerequisites"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://go.dev/"&gt;Go&lt;/a&gt; 1.26.3+ (see &lt;code&gt;go.mod&lt;/code&gt; for the exact version)&lt;/li&gt;
&lt;li&gt;Git&lt;/li&gt;
&lt;li&gt;For Android builds: &lt;a href="https://developer.android.com/ndk"&gt;Android NDK&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="1-clone-the-repository"&gt;1. Clone the repository&lt;a class="anchor" href="#1-clone-the-repository"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git clone https://github.com/MohsenBg/bgscan.git
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff5c57"&gt;cd&lt;/span&gt; bgscan&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="2-create-a-branch"&gt;2. Create a branch&lt;a class="anchor" href="#2-create-a-branch"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git checkout -b feature/my-change&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;See &lt;a href="../contributing/"&gt;Contributing&lt;/a&gt; for branch naming conventions.&lt;/p&gt;
&lt;h2 id="3-install-dependencies"&gt;3. Install dependencies&lt;a class="anchor" href="#3-install-dependencies"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;bgscan uses a companion tool called &lt;strong&gt;&lt;code&gt;bgscan-builder&lt;/code&gt;&lt;/strong&gt; to fetch and build the project&amp;rsquo;s dependencies. The install scripts download it for you, place it in the project root, and use it to fetch the correct dependency build for your OS/architecture.&lt;/p&gt;</description></item><item><title>Architecture</title><link>https://MohsenBg.github.io/bgscan/docs/developer/architecture/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://MohsenBg.github.io/bgscan/docs/developer/architecture/</guid><description>&lt;h1 id="architecture"&gt;Architecture&lt;a class="anchor" href="#architecture"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;bgscan is a layered application. A lightweight entry point boots startup health checks, then hands control to a BubbleTea TUI. The TUI drives a multi-stage scanner engine whose probes and I/O are pluggable.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="directory-layout"&gt;Directory layout&lt;a class="anchor" href="#directory-layout"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e2e4e5;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── assets
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ └── xray
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ └── outbounds
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── cmd
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ └── bgscan
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ └── main.go
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── docs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── go.mod
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── internal
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── core
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── config
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── dns
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── fileutil
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── ip
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── iplist
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── process
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── result
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── scanner
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ └── xray
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── logger
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── startup
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ └── ui
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── components
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── main
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── shared
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ └── theme
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── ips
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── scripts
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;└── settings&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h2 id="layer-overview"&gt;Layer overview&lt;a class="anchor" href="#layer-overview"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;┌─────────────────────────────────────────────┐
│ cmd/bgscan │
│ (entry point) │
├─────────────────────────────────────────────┤
│ internal/startup │
│ (health checks, config init) │
├─────────────────────────────────────────────┤
│ internal/ui │
│ ┌─────────────────────────────────────┐ │
│ │ main (root model, layout, dialogs) │ │
│ │ components (menus, tables, forms) │ │
│ │ shared (layout, env, dialog, ui) │ │
│ │ theme │ │
│ └─────────────────────────────────────┘ │
├─────────────────────────────────────────────┤
│ internal/core │
│ ┌──────────────┐ ┌──────────┐ ┌─────────┐ │
│ │ scanner │ │ config │ │ result │ │
│ │ (engine, │ │ (TOML) │ │ (writer)│ │
│ │ probe, port) │ │ │ │ │ │
│ └──────────────┘ └──────────┘ └─────────┘ │
│ ┌──────────┐ ┌─────────┐ ┌──────────────┐ │
│ │ iplist │ │ dns │ │ xray/process │ │
│ └──────────┘ └─────────┘ └──────────────┘ │
├─────────────────────────────────────────────┤
│ internal/logger │
├─────────────────────────────────────────────┤
│ assets/ ips/ settings/ │
│ (data files) │
└─────────────────────────────────────────────┘&lt;/code&gt;&lt;/pre&gt;&lt;hr&gt;
&lt;h2 id="directory-reference"&gt;Directory reference&lt;a class="anchor" href="#directory-reference"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Path&lt;/th&gt;
					&lt;th&gt;Description&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;cmd/bgscan&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Application entry point (&lt;code&gt;main.go&lt;/code&gt;). Creates the root TUI model and runs it.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;internal/core&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Core logic: config, DNS, file utilities, IP handling, process management, results, scanner, and Xray integration.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;internal/core/config&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;TOML-based configuration singleton with thread-safe accessors.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;internal/core/scanner&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Scanner orchestrator, engine (pipeline), probe interface, port manager, and net utilities.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;internal/core/result&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Asynchronous result writer, CSV merge/sort, result file registry, and loader.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;internal/core/iplist&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;IP list CSV loader, parser, registry, and shuffle.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;internal/core/dns&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;DNS query, DNSTT, SlipStream, and SOCKS5 helpers.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;internal/core/xray&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Xray command runner, inbound/outbound management, and speed test.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;internal/core/process&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Cross-platform process lifecycle (spawn, kill, signal).&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;internal/core/fileutil&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;CSV, JSON, TOML, text, temp-file, and path helpers.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;internal/core/ip&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;IP parsing and CIDR expansion.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;internal/logger&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Leveled logging with lumberjack rotation. Three streams: core, ui, debug.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;internal/startup&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Sequential startup health checks: logger, theme, config, Xray, DNSTT, Slipstream.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;internal/ui/main&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Root BubbleTea model — header/body/footer layout, overlay dialog manager.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;internal/ui/components&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Reusable UI: basic widgets, inspector forms, menus, tables, scanner view.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;internal/ui/shared&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Shared UI infrastructure: layout geometry, dialog system, env/keys, component interface, validation.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;internal/ui/theme&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Dark/light/auto color palettes (Catppuccin-based).&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;assets/xray/outbounds&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Bundled Xray outbound config assets.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;assets/dnstt-client&lt;/code&gt;, &lt;code&gt;assets/slipstream-client&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;DNS tunneling binaries.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ips&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Default IP range lists per provider (Cloudflare, AWS, Azure, etc.) as CSV.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;settings&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Default &lt;code&gt;.toml&lt;/code&gt; settings files. &lt;code&gt;.default&lt;/code&gt; copies are fallback templates.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;scripts&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Install, build, and release helper scripts.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;docs&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Hugo Book documentation site.&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h2 id="application-flow"&gt;Application flow&lt;a class="anchor" href="#application-flow"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;main()
 │
 ├─ startup.RunHealthChecks()
 │ ├─ logger init
 │ ├─ theme init
 │ ├─ config load + validate
 │ ├─ xray binary check
 │ ├─ dnstt binary check
 │ └─ slipstream binary check
 │
 ├─ tea.NewProgram(app.New()).Run()
 │ │
 │ ├─ header (title bar)
 │ ├─ body (component stack: main menu → scan/settings/logs/...)
 │ └─ footer (status bar, key hints)
 │
 └─ when user selects Run Scan:
 ├─ scanner.NewScanner(ctx, inputPath)
 ├─ scanner.AddStage(BuildICMPStage)
 ├─ scanner.AddStage(BuildTCPStage)
 ├─ ...
 ├─ scanner.Run()
 │ ├─ single stage → engine.RunScan
 │ └─ multi stage → engine.RunScanWithChain
 │ ├─ sequential
 │ ├─ streaming
 │ └─ batch
 │
 └─ results written via result.Writer → CSV merge → disk&lt;/code&gt;&lt;/pre&gt;&lt;hr&gt;
&lt;h2 id="key-design-principles"&gt;Key design principles&lt;a class="anchor" href="#key-design-principles"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;No external runtime deps for core scans.&lt;/strong&gt; ICMP, TCP, and HTTP probes use Go stdlib. Xray, DNSTT, and Slipstream are optional binaries validated at startup.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Configuration is file-first.&lt;/strong&gt; All settings live in &lt;code&gt;settings/*.toml&lt;/code&gt;. The in-app inspector reads and writes the same files.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Probes are pluggable.&lt;/strong&gt; The &lt;code&gt;probe.Probe&lt;/code&gt; interface is the only contract. Adding a new scan type means implementing &lt;code&gt;Init/Run/Close&lt;/code&gt; and registering a stage builder.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Engine is pipeline-agnostic.&lt;/strong&gt; The engine does not know what the probes do — it just feeds IPs, collects results, and flushes to disk. The pipeline mode (sequential/streaming/batch) is a config choice.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;UI is a component tree.&lt;/strong&gt; Every screen is a &lt;code&gt;ui.Component&lt;/code&gt; with &lt;code&gt;Init/Update/View/OnClose/Mode&lt;/code&gt;. Overlays (dialogs, pickers) stack on top; the top overlay consumes all input.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="related-pages"&gt;Related pages&lt;a class="anchor" href="#related-pages"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../core/"&gt;Core&lt;/a&gt; — scanner engine, probe interface, config, and result pipeline in detail&lt;/li&gt;
&lt;li&gt;&lt;a href="../ui/"&gt;UI&lt;/a&gt; — TUI architecture, component model, layout, and theming&lt;/li&gt;
&lt;li&gt;&lt;a href="https://MohsenBg.github.io/bgscan/docs/getting-started/"&gt;Getting Started&lt;/a&gt; — build and run instructions&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Core</title><link>https://MohsenBg.github.io/bgscan/docs/developer/core/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://MohsenBg.github.io/bgscan/docs/developer/core/</guid><description>&lt;h1 id="core"&gt;Core&lt;a class="anchor" href="#core"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;internal/core&lt;/code&gt; package contains all non-UI logic: configuration, the scanner engine, probe implementations, IP list handling, results, DNS, Xray integration, and process management.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="package-map"&gt;Package map&lt;a class="anchor" href="#package-map"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Package&lt;/th&gt;
					&lt;th&gt;Responsibility&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;config&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Thread-safe singleton holding all TOML settings; load/save helpers; validation entry points.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;config/validate&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Per-protocol validators (ICMP, TCP, HTTP, DNS, Xray, writer, general).&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;scanner&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;&lt;code&gt;Scanner&lt;/code&gt; orchestrator and stage builders.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;scanner/engine&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Pipeline execution: single scan, sequential chain, streaming pipeline, batch pipeline.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;scanner/probe&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;&lt;code&gt;Probe&lt;/code&gt; interface and all concrete probes (ICMP, TCP, HTTP, HTTP/3, DNS, DNSTT, SlipStream, Resolve, Xray).&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;scanner/portmgr&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Ephemeral port pool for probes that need local bind ports (Xray, DNSTT, SlipStream).&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;scanner/netutil&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Shared network utilities.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;result&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;&lt;code&gt;Writer&lt;/code&gt; (async batch+merge), CSV format, loader, registry, ordering.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;iplist&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;CSV IP list loader, parser, registry, shuffle, streaming.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ip&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;IPv4 parsing and CIDR expansion.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;dns&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;DNS query helpers, transport parsing, DNSTT/SlipStream SOCKS5 client.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;xray&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Xray binary runner, inbound/outbound config, link parsing, speed test.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;process&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Cross-platform process spawn/kill (Unix + Windows split).&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;fileutil&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;CSV, JSON, TOML, text, temp-file, and path helpers.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;logger&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Leveled logging (core, ui, debug) with lumberjack rotation.&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h2 id="scanner"&gt;Scanner&lt;a class="anchor" href="#scanner"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;internal/core/scanner/scanner.go&lt;/code&gt; defines the &lt;code&gt;Scanner&lt;/code&gt; struct — the public API the UI calls to run a scan.&lt;/p&gt;</description></item><item><title>UI</title><link>https://MohsenBg.github.io/bgscan/docs/developer/ui/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://MohsenBg.github.io/bgscan/docs/developer/ui/</guid><description>&lt;h1 id="ui"&gt;UI&lt;a class="anchor" href="#ui"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;bgscan&amp;rsquo;s terminal UI is built on &lt;a href="https://github.com/charmbracelet/bubbletea"&gt;BubbleTea&lt;/a&gt; (the Elvish v2 fork at &lt;code&gt;charm.land/bubbletea/v2&lt;/code&gt;) and &lt;a href="https://github.com/charmbracelet/lipgloss"&gt;Lipgloss&lt;/a&gt; for styling. The architecture is a component tree with an overlay dialog system and a centralized layout manager.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="package-map"&gt;Package map&lt;a class="anchor" href="#package-map"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Package&lt;/th&gt;
					&lt;th&gt;Responsibility&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ui/main/app&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Root BubbleTea model. Manages layout, header/body/footer, and overlay dialog stack.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ui/main/header&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Top bar — app title and branding.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ui/main/body&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Central content area — holds a component stack (main menu → sub-screens).&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ui/main/footer&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Status bar — app version, current screen name, goroutine count, memory usage.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ui/components/basic&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Reusable widgets: confirm, crud, input, inspector, logview, menu, notice, picker, progress, table, tabs.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ui/components/inspector&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Per-protocol settings forms (DNS, general, HTTP, ICMP, TCP, Xray).&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ui/components/menus&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Screen-level menus: entry (main), logs, outbound, scantype, settings, targetsource.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ui/components/tables&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Data tables: iplist, ipviewer, outbounds, resultlist.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ui/components/scanner&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Live scan view — tabbed progress bars + result tables per stage.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ui/shared&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Shared infrastructure: layout, dialog, env (keys/modes), component interface, validation.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ui/theme&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Dark/light/auto color palettes + huh form theme adapter.&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h2 id="component-interface"&gt;Component interface&lt;a class="anchor" href="#component-interface"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Every screen, widget, and dialog implements &lt;code&gt;ui.shared.ui.Component&lt;/code&gt;:&lt;/p&gt;</description></item><item><title>Contributing</title><link>https://MohsenBg.github.io/bgscan/docs/developer/contributing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://MohsenBg.github.io/bgscan/docs/developer/contributing/</guid><description>&lt;h1 id="contributing-guide"&gt;Contributing Guide&lt;a class="anchor" href="#contributing-guide"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Thank you for your interest in contributing to &lt;strong&gt;bgscan&lt;/strong&gt;! Every contribution is appreciated, whether it&amp;rsquo;s fixing bugs, improving documentation, or implementing new features.&lt;/p&gt;
&lt;h2 id="before-you-start"&gt;Before You Start&lt;a class="anchor" href="#before-you-start"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Search existing Issues before opening a new one.&lt;/li&gt;
&lt;li&gt;If you&amp;rsquo;re planning a large feature or major change, please open an Issue first to discuss it.&lt;/li&gt;
&lt;li&gt;Keep pull requests focused on a single change.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="branch-strategy"&gt;Branch Strategy&lt;a class="anchor" href="#branch-strategy"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Please &lt;strong&gt;do not commit directly to the &lt;code&gt;main&lt;/code&gt; branch&lt;/strong&gt;.&lt;/p&gt;</description></item></channel></rss>