Skip to content

🚀 Telegram MTProto API Client Library for NodeJs

License

Notifications You must be signed in to change notification settings

sadra/EasyMTProto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasyMTProto

Version License npm version Gitter

Easy Nodejs server app for Telegram Mobile Protocol (MTProto) in pure javascript on the Node.js platform

Telegram Mobile Protocol (MTProto) unofficial library in pure javascript on the Node.js platform

About MTProto..

MTProto is the Telegram Messenger protocol "designed for access to a server API from applications running on mobile devices".

The Mobile Protocol is subdivided into three components (from the official site):

  • High-level component (API query language): defines the method whereby API queries and responses are converted to binary messages.

  • Cryptographic (authorization) layer: defines the method by which messages are encrypted prior to being transmitted through the transport protocol.

  • Transport component: defines the method for the client and the server to transmit messages over some other existing network protocol (such as, http, https, tcp, udp).

Easy-MTProto in short..

The Easy-MTProto use JSMTProxy as the kernel.

Installation

Get the easy-mtproto and install all dependencies:

$ git clone --branch=master https://github.com/sadra/EasyMTProto
$ cd EasyMTProto
$ npm install

Modify the config.json parameters to what ever thing you want:

{
  "port": 5665,
  "secret":"b0cbcef5a486d9636472ac27f8e11a9d",
  "server": "10.10.10.10",
  "indexPort": 8080
}
Params Propose
port The port of MT Protocol
secret Secret code for MT Protocol. It must be 32 characters and contains numbers & just a,b,c,d,e,f for symbols)
server Your server IP
indexPort Port for index page of app
channel Your sponsored channel ID (for public channels

Run

With nodemon

First of all install nodemon on you global path: nodemo and then run it with nodmeon

$ nodemon emtproto.js

With pm2

First of all install pm2 tool: pm2 and then run it with nodmeon

$ pm2 start emtproto.js -i max
$ pm2 list

Use

Before start anything the client mus be updated: telegram download

You can share the proxy within a link.

structure:

https://t.me/proxy?server=SERVER_ADDRESS&port=PORT&secret=SECRET_KEY&@YOUR_CHANNEL_ADDRESS`

example:

https://t.me/proxy?server=10.10.10.10&port=5665&secret=b0cbcef5a486d9636472ac27f8e11a9d&@EasyMTProxy

You can get the link from index of your app on your server:

SERVER_ADDRESS:INDEX_PORT
//example
http://10.10.10.10:8080

License

The project is released under the Apache License 2.0

About

🚀 Telegram MTProto API Client Library for NodeJs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published