mirror of
https://github.com/remnawave/python-sdk.git
synced 2026-09-01 23:00:44 +00:00
- Zmieniono wersję pakietu z 2.1.7.post1 na 2.1.8 w pliku pyproject.toml oraz README.md.
- Przeniesiono endpoint `/sub/{short_uuid}/raw` z `SubscriptionController` do `SubscriptionsController`.
- Rozszerzono modele subskrypcji o dodatkowe informacje o użytkowniku, połączeniach, hasłach i wykorzystaniu ruchu.
- Dodano nowy endpoint `/system/tools/x25519/generate` do generowania pary kluczy X25519.
- Uzupełniono klasyfikatory projektu o nowe tematy w `pyproject.toml`.
Zmiany poprawiają strukturę API, rozszerzają możliwości diagnostyczne oraz wprowadzają nową funkcjonalność kryptograficzną.
53 lines
No EOL
1.5 KiB
Python
53 lines
No EOL
1.5 KiB
Python
from remnawave.models import (
|
|
GetBandwidthStatsResponseDto,
|
|
GetNodesStatisticsResponseDto,
|
|
GetStatsResponseDto,
|
|
GetNodesMetricsResponseDto,
|
|
GetRemnawaveHealthResponseDto,
|
|
GetX25519KeyPairResponseDto
|
|
)
|
|
from remnawave.rapid import BaseController, get
|
|
|
|
|
|
class SystemController(BaseController):
|
|
@get("/system/stats", response_class=GetStatsResponseDto)
|
|
async def get_stats(
|
|
self,
|
|
) -> GetStatsResponseDto:
|
|
"""Get System Stats"""
|
|
...
|
|
|
|
@get("/system/stats/bandwidth", response_class=GetBandwidthStatsResponseDto)
|
|
async def get_bandwidth_stats(
|
|
self,
|
|
) -> GetBandwidthStatsResponseDto:
|
|
"""Get System Bandwidth Statistics"""
|
|
...
|
|
|
|
@get("/system/stats/nodes", response_class=GetNodesStatisticsResponseDto)
|
|
async def get_nodes_statistics(
|
|
self,
|
|
) -> GetNodesStatisticsResponseDto:
|
|
"""Get Nodes Statistics"""
|
|
...
|
|
|
|
@get("/system/health", response_class=GetRemnawaveHealthResponseDto)
|
|
async def get_health(
|
|
self,
|
|
) -> GetRemnawaveHealthResponseDto:
|
|
"""Get System Health"""
|
|
...
|
|
|
|
@get("/system/nodes/metrics", response_class=GetNodesMetricsResponseDto)
|
|
async def get_nodes_metrics(
|
|
self,
|
|
) -> GetNodesMetricsResponseDto:
|
|
"""Get Nodes Metrics"""
|
|
...
|
|
|
|
@get("/system/tools/x25519/generate", response_class=GetX25519KeyPairResponseDto)
|
|
async def get_x25519_key_pair(
|
|
self,
|
|
) -> GetX25519KeyPairResponseDto:
|
|
"""Get X25519 Key Pair"""
|
|
... |