mirror of
https://github.com/iFargle/headscale-webui.git
synced 2026-03-22 01:14:46 +01:00
fe7a3667d41ac77d0b0791b78e91a490d2c4ed3d
Major part of #73 Unfortunately, it wasn't possible to split it to multiple smaller commits, since the changes touched the entire application substantially. Here is a short list of major changes: 1. Create a separate library (headscale-api), which is used as a convenient abstraction layer providing Pythonic interface with Pydantic. Headscale API is fully asynchronous library, benefitting from improved concurrency for backend requests thus increasing page load speed, e.g., on "Machines" page. 2. Create a common common, validated with flask-pydantic API passthrough layer from GUI to the backend. 3. Move authentication to a separate (auth.py), consolidating the functionality in a single place (with better place for expansion in the future). 4. Move configuration management to a separate module (config.py). Use Pydantic's BaseSettings for reading values from environment, with extensive validation and error reporting. 5. Reduce the number of health checks. - Now, most are performed during server initialization. If any test fails, the server is started in tainted mode, with only the error page exposed (thus reducing the surface of attack in invalid state). - Key checks are implicit in the requests to the backend and guarded by `@headscale.key_check_guard` decorator. - Key renewal is moved to server-side scheduler. 6. Introduce type hints to the level satisfactory for mypy static analysis. Also, enable some other linters in CI and add optional pre-commit hooks. 7. Properly handle some error states. Instead of returning success and handling different responses, if something fails, there is HTTP error code and standard response for it. 8. General formatting, small rewrites for clarity and more idiomatic Python constructs. Signed-off-by: Marek Pikuła <marek.pikula@embevity.com>
Headscale-WebUI
A simple Headscale web UI for small-scale deployments.
Screenshots | Installation | Issues
Features
- Enable/Disable routes and exit nodes
- Manage failover routes as well
- Add, move, rename, and remove machines
- Add and remove users/namespaces
- Add and expire PreAuth keys
- Add and remove machine tags
- View machine details
- Hostname
- User associated with the machine
- IP addresses in the Tailnet
- Last seen by the control server
- Last update with the control server
- Creation date
- Expiration date (will also display a badge when nearing expiration)
- PreAuth key associated with the machine
- Enable / disable routes and exit nodes
- Add and delete machine tags
- Basic and OIDC Authentication
- OIDC Authentication tested with Authelia and Keycloak
- Change your color theme! See MaterializeCSS Documentation for Colors for examples.
- Search your machines and users.
- Machines have tags you can use to filter search:
tag:tagnameSearches only for specific tagsmachine:machine-nameSearches only for specific machinesuser:user-nameSearches only for specific users
- Machines have tags you can use to filter search:
Installation
- See SETUP.md for installation and configuration instructions.
Screenshots:
Tech used:
For Python libraries, see pyproject.toml
If you use this project, please reach out! It keeps me motivated! Thank you!
Description
Languages
Python
54.2%
JavaScript
27.6%
HTML
16.3%
Dockerfile
1%
CSS
0.9%




