Closed arashammm closed 1 year ago
It is not that simple. The server's API must be fully compatible with the latest Telegram API, which is very unlikely.
you're probably right but since I'm sure that the protocol is mtproto, changing the server address and protocol is the first step which I need guidance on where I can find these settings in the code
It would be no different from sending requests to telegram.org insted of github.com. Both use HTTPS protocol, but changing the address makes no sense. You definitely can change the IP address and some other required data, but it would be just a waste of time.
can you guide me which part of the code I can replace thes erver ip or server address?
First you must replace the certificate at https://github.com/tdlib/td/blob/e8ee1c51498c060c6f9b8511bf25a6c025e72adf/td/telegram/net/PublicRsaKeyShared.cpp#L20. Then you may change datacenter configuration at https://github.com/tdlib/td/blob/e8ee1c51498c060c6f9b8511bf25a6c025e72adf/td/telegram/net/ConnectionCreator.cpp#L1176.
hello to all I have a hard time finding where I can change the server address inside the code to which the packets are sending. I intend to use this library to connect to a different server which is using Mtproto and I need to use this library as client. Can anyone guide me where can I alter server destiantion and ports to connect to the server?