How wangtian1530/acdv-wifi-captive-potla works
ACDV is a Linux Wi-Fi captive portal that grants guest Internet access through time- or data-based vouchers, then monitors sessions and revokes access when they expire. Guests activate vouchers by code or QR and view status; administrators manage vouchers, devices, reports, and chat. HTTP and WebSocket services expose these workflows, while background traffic accounting maintains data balances. The README documents the major capabilities; some implementation details and route wiring are not visible in the sampled excerpts, so those links cite the README rather than implying source inspection.
Main entry points: server.py HTTP API · portal.py Portal operations · main.py Application startup · wsserver.py Realtime WebSocket
Components 20
Portal interfaces
- HTTP API
backend/server.py - Realtime WebSocket
backend/wsserver.py - Guest interface
frontend/static/app.js - Admin interface
frontend/static/admin.js
Voucher and session domain
- Portal operations
backend/portal.py - Admin sessions
backend/auth.py
Network access and accounting
- Application startup
main.py - Traffic accounting bot
backend/data_bot2.py - Network discovery
backend/network.py - Firewall control
backend/nft.py
State and configuration
- Voucher packages
backend/config.py - Voucher / session JSON
backend/data.py - Chat history
backend/chat_store.py - Per-IP data records
backend/ip_data.py - Runtime cache
backend/cache.py
Other components
- Wi-Fi guest
- Administrator
- AP / gateway
- Internet
- nftables / iptables
Connections 27
- Wi-Fi guest → Guest interface: uses
README.md - Administrator → Admin interface: uses
README.md - Guest interface → HTTP API: HTTP requests
README.md - Guest interface → Realtime WebSocket: realtime updates
README.md - Admin interface → HTTP API: HTTP requests
README.md - Admin interface → Realtime WebSocket: realtime updates
README.md - AP / gateway → HTTP API: redirects traffic
README.md - HTTP API → Portal operations: routes operations
backend/server.py - HTTP API → Admin sessions: checks sessions
backend/server.py - Realtime WebSocket → Portal operations: runs operations
backend/wsserver.py - Realtime WebSocket → Chat history: reads and writes
backend/wsserver.py - Portal operations → Voucher / session JSON: loads and saves
backend/portal.py - Portal operations → Per-IP data records: manages data packages
backend/portal.py - Portal operations → Firewall control: grants or revokes
backend/portal.py - Portal operations → Voucher packages: uses package rules
backend/portal.py - Application startup → HTTP API: starts server
main.py - Application startup → Realtime WebSocket: starts server
main.py - Application startup → Traffic accounting bot: starts task
main.py - Application startup → Voucher / session JSON: loads active state
main.py - Application startup → Firewall control: syncs active IPs
README.md - Traffic accounting bot → Network discovery: reads traffic counters
backend/data_bot2.py - Traffic accounting bot → Per-IP data records: applies traffic deltas
backend/data_bot2.py - Traffic accounting bot → Firewall control: revokes exhausted IPs
README.md - Firewall control → nftables / iptables: updates rules
backend/nft.py - Network discovery → nftables / iptables: reads counters
backend/network.py - nftables / iptables → Internet: permits forwarding
README.md - HTTP API → Voucher / session JSON: serves dashboard data
README.md