The Telegram server code is not open source. It's been in the "we will open source everything at some point in time" limbo for years.
Durov has said server code will not be open sourced since it would help countries block them more easily. They use many methods to avoid being blocked by government.