sing-box-cli 0.0.24__tar.gz → 0.0.25__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/CHANGELOG.md +6 -0
  2. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/PKG-INFO +1 -1
  3. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/pyproject.toml +1 -1
  4. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/__init__.py +1 -1
  5. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/monitor.py +4 -0
  6. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/.github/dependabot.yml +0 -0
  7. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/.github/workflows/main.yml +0 -0
  8. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/.gitignore +0 -0
  9. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/.pre-commit-config.yaml +0 -0
  10. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/LICENSE +0 -0
  11. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/README.md +0 -0
  12. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/assets/image.png +0 -0
  13. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/scripts/bump.sh +0 -0
  14. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/scripts/format.sh +0 -0
  15. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/scripts/lint.sh +0 -0
  16. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/scripts/pre-commit.sh +0 -0
  17. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/client.py +0 -0
  18. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/config.py +0 -0
  19. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/connections.py +0 -0
  20. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/main.py +0 -0
  21. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/policy.py +0 -0
  22. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/py.typed +0 -0
  23. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/run.py +0 -0
  24. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/service.py +0 -0
  25. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/widget.py +0 -0
  26. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/tests/test_config.py +0 -0
  27. {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/uv.lock +0 -0
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## 0.0.25 - 2025-03-20
6
+
7
+ ### 🐛 Bug Fixes
8
+
9
+ - Set fixed interval to avoid repeated traffic data
10
+
5
11
  ## 0.0.24 - 2025-03-19
6
12
 
7
13
  ### 🚜 Refactor
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sing-box-cli
3
- Version: 0.0.24
3
+ Version: 0.0.25
4
4
  Summary: cross-platform sing-box-service manager.
5
5
  Project-URL: Homepage, https://github.com/aittcuszz/sing-box-service
6
6
  Project-URL: Issues, https://github.com/atticuszz/sing-box-service/issues
@@ -212,7 +212,7 @@ sort_commits = "oldest"
212
212
 
213
213
 
214
214
  [tool.bumpversion]
215
- current_version = "0.0.24"
215
+ current_version = "0.0.25"
216
216
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
217
217
  serialize = ["{major}.{minor}.{patch}"]
218
218
  search = "{current_version}"
@@ -2,4 +2,4 @@ from .main import main
2
2
 
3
3
  __all__ = ["main"]
4
4
 
5
- __version__ = "0.0.24"
5
+ __version__ = "0.0.25"
@@ -642,6 +642,8 @@ class ResourceMonitor:
642
642
  self.running = False
643
643
  self.current_traffic = {"up": 0, "down": 0} # in bytes
644
644
  self.current_memory = {"inuse": 0, "total": 0} # in bytes
645
+ # 1.0 fix interval for avoiding repeated data
646
+ self.task_interval = RefreshRate.SLOW.value
645
647
 
646
648
  async def monitor_traffic(self) -> None:
647
649
  """Monitor traffic stream from the API."""
@@ -650,6 +652,7 @@ class ResourceMonitor:
650
652
  self.current_traffic = traffic_data
651
653
  if not self.running:
652
654
  break
655
+ await asyncio.sleep(self.task_interval)
653
656
  except asyncio.CancelledError:
654
657
  pass
655
658
  except Exception as e:
@@ -662,6 +665,7 @@ class ResourceMonitor:
662
665
  self.current_memory = memory_data
663
666
  if not self.running:
664
667
  break
668
+ await asyncio.sleep(self.task_interval)
665
669
  except asyncio.CancelledError:
666
670
  pass
667
671
  except Exception as e:
File without changes
File without changes
File without changes
File without changes