feat: Track user traffic per node (server_id)#755
Open
socksprox wants to merge 6 commits intocedar2025:masterfrom
Open
feat: Track user traffic per node (server_id)#755socksprox wants to merge 6 commits intocedar2025:masterfrom
socksprox wants to merge 6 commits intocedar2025:masterfrom
Conversation
Author
|
@cedar2025 Traffic will now be reported per node, so admins can know if a user used a lot of traffic, but on a very cheap node, or if he used much on an expensive one. This can be used with plugins and so on. The API and Admin panel are not affected, it is only in the DB for now. If you would give me the source for the admin panel, i could add it, otherwise i can't. But please merge this change, would love that :) |
added 4 commits
November 29, 2025 14:07
…and fits vanilla xboard behaviour
…e day", and fits vanilla xboard behaviour" This reverts commit de39230. The api change caused issues
Author
|
Author
|
Here a screenshot of whats possible with the new data. Since I cannot edit the admin panel, I chose to not modify any API: But please take this pull request, then you can modify the admin panel and add this properly, or just keep it like that. I for myself just built a plugin that extends the admin panel so i have the data |
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.
This PR adds per-node user traffic tracking by adding a
server_idcolumn to thev2_stat_usertable.Changes
Files changed
app/Models/StatUser.php- Added server_id to fillableapp/Jobs/StatUserJob.php- Include server_id when recording statsdatabase/migrations/2025_11_29_000000_add_server_id_to_stat_user.php- Add columndatabase/migrations/2025_11_29_120000_update_stat_user_unique_constraint.php- Update unique index