MadelineProto/README.md

51 lines
3.2 KiB
Markdown
Raw Normal View History

2016-06-23 23:51:08 +02:00
# MadelineProto
2016-07-14 16:32:55 +02:00
[![StyleCI](https://styleci.io/repos/61838413/shield)](https://styleci.io/repos/61838413)
2016-08-09 23:32:34 +02:00
[![Build Status](https://travis-ci.org/danog/MadelineProto.svg?branch=master)](https://travis-ci.org/danog/MadelineProto)
2016-08-08 18:10:13 +02:00
Licensed under AGPLv3.
PHP implementation of MTProto, based on [telepy](https://github.com/griganton/telepy_old).
2015-03-11 16:42:20 +01:00
2016-08-14 21:38:32 +02:00
This project can run on PHP 7, PHP 5.6 and HHVM.
2016-10-07 00:36:18 +02:00
This is a WIP.
Structure of this project:
```
src/danog/MadelineProto/
MTProtoTools/
AckHandler - Handles acknowledgement of incoming and outgoing mtproto messages
AuthKeyHandler - Handles generation of the temporary and permanent authorization keys
CallHandler - Handles synchronous calls to mtproto methods or objects, also basic response management (waits until the socket receives a response)
Crypt - Handles ige and aes encryption
Exception - Handles exceptions in the MTProtoTools namespace
MessageHandler - Handles sending and receiving of mtproto messages (packs TL serialized data with message id, auth key id and encrypts it with Crypt if needed, adds them to the arrays of incoming and outgoing messages)
MsgIdHandler - Handles message ids (checks if they are valid, adds them to the arrays of incoming and outgoing messages)
ResponseHandler - Handles the content of responses received, service messages, rpc results, errors, and stores them into the response section of the outgoing messages array)
SaltHandler - Handles server salts
SeqNoHandler - Handles sequence numbers (checks validity)
TL/
Exception - Handles exceptions in the TL namespace
TL - Handles TL serialization and deserialization
TLConstructor - Represents a TL Constructor
TLMethod - Represents a TL method
API - Wrapper class that istantiates the MTProto class, sets the error handler, and provides a wrapper for calling mtproto methods directly as class submethods
Connection - Handles tcp/udp/http connections and wrapping payloads generated by MTProtoTools/MessageHandler into the right message according to the protocol
DataCenter - Handles mtproto datacenters
2016-10-07 00:36:18 +02:00
DebugTools - Various debugging tools
Exception - Handles exceptions in the main namespace
MTProto - Extends MTProtoTools, handles initial connection, generation of authorization keys, istantiation of classes
MTProtoTools - Extends all of the classes in MTProtoTools/
prime.py - prime module (python) for p and q generation
PrimeModule.php - prime module (php) for p and q generation by wrapping the python module, using wolfram alpha or a (broken) built in engine
RSA - Handles RSA public keys and signatures
Tools - Various tools (positive modulus, string2bin, python-like range)
```
2016-10-03 14:04:03 +02:00
This project adheres to the [Hacktoberfest](https://hacktoberfest.digitalocean.com/) event by DigitalOcean.
Browse the issues of this project and help close at least four of them with a pull request to get a free t-shirt!
2016-10-07 00:36:18 +02:00
Check out the [Contribution guide first though](https://github.com/danog/MadelineProto/blob/master/CONTRIBUTING.md).
2016-06-28 03:10:15 +02:00
The name of this project is inspired by [this person](https://s-media-cache-ak0.pinimg.com/736x/f0/a1/70/f0a170718baeb0e3817c612d96f5d1cf.jpg).