mirror of
https://github.com/house-of-vanity/OutFleet.git
synced 2025-08-21 14:37:16 +00:00
Xray works
This commit is contained in:
33
vpn/xray_api_v2/commands/user.py
Normal file
33
vpn/xray_api_v2/commands/user.py
Normal file
@@ -0,0 +1,33 @@
|
||||
"""User management command wrappers"""
|
||||
from dataclasses import dataclass
|
||||
from typing import List, Optional, Dict, Any
|
||||
|
||||
from ..models.base import BaseXrayModel
|
||||
|
||||
|
||||
@dataclass
|
||||
class AddUserRequest(BaseXrayModel):
|
||||
"""Request to add user to inbound"""
|
||||
inboundTag: str
|
||||
user: Dict[str, Any] # Protocol-specific user config
|
||||
|
||||
|
||||
@dataclass
|
||||
class RemoveUserRequest(BaseXrayModel):
|
||||
"""Request to remove user from inbound"""
|
||||
inboundTag: str
|
||||
email: str
|
||||
|
||||
|
||||
@dataclass
|
||||
class UserStats(BaseXrayModel):
|
||||
"""User statistics data"""
|
||||
email: str
|
||||
uplink: int = 0
|
||||
downlink: int = 0
|
||||
online: bool = False
|
||||
ips: List[str] = None
|
||||
|
||||
def __post_init__(self):
|
||||
if self.ips is None:
|
||||
self.ips = []
|
Reference in New Issue
Block a user