hiddify/xtlsapi
Fork: 12 Star: 52 (更新于 2024-12-13 23:21:18)
license: Unlicense
Language: Python .
Python library to communicate with xray core
最后发布版本: 3.1.2 ( 2023-05-20 16:23:35)
xtlsapi
Python library to communicate with xray core
Install it from PyPI
pip install xtlsapi
Usage
from xtlsapi import XrayClient, utils, exceptions
xray_client = XrayClient('1.2.3.4', 1234)
user_id = utils.generate_random_user_id()
user_email = utils.generate_random_email()
inbound_tag = 'inbound-tag'
# Get stats
print(utils.human_readable_bytes(xray_client.get_client_download_traffic('user-email@mail.com')))
print(utils.human_readable_bytes(xray_client.get_client_upload_traffic('user-email@mail.com')))
print(utils.human_readable_bytes(xray_client.get_inbound_download_traffic(inbound_tag)))
print(utils.human_readable_bytes(xray_client.get_inbound_upload_traffic(inbound_tag)))
# Add & Remove client
user = xray_client.add_client(inbound_tag, user_id, user_email)
if user:
print(user)
xray_client.remove_client(inbound_tag, user_email)
# restart logger
xray_client.restart_logger()
Development
Read the CONTRIBUTING.md file.
最近版本更新:(数据更新于 2024-09-25 08:21:49)
2023-05-20 16:23:35 3.1.2
2023-05-20 16:02:33 3.1.1
2023-05-20 15:10:09 3.1.0
2023-05-19 00:05:07 3.0.4
2023-05-18 22:21:56 3.0.3
2023-05-18 22:16:27 3.0.2
2023-05-18 22:05:07 3.0.1
2023-05-18 22:00:18 3.0.0
2023-03-07 06:44:39 2.0.0
2023-03-07 04:56:45 1.1.0
hiddify/xtlsapi同语言 Python最近更新仓库
2024-12-22 09:03:32 ultralytics/ultralytics
2024-12-21 13:26:40 notepad-plus-plus/nppPluginList
2024-12-21 11:42:53 XiaoMi/ha_xiaomi_home
2024-12-21 04:33:22 comfyanonymous/ComfyUI
2024-12-20 18:47:56 home-assistant/core
2024-12-20 15:41:40 jxxghp/MoviePilot