How adrgs/requestrepo works
RequestRepo captures HTTP, DNS, SMTP, and TCP activity for per-subdomain sessions, stores request data and user-defined DNS records or HTTP response files in an in-memory cache, and exposes it through a web UI and live updates. The graph preserves the documented protocol, sharing, geolocation, and Auto-TLS capabilities. Backend startup and several routing/storage relationships are supported by excerpts; frontend API wiring and some unsampled feature internals are not shown, so those links are omitted or marked unverified.
Main entry points: http/mod.rs HTTP server and router · lib.rs Service startup · cache/mod.rs In-memory LRU cache · App.tsx Web application
Components 30
Web interface
- Web application
frontend/src/App.tsx - Request views
frontend/src/pages/RequestsPage.tsx - DNS settings
frontend/src/pages/DnsSettingsPage.tsx - Response editor
frontend/src/pages/ResponseEditorPage.tsx - Response file tree
frontend/src/components/file-tree/FileTree.tsx - API client
frontend/src/api/client.ts - Live request stream
frontend/src/hooks/useWebSocket.ts - UI and session state
frontend/src/stores
HTTP services
- HTTP server and router
src/src/http/mod.rs - HTTP capture and files
src/src/http/routes.rs - Session and REST API
src/src/http/routes_v2.rs - WebSocket service
src/src/http/websocket.rs - Static file serving
src/src/http/static_files.rs
Request capture
- DNS service
src/src/dns/mod.rs - SMTP service
src/src/smtp/mod.rs - TCP service
src/src/tcp/mod.rs
Shared state
- In-memory LRU cache
src/src/cache/mod.rs - Request and response models
src/src/models/mod.rs
Security and enrichment
- ACME certificate manager
src/src/certs/mod.rs - Certificate storage
src/src/certs/storage.rs - TLS manager
src/src/certs/tls.rs - IP geolocation
src/src/ip2country/mod.rs - JWT and sharing auth
src/src/utils - Runtime configuration
src/src/utils/config.rs
Other components
- Browser user
- HTTP clients
- DNS clients
- SMTP clients
- TCP clients
- Service startup
src/src/lib.rs
Connections 34
- Browser user → Web application: uses
README.md - Browser user → API client: manages sessions
- Browser user → Live request stream: receives updates
- HTTP clients → HTTP capture and files: sends requests
src/src/http/routes.rs - DNS clients → DNS service: queries DNS
README.md - SMTP clients → SMTP service: sends mail
README.md - TCP clients → TCP service: opens connections
- Web application → Request views: renders
- Web application → DNS settings: renders
- Web application → Response editor: renders
- Response editor → Response file tree: edits files
- API client → Session and REST API: calls REST API
- Live request stream → WebSocket service: streams requests
- Service startup → DNS service: starts
src/src/lib.rs - Service startup → HTTP server and router: starts
src/src/lib.rs - Service startup → SMTP service: starts
src/src/lib.rs - Service startup → TCP service: starts
src/src/lib.rs - Service startup → ACME certificate manager: initializes
src/src/lib.rs - HTTP server and router → HTTP capture and files: routes to
src/src/http/mod.rs - HTTP server and router → Session and REST API: routes to
src/src/http/mod.rs - HTTP server and router → WebSocket service: routes to
src/src/http/mod.rs - HTTP server and router → Static file serving: serves
src/src/http/mod.rs - HTTP capture and files → In-memory LRU cache: reads and writes
src/src/http/routes.rs - Session and REST API → In-memory LRU cache: reads and writes
src/src/http/routes_v2.rs - DNS service → In-memory LRU cache: reads records
src/src/dns/mod.rs - SMTP service → In-memory LRU cache: stores requests
src/src/smtp/mod.rs - TCP service → In-memory LRU cache: stores requests
src/src/tcp/mod.rs - HTTP capture and files → IP geolocation: looks up country
src/src/http/routes.rs - DNS service → IP geolocation: looks up country
src/src/dns/mod.rs - SMTP service → IP geolocation: looks up country
src/src/smtp/mod.rs - TCP service → IP geolocation: looks up country
src/src/tcp/mod.rs - ACME certificate manager → Certificate storage: loads and saves
src/src/certs/mod.rs - ACME certificate manager → TLS manager: reloads certificates
src/src/certs/mod.rs - HTTP server and router → TLS manager: uses TLS