Giter Site home page Giter Site logo

ll-mtproto's Introduction

LL-MTPROTO

LL-mtproto is an abstraction-free mtproto client.

INSTALLATION

pip3 install git+https://github.com/andrew-ld/LL-mtproto

ABOUT

ll-mtproto was developed as an answer to the mtproto clients currently existing on the opensource market, they are too complicated due to excessive abstraction layers, unfortunately these abstractions are difficult to maintain and have a strong impact on performance.

FAST DYNAMIC TL DESERIALIZER

ll-mtproto unlike many alternatives does not generate code to deserialize the received data, it parse at runtime the schema and use it to deserialize the data, deserializer has been heavily adapted to be able to be compiled to native machine code to achieve superior performance

To compile the deserializer simply run mypyc by giving as input the file tl.py

python3 -m mypyc --strict ll_mtproto/tl/tl.py

LICENSING

it must be noted that ll-mtproto is a derivative work of mtproto2json developed by @nikat, the publication of ll-mtproto under agplv3 license is possible only thanks to the approval of nikat to change the license of mtproto2json with agplv3.

ll-mtproto's People

Contributors

andrew-ld avatar cavallium avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

icodein

ll-mtproto's Issues

Unknown constructor 0x1cb5c415

if response is vector it throws this error

  File "/root/LL-mtproto-master/ll_mtproto/tl/tl.py", line 229, in deserialize
    raise ValueError(f"Unknown constructor {hex(int.from_bytes(cons_number, 'little'))}")
ValueError: Unknown constructor 0x1cb5c415

crypto providers

allow other developers to use implementations other than cryptg by abstracting methods for cryptography as already done for networking and codec

response to json

when i try to convert received response into json string i am getting this following error.

TypeError: Object of type bytes is not JSON serializable

dialogs = await session.rpc_call({"_cons":"messages.getDialogs","hash":0,"offset_peer": {"_cons":"inputPeerEmpty"},"offset_id":0, "offset_date":0,"offset": 0, "max_id": 0,"limit": 3,})
print(json.dumps(dialogs.get_dict()))

received a message with unknown salt!

in a long, continuously running process after some period of time, i start to get this error message,
same error for all rpc call.

ERROR:root:received a message with unknown salt! -259348346848177331
ERROR:root:received a message with unknown salt! -259348346848177331
ERROR:root:received a message with unknown salt! -259348346848177331
ERROR:root:received a message with unknown salt! -259348346848177331

but the response for rpc calls seems to be coming and correct ๐Ÿค”
is this related to network issue? do i have to ignore it?
this error do not go away until i relaunch the process.

layer 140

layer 140 add a costructor with multiple flags, need investigation

ConnectionResetError

connection is dying after 10 seconds?
steps to reproduce
run any rpc call then sleep
time.sleep(10)
run another rpc call this time we get ConnectionResetError
same result even if we run rpc calls continuously without sleep.

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.