captive.whump.shanti-portal/README.md

27 lines
1.0 KiB
Markdown
Raw Normal View History

2016-04-05 14:43:13 +00:00
# Captive Portal
Work in progress right now.
2016-04-15 17:24:44 +00:00
2016-04-15 17:27:44 +00:00
Captive portal webpage written with simplicity in mind.
- Present a webpage to the user
- Users submits a form
- Plugins are executed with form data
- User is granted access to whatever treasure the portal is guarding
This is a commonly seen setup in public Wifi networks or hotspots.
This app was specifically written for such a hotspot and as such requires a lot of other configuration around it. This is an ongoing [documentation project here](http://wiki.sydit.se/teknik:guider:captive_portal_med_iptables).
2016-04-15 17:24:44 +00:00
# Plugins
Plugins are executed when the user clicks through the captive portal form, whether they submit data or just approve an EULA these plugins are executed.
Plugins accept data from the request of the user, as of writing this is only wsgi environ data.
There is a sample plugin called logging.py. Plugins are merely rq jobs that are executed by an rq worker. As such they can only be so complex.
# RQ worker
2016-04-15 17:25:02 +00:00
rq worker -u redis://127.0.0.1:6379/