How uaigoiano-max/drinkfornetwifi works
DrinkForNet is a portable event Wi-Fi captive-portal product: visitors learn the access rule, meet the host, receive an individual voucher, and use it for a 25-minute session. Its runtime spans a static visitor experience and an OpenWrt voucher core with an administrative interface. The sampled sources show the page configuration and browser behavior, plus the admin client’s CGI requests. README claims cover the core’s lifecycle and the still-unimplemented network authorization adapter; those unsampled connections are represented cautiously.
Main entry points: script.js Page interactions · drinkfornet-core.lua Voucher core · wifi-free.html Captive landing page · admin.js Admin console
Components 15
Visitor experience
- Captive landing page
wifi-free.html - Page interactions
script.js - Event configuration
config.js - Host photo gallery
script.js - Voucher form
wifi-free.html
Voucher operations
- Admin console
admin/admin.js - Admin CGI API
openwrt/www/cgi-bin/drinkfornet.lua - Voucher core
openwrt/usr/libexec/drinkfornet-core.lua - Persistent voucher store
openwrt/usr/libexec/drinkfornet-core.lua - Voucher lifecycle
openwrt/usr/libexec/drinkfornet-core.lua
Network access
- OpenWrt router
- Network adapter
openwrt/usr/sbin/drinkfornet-adapter - Firewall authorization
Other components
- Event visitor
- Event administrator
Connections 13
- Event visitor → Captive landing page: opens
README.md - Captive landing page → Page interactions: runs interactions
script.js - Page interactions → Event configuration: reads settings
script.js - Page interactions → Host photo gallery: renders gallery
script.js - Event visitor → Voucher form: enters voucher
README.md - Event administrator → Admin console: manages vouchers
README.md - Admin console → Admin CGI API: requests actions
admin/admin.js - Admin CGI API → Voucher core: delegates operations
- Voucher core → Persistent voucher store: persists vouchers
- Voucher core → Voucher lifecycle: generates and expires
README.md - OpenWrt router → Captive landing page: opens portal
README.md - Network adapter → Firewall authorization: would authorize
README.md - Voucher lifecycle → Network adapter: would activate access
README.md