WTS_Testing

WTelegramServer

WTelegramServer is a Telegram Server written in C#

You can now participate in testing the sample WTelegramServer instance
→ Start with downloading archive WTS_Testing.zip
Three methods are available:

  1. The fast way (Windows):
    • Extract Telegram_WTS.exe from the archive into a new empty folder (This is the official Telegram Desktop 6.3.1 for Windows, already patched using the methods below)
    • Run Telegram_WTS.exe to start connecting to the WTelegramServer instance
    • Click “Start Messaging”, then click SETTINGS in the upper-right corner
    • Disable checkboxes “Show tray icon” and “Update automatically” to prevent annoying behaviors
    • Close the Settings and click on “log in using your phone number”
    • Enter a random phone number (doesn’t need to be real but at least 5 digits)
    • Enter 4 random digits code (if the phone number is not already taken), and voila!
  2. Using the Patcher (Windows):
    • Extract the archive (except Telegram_WTS.exe) into an empty directory. It contains a patcher project, binary and C# source, so you can check what it does
    • Place a copy of your Telegram Desktop Telegram.exe in the directory, and run the Patcher
    • When prompted for the IP address of the server instance, type: 34.73.170.46
    • The Patcher should now create a Telegram_WTS.exe, copy of your Telegram.exe patched with the public key and IP address of the server instance, and disable auto-updates
    • Follow method 1 recommendations for running the program

    Note: The patcher might work with other Telegram clients but was only tested with Telegram Desktop versions around 6.3.1.
    WTelegramServer is only compatible with Telegram API layer 218, so it might not be compatible with other versions of Telegram Desktop

  3. Patching a client manually (sources or binary)
    • Identify where the official public encryption key of Telegram is located:
      MIIBCgKCAQEA6LszBcC1LGzyr992NzE0ieY+BSaOW622Aa9Bd4ZHLl+TuFQ4lo4g
      5nKaMBwK/BIb9xUfg0Q29/2mgIR6Zr9krM7HjuIcCzFvDtr+L0GQjae9H0pRB2OO
      62cECs5HKhT5DZ98K33vmWiLowc621dQuwKWSQKjWf50XYFw42h21P2KXUGyp2y/
      +aEyZ+uVgLLQbRA1dEjSDZ2iGRy12Mk5gpYc397aYp438fsJoHIgJ2lgMv5h7WY9
      t6N/byY9Nw9p21Og3AoXSL2q/2IJ1WRUhebgAdGVMlV1fkuOQoEzR7EdpqtQD9Cs
      5+bfo3Nhmcyvk5ftB0WkJ9z6bNZ7yxrP8wIDAQAB
      
    • Patch/Replace it with the public key for the sample WTelegramServer instance:
      MIIBCgKCAQEAmu0N3BJAPxhRclG3NFkuC4qBkZiUVJF3bF2NPYegO7BKNGxGjvsM
      UJYofrhSLwsK+2fbyKpHaZg9Dc7IolmOdNhXDje+u8axlkv/onxj6hnMiBQTgkM7
      xB7Pkk5n/d7/3umFbepHSCGRUbxbg5m72OpWNdS6Lid+Om3XoMIsyWL7fzBXzann
      JdfA01SHqewHOT5q8LKgvhDapmv4YE/H3zZpSwdJrBAlT0oiDpLWPIk3Oig+bktb
      pkTJER6gy4/yVs/Ko1zPS8xqs0bBrIxXTP0xwSfGr2g9jmKxR9uZ4aXBVRktOc3+
      kxxAWMjold3FNny4ZyDQtiES/fAQnhO+xwIDAQAB
      
    • Identify where the public IP addresses of official Telegram servers are located:
       "149.154.175.50", "149.154.167.51", "95.161.76.100", "149.154.175.100", "149.154.167.91",
       "149.154.171.5", "149.154.175.10", "149.154.167.40", "149.154.175.117"
      
    • Patch/Replace each of them with the same IP address for the sample WTelegramServer instance:
      34.73.170.46 (you might need to add an extra \0 byte if you’re patching binary)
    • Follow method 1 recommendations for running the program

What is supported?

Developing a server with all above features was achieved in just one month!!
(from scratch, except stuff reused from my open-source WTelegramClient library)

What is not (yet) supported?

For the tech-savvy

Implemented:

Not yet implemented:

RAM=not stored in DB