hiddify/xtlsapi
Fork: 12 Star: 52 (更新于 2024-11-20 04:36:47)
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-11-22 08:12:43 jxxghp/MoviePilot
2024-11-22 02:39:01 goauthentik/authentik
2024-11-22 00:15:39 jumpserver/jumpserver
2024-11-22 00:03:47 comfyanonymous/ComfyUI
2024-11-21 22:06:18 rashevskyv/dbi
2024-11-21 21:09:02 xtekky/gpt4free