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.
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/CHANGELOG.md +6 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/PKG-INFO +1 -1
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/pyproject.toml +1 -1
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/__init__.py +1 -1
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/monitor.py +4 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/.github/dependabot.yml +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/.github/workflows/main.yml +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/.gitignore +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/.pre-commit-config.yaml +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/LICENSE +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/README.md +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/assets/image.png +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/scripts/bump.sh +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/scripts/format.sh +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/scripts/lint.sh +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/scripts/pre-commit.sh +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/client.py +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/config.py +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/connections.py +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/main.py +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/policy.py +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/py.typed +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/run.py +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/service.py +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/src/sing_box_service/widget.py +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/tests/test_config.py +0 -0
- {sing_box_cli-0.0.24 → sing_box_cli-0.0.25}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sing-box-cli
|
|
3
|
-
Version: 0.0.
|
|
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.
|
|
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}"
|
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|