Giter VIP home page Giter VIP logo

vump-grpc-client's Introduction

VUMP-gRPC-client

This is a python gRPC client for V2Ray/V2Fly gRPC API.

Installation

pip install -U VUMP-gRPC-client

Example

from vump_grpc_client import VUMPClient, utils, exceptions

v2ray_client = VUMPClient('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(v2ray_client.get_client_download_traffic('[email protected]')))
print(utils.human_readable_bytes(v2ray_client.get_client_upload_traffic('[email protected]')))
print(utils.human_readable_bytes(v2ray_client.get_inbound_download_traffic(inbound_tag)))
print(utils.human_readable_bytes(v2ray_client.get_inbound_upload_traffic(inbound_tag)))
print(utils.human_readable_bytes(v2ray_client.get_total_download_traffic()))
print(utils.human_readable_bytes(v2ray_client.get_total_upload_traffic()))

# Add & Remove client
user = v2ray_client.add_client(inbound_tag, user_id, user_email)
if user:
    print(user)
    v2ray_client.remove_client(inbound_tag, user_email)

# restart logger
v2ray_client.restart_logger()

vump-grpc-client's People

Contributors

mahdizojaji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vump-grpc-client's Issues

اشتباه نشون میده

من پنل ثنایی استفاده میکنم، یه کلاینت ۲۸ گیگ مصرف کرده این ۵۲ بایت نشون میده

وصل شدن

سلام
چطور باید یوزر و پسورد رو بهش بدم ؟‌

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.