# binammms/lsd architecture

> Architecture diagram of the GitHub repository binammms/lsd, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/binammms/lsd
- Repository: https://github.com/binammms/lsd

## Overview

Proxy Panel Scanner is a small web application for collecting candidate IP/port pairs, scanning them for working SOCKS and HTTP proxies, and presenting results with latency and egress/geography details. The principal workflow runs from browser input through the Python HTTP handler into pair collection and proxy tests, then returns scan status and results for filtering, retesting, copying, or export. The single-file excerpt confirms collection handling, proxy retesting, and an external geolocation lookup; omitted route and scan code limits certainty about their exact dispatch wiring.

Main entry points: [`scanner.py`](https://github.com/binammms/lsd/blob/main/scanner.py) (HTTP handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_browser["Scanner UI<br/>[scanner.py]"]
  node_handler["HTTP handler<br/>[scanner.py]"]
end

subgraph group_scan["Scanning"]
  node_state["Scan state<br/>[scanner.py]"]
  node_collector["Pair collector<br/>[scanner.py]"]
  node_scanengine["Proxy tests<br/>[scanner.py]"]
  node_retest["Retest logic<br/>[scanner.py]"]
end

subgraph group_enrich["Result enrichment"]
  node_geolookup["Egress lookup<br/>[scanner.py]"]
end

node_user(("User"))
node_proxyhosts(("Proxy endpoints"))
node_geoservice(("Geolocation service"))

node_user -->|"enters scan settings"| node_browser
node_browser -->|"sends API requests"| node_handler
node_handler -->|"collects pairs"| node_collector
node_handler -->|"stores scan settings"| node_state
node_scanengine -->|"tests connections"| node_proxyhosts
node_retest -->|"dispatches tests"| node_scanengine
node_geolookup -->|"requests IP details"| node_geoservice
node_browser -->|"polls status"| node_handler
node_handler -->|"returns results"| node_browser

click node_browser "https://github.com/binammms/lsd/blob/main/scanner.py"
click node_handler "https://github.com/binammms/lsd/blob/main/scanner.py"
click node_state "https://github.com/binammms/lsd/blob/main/scanner.py"
click node_collector "https://github.com/binammms/lsd/blob/main/scanner.py"
click node_scanengine "https://github.com/binammms/lsd/blob/main/scanner.py"
click node_retest "https://github.com/binammms/lsd/blob/main/scanner.py"
click node_geolookup "https://github.com/binammms/lsd/blob/main/scanner.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_browser,node_handler,node_user toneBlue
class node_state,node_collector,node_scanengine,node_retest toneAmber
class node_geolookup toneMint
class node_proxyhosts,node_geoservice toneIndigo
```

## Components

### Web interface

- [Scanner UI](https://github.com/binammms/lsd/blob/main/scanner.py): `scanner.py`
- [HTTP handler](https://github.com/binammms/lsd/blob/main/scanner.py): `scanner.py`

### Scanning

- [Scan state](https://github.com/binammms/lsd/blob/main/scanner.py): `scanner.py`
- [Pair collector](https://github.com/binammms/lsd/blob/main/scanner.py): `scanner.py`
- [Proxy tests](https://github.com/binammms/lsd/blob/main/scanner.py): `scanner.py`
- [Retest logic](https://github.com/binammms/lsd/blob/main/scanner.py): `scanner.py`

### Result enrichment

- [Egress lookup](https://github.com/binammms/lsd/blob/main/scanner.py): `scanner.py`

### Other components

- **User**
- **Proxy endpoints**
- **Geolocation service**

## Connections

- User → Scanner UI: enters scan settings
- Scanner UI → HTTP handler: sends API requests
- HTTP handler → Pair collector: collects pairs
- HTTP handler → Scan state: stores scan settings
- Proxy tests → Proxy endpoints: tests connections
- Retest logic → Proxy tests: dispatches tests
- Egress lookup → Geolocation service: requests IP details
- Scanner UI → HTTP handler: polls status
- HTTP handler → Scanner UI: returns results
