zerobias / telegram-mtproto

Telegram client api (MTProto) library
MIT License
620 stars 136 forks source link

how could I change mtproto servers? #173

Closed nagashik closed 6 years ago

nagashik commented 6 years ago

I would like to use mtproto proxy servers (mtproxyd) to connect to telegram network. how could I change default mtproto servers?

royalrover commented 6 years ago

I resolve it by modify the source code, first get the nearest dc, and connect this one.

KylinWu commented 6 years ago

@royalrover Which telegram-mtproto library version do you use?

royalrover commented 6 years ago

3.1.3

nagashik commented 6 years ago

@royalrover what file should I change in source code?

royalrover commented 6 years ago

/lib/service/api-manager/index.js invokeNetRequest method

networker = yield _this5.mtpGetNetworker(x);

x is the nearest dc, and make sure the file lib/config-check/dc.js , the number of the nearest dc is"x"