[PR #2982] feat(web): add static file serving #2978

Open
opened 2025-12-29 04:19:54 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2982
Author: @lujian0571
Created: 12/22/2025
Status: 🔄 Open

Base: mainHead: main


📝 Commits (5)

  • 72f7956 feat(web): add static file serving
  • e6330b8 feat(config): fix web config path
  • 69de63b docs(web): Add web interface integration document
  • e3d175b test(web): optimize web app unit tests
  • 088a635 chore(changelog): add entry for built-in static web interfaces

📊 Changes

7 files changed (+266 additions, -1 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 config-example.yaml (+32 -0)
📝 docs/ref/integration/web-ui.md (+28 -0)
📝 hscontrol/app.go (+2 -1)
📝 hscontrol/types/config.go (+16 -0)
hscontrol/web.go (+90 -0)
hscontrol/web_test.go (+97 -0)

📄 Description

Serve built-in web UIs directly from headscale

This change allows headscale to serve built-in static web interfaces
(e.g. admin or console UIs) directly from the headscale process.

By embedding and serving web assets internally:

  • Avoids deploying and maintaining separate web services
  • Eliminates the need for additional reverse proxy configuration
  • Reuses headscale’s existing HTTPS and certificate management
  • Simplifies authentication, routing, and operational complexity

This makes it easier to add and maintain management UIs while keeping
deployment minimal and self-contained.

  • have read the CONTRIBUTING.md file
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/2982 **Author:** [@lujian0571](https://github.com/lujian0571) **Created:** 12/22/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (5) - [`72f7956`](https://github.com/juanfont/headscale/commit/72f7956909561d26d6e4ef6a1561cc4afc163bae) feat(web): add static file serving - [`e6330b8`](https://github.com/juanfont/headscale/commit/e6330b8b30e0b0d36a2cb9fc44a174fae3d372f0) feat(config): fix web config path - [`69de63b`](https://github.com/juanfont/headscale/commit/69de63bab39486c14cab403f44a4199d31383c62) docs(web): Add web interface integration document - [`e3d175b`](https://github.com/juanfont/headscale/commit/e3d175b534e91d33c38eb95cf5845da09cde3139) test(web): optimize web app unit tests - [`088a635`](https://github.com/juanfont/headscale/commit/088a6353f2bd39583f391ee7e3de4493b926aa7f) chore(changelog): add entry for built-in static web interfaces ### 📊 Changes **7 files changed** (+266 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `config-example.yaml` (+32 -0) 📝 `docs/ref/integration/web-ui.md` (+28 -0) 📝 `hscontrol/app.go` (+2 -1) 📝 `hscontrol/types/config.go` (+16 -0) ➕ `hscontrol/web.go` (+90 -0) ➕ `hscontrol/web_test.go` (+97 -0) </details> ### 📄 Description Serve built-in web UIs directly from headscale This change allows headscale to serve built-in static web interfaces (e.g. admin or console UIs) directly from the headscale process. By embedding and serving web assets internally: - Avoids deploying and maintaining separate web services - Eliminates the need for additional reverse proxy configuration - Reuses headscale’s existing HTTPS and certificate management - Simplifies authentication, routing, and operational complexity This makes it easier to add and maintain management UIs while keeping deployment minimal and self-contained. <!-- Headscale is "Open Source, acknowledged contribution", this means that any contribution will have to be discussed with the Maintainers before being submitted. This model has been chosen to reduce the risk of burnout by limiting the maintenance overhead of reviewing and validating third-party code. Headscale is open to code contributions for bug fixes without discussion. If you find mistakes in the documentation, please submit a fix to the documentation. --> <!-- Please tick if the following things apply. You… --> - [x] have read the [CONTRIBUTING.md](./CONTRIBUTING.md) file - [ ] raised a GitHub issue or discussed it on the projects chat beforehand - [x] added unit tests - [ ] added integration tests - [x] updated documentation if needed - [x] updated CHANGELOG.md <!-- If applicable, please reference the issue using `Fixes #XXX` and add tests to cover your new code. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 04:19:54 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2978