2
0
Captive Portal implementation in python
Go to file
2022-04-07 17:11:11 +02:00
protobuf initial commit 2022-04-05 12:05:18 +02:00
src/capport sync controller database to disk and load it on start 2022-04-07 17:11:11 +02:00
.gitignore sync controller database to disk and load it on start 2022-04-07 17:11:11 +02:00
.pycodestyle initial commit 2022-04-05 12:05:18 +02:00
.pylintrc initial commit 2022-04-05 12:05:18 +02:00
capport-example.yaml support hypercorn server_names against dns rebind attacks, add cookie sessions to flash messages 2022-04-06 19:05:31 +02:00
LICENSE initial commit 2022-04-05 12:05:18 +02:00
mypy initial commit 2022-04-05 12:05:18 +02:00
pylint initial commit 2022-04-05 12:05:18 +02:00
pyproject.toml initial commit 2022-04-05 12:05:18 +02:00
README.md fix i18n 2022-04-07 13:53:45 +02:00
setup-venv.sh initial commit 2022-04-05 12:05:18 +02:00
setup.cfg initial commit 2022-04-05 12:05:18 +02:00
setup.py initial commit 2022-04-05 12:05:18 +02:00
start-api.sh split api, support custom templates 2022-04-06 19:47:08 +02:00
start-control.sh initial commit 2022-04-05 12:05:18 +02:00

python Captive Portal

Installation

Either clone repository (and install dependencies either through distribution or as virtualenv with ./setup-venv.sh) or install as package.

pipx (available in debian as package) can be used to install in separate virtual environment:

pipx install https://github.tik.uni-stuttgart.de/NKS/python-capport

In production put a reverse proxy in front of the local web ui (on 127.0.0.1:8000), and handle /static path either to src/capport/api/static/ or your customized version of static files.

Customization

Create custom/templates and put customized templates (from src/capport/api/templates) there.

Create i18n/<langcode> folders to put localized templates into (localized extends must use the full i18n/.../basetmpl paths though).

Requests with a setlang=<langcode> query parameter will set the language and try to store the choice in a session cookie.