I use this library to connect to the telegram API, but when a request is made to the server, I get an error saying that it is impossible to execute the request, etc. because of the RCOM ... So, does anyone know how to get around this block using a proxy and a library (telegram-mtproto)?
Code:
const {MTProto} = require('telegram-mtproto') const phone = { num : '+90555555555', code: '22222' } const api = { layer : 57, initConnection : 0x69796de9, api_id : 111111 } const server = { dev: true, } const client = MTProto(server, api) async function connect(){ const { phone_code_hash } = await client('auth.sendCode', { phone_number : phone.num, sms_type: 5, api_id : 111111, api_hash : 'fb050b8fjernf323FDFWS2332' }) console.log(phone_code_hash) // const { user } = await client('auth.signIn', { // phone_number : phone.num, // phone_code_hash: phone_code_hash, // phone_code : phone.code // }) // console.log('signed as ', user); } connect(); Mistake:
23.061] req_pq error connect ETIMEDOUT 149.154.167.51:80 Get networker error { Error: connect ETIMEDOUT 149.154.167.51:80 at Object._errnoException (util.js:1003:13) at _exceptionWithHostPort (util.js:1024:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1194:14) ...