[PR #3629] [MERGED] feat: Real-time Outbound Traffic, UI Improvements & Fix #5488

Closed
opened 2026-10-31 20:47:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/3629
Author: @lolka1333
Created: 1/4/2026
Status: ✅ Merged
Merged: 1/5/2026
Merged by: @MHSanaei

Base: main ← Head: main


📝 Commits (3)

  • 08df65e Refactor HTML and JavaScript for improved UI and functionality
  • 3fba479 Refactor client traffic handling in InboundService
  • 3789711 Add WebSocket support for outbounds traffic updates

📊 Changes

11 files changed (+260 additions, -239 deletions)

View changed files

📝 web/assets/js/subscription.js (+5 -5)
📝 web/html/common/page.html (+34 -0)
📝 web/html/form/protocol/vless.html (+99 -112)
📝 web/html/inbounds.html (+3 -20)
📝 web/html/settings/panel/subscription/subpage.html (+71 -96)
📝 web/html/settings/xray/outbounds.html (+2 -2)
📝 web/html/xray.html (+12 -1)
📝 web/job/xray_traffic_job.go (+23 -1)
📝 web/service/inbound.go (+2 -2)
📝 web/websocket/hub.go (+1 -0)
📝 web/websocket/notifier.go (+8 -0)

📄 Description

What is the pull request?

Implemented real-time traffic monitoring for Outbounds, fixed a regression in inbound traffic calculation, and improved the UI.

Key Changes:

  • Real-time Outbound Traffic: Added WebSocket support to broadcast live outbound traffic statistics to the frontend.
  • Bug Fix: Resolved an issue where real-time bandwidth usage incorrectly replaced total consumed traffic for online users.
  • UI/UX Improvements: Enhanced the visual layout with better spacing, borders, and polished styling for the traffic display.
  • Backend Enhancements:
    • Updated the WebSocket hub and notification system to support outbound traffic broadcasting.
    • Modified background traffic jobs to trigger real-time updates for outbounds.

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

Screenshots


🔄 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/MHSanaei/3x-ui/pull/3629 **Author:** [@lolka1333](https://github.com/lolka1333) **Created:** 1/4/2026 **Status:** ✅ Merged **Merged:** 1/5/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`08df65e`](https://github.com/MHSanaei/3x-ui/commit/08df65e733eabef5a89d1343fdf6454079ca9415) Refactor HTML and JavaScript for improved UI and functionality - [`3fba479`](https://github.com/MHSanaei/3x-ui/commit/3fba479bceebc053105e80c3bcfee541666c6a1f) Refactor client traffic handling in InboundService - [`3789711`](https://github.com/MHSanaei/3x-ui/commit/3789711bed458986aaa990464ac18ebdda8a2aa2) Add WebSocket support for outbounds traffic updates ### 📊 Changes **11 files changed** (+260 additions, -239 deletions) <details> <summary>View changed files</summary> 📝 `web/assets/js/subscription.js` (+5 -5) 📝 `web/html/common/page.html` (+34 -0) 📝 `web/html/form/protocol/vless.html` (+99 -112) 📝 `web/html/inbounds.html` (+3 -20) 📝 `web/html/settings/panel/subscription/subpage.html` (+71 -96) 📝 `web/html/settings/xray/outbounds.html` (+2 -2) 📝 `web/html/xray.html` (+12 -1) 📝 `web/job/xray_traffic_job.go` (+23 -1) 📝 `web/service/inbound.go` (+2 -2) 📝 `web/websocket/hub.go` (+1 -0) 📝 `web/websocket/notifier.go` (+8 -0) </details> ### 📄 Description ## What is the pull request? Implemented real-time traffic monitoring for Outbounds, fixed a regression in inbound traffic calculation, and improved the UI. **Key Changes:** - **Real-time Outbound Traffic:** Added WebSocket support to broadcast live outbound traffic statistics to the frontend. - **Bug Fix:** Resolved an issue where real-time bandwidth usage incorrectly replaced total consumed traffic for online users. - **UI/UX Improvements:** Enhanced the visual layout with better spacing, borders, and polished styling for the traffic display. - **Backend Enhancements:** - Updated the WebSocket hub and notification system to support outbound traffic broadcasting. - Modified background traffic jobs to trigger real-time updates for outbounds. ## Which part of the application is affected by the change? - [x] Frontend - [x] Backend ## Type of Changes - [x] Bug fix - [x] New feature - [ ] Refactoring - [x] Other ## Screenshots <!-- Add screenshots to illustrate the changes --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 20:47:19 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#5488
No description provided.