[PR #4202] [MERGED] avoid reset in QueryStatsRequest #5623

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

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/4202
Author: @samssh
Created: 5/10/2026
Status: ✅ Merged
Merged: 5/10/2026
Merged by: @MHSanaei

Base: main ← Head: main


📝 Commits (1)

  • b1a76e1 avoid reset in QueryStatsRequest

📊 Changes

2 files changed (+17 additions, -5 deletions)

View changed files

📝 web/service/xray.go (+2 -1)
📝 xray/api.go (+15 -4)

📄 Description

What is the pull request?

This pull request removes the use of Reset=true in Xray QueryStats calls and replaces it with in-memory delta calculation to improve compatibility with external monitoring tools such as v2ray-exporter.
I also tested client traffic usage calculation after these changes, and it worked correctly without issues.

Fixes #4188

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

🔄 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/4202 **Author:** [@samssh](https://github.com/samssh) **Created:** 5/10/2026 **Status:** ✅ Merged **Merged:** 5/10/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`b1a76e1`](https://github.com/MHSanaei/3x-ui/commit/b1a76e170317da25aec9ca7b3a40f10fc4d17883) avoid reset in QueryStatsRequest ### 📊 Changes **2 files changed** (+17 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `web/service/xray.go` (+2 -1) 📝 `xray/api.go` (+15 -4) </details> ### 📄 Description ## What is the pull request? This pull request removes the use of `Reset=true` in Xray `QueryStats` calls and replaces it with in-memory delta calculation to improve compatibility with external monitoring tools such as v2ray-exporter. I also tested client traffic usage calculation after these changes, and it worked correctly without issues. Fixes #4188 ## Which part of the application is affected by the change? - [ ] Frontend - [x] Backend ## Type of Changes - [ ] Bug fix - [ ] New feature - [x] Refactoring - [ ] Other --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 20:48:14 +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#5623
No description provided.