Add Web Admin Dashboard, JSON API, and Basic Auth#22
Open
NangenX wants to merge 4 commits intorozhuk-im:masterfrom
Open
Add Web Admin Dashboard, JSON API, and Basic Auth#22NangenX wants to merge 4 commits intorozhuk-im:masterfrom
NangenX wants to merge 4 commits intorozhuk-im:masterfrom
Conversation
rozhuk-im
reviewed
Dec 14, 2025
| } | ||
|
|
||
| static void | ||
| base64_encode(const uint8_t *src, size_t len, uint8_t *dst) { |
Owner
There was a problem hiding this comment.
There is base64 encoder/decoder in liblcb: /include/utils/base64.h
rozhuk-im
reviewed
Dec 14, 2025
| static void | ||
| json_escape_str(io_buf_p buf, const char *str) { | ||
| while (*str) { | ||
| if (*str == '"') io_buf_printf(buf, "\\\""); |
Owner
There was a problem hiding this comment.
There is mem_replace_arr() for things like that, or at least switch() is better.
Owner
|
Awesome work! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
This PR introduces a lightweight, embedded web administration dashboard to monitor the server status, stream hubs, and connected clients in real-time. It adheres to the "lite" philosophy of the project by requiring no external dependencies or extra files.
Key Features:
Web Dashboard (/admin):
A modern, dark-themed, single-page interface embedded directly into the binary.
Real-time monitoring (1s refresh rate) of CPU, RAM, and Network I/O.
Detailed view of Stream Hubs, including source addresses (UDP/RTP) and input bitrates.
Expandable client lists showing Client IP, User Agent, and connection duration.
JSON API (/api/stats):
New endpoint providing structured system and stream data in JSON format.
Implemented without external JSON libraries to maintain zero dependencies.
Basic Authentication:
Added support for HTTP Basic Authentication to protect the /admin and /api/stats endpoints.
Configurable via msd_lite.conf.
Configuration Changes:
To enable Basic Authentication, add the following section to msd_lite.conf inside the tag: