Experimental Telegram Server
Find a file
2025-12-21 19:14:38 +03:00
.github/workflows Update dotnet.yml 2022-05-24 13:26:33 +03:00
.vscode initial commit 2022-02-27 16:40:34 +03:00
Ferrite fix: protocol 2025-12-21 15:28:21 +03:00
Ferrite.Core fix: protocol 2025-12-21 19:14:38 +03:00
Ferrite.Crypto do not invoke unauthorized methods 2022-12-27 22:49:56 +03:00
Ferrite.Data cleanup 2023-06-17 22:53:47 +03:00
Ferrite.Services fix: stacktrace 2025-12-21 16:55:02 +03:00
Ferrite.Tests fix the test using ManualResetEventSlim so that the test is conclusive every time 2023-06-26 15:54:14 +03:00
Ferrite.TL fix: protocol 2025-12-21 16:52:45 +03:00
Ferrite.TL.Compiler fix: stacktrace 2025-12-21 17:11:50 +03:00
Ferrite.TL.slim rename layer150 to baseLayer 2023-05-20 12:41:14 +03:00
Ferrite.TLParser fix: protocol 2025-12-21 17:46:53 +03:00
Ferrite.Transport Fixed Websocket Bug: #456 2022-11-19 20:34:43 +03:30
Ferrite.Utils fix: protocol 2025-12-21 16:52:45 +03:00
WTelegramClient@09902937de do not invoke unauthorized methods 2022-12-27 22:49:56 +03:00
.dockerignore fix: fix dockerignore 2025-12-21 14:23:46 +03:00
.editorconfig add websocket support 2022-03-19 19:46:53 +03:00
.gitignore chore: update gitignore 2025-12-21 17:08:54 +03:00
.gitmodules update schema to layer 150 2022-12-17 15:16:41 +03:00
COPYING.txt fix the location for COPYING file 2022-03-11 23:33:21 +03:00
docker-compose.yml feat: create docker container 2025-12-21 14:18:58 +03:00
Dockerfile chore: fixing tests 2025-12-21 18:11:55 +03:00
Ferrite.sln update schema to layer 150 2022-12-17 15:16:41 +03:00
global.json make the necessary changes for the new preview sdk 2022-07-23 01:13:43 +03:00
LICENSE update LICENSE 2022-05-15 10:48:51 +03:00
logo.jpeg add the logo 2022-04-24 16:39:24 +03:00
README.md Update README.md 2022-11-27 17:15:48 +03:00

Project Ferrite (Telegram Server)

Project Ferrite is an implementation of the Telegram Server API in C# and this repo records it's work-in-progress. Development is focused on implementing must have features before the first release.

What works?

The following are the features that are implemented and working so far:

  • All MTProto transports are implemented
  • Websockets and Obfuscation
  • Creation of an Auth Key
  • MTProto Encryption/Decryption (AES-IGE, AES-CTR, RSA with custom padding etc.)
  • TL Serialization/Deserialization
  • auth, account, users, contacts, photos, upload, help, langpack namespaces have been implemented to some extend
  • Saved Messages and Sending messages works with text messages and photos.

Debugging the server

Debugging previously required an infrastructure comprised of Redis, Cassandra, MinIO and ElasticSearch. Currently however Ferrite has a pluggable storage system and local data stores based on RocksDB, FASTER and Lucene are implemented as well as an in-memory cache so we won't need that infrastructure for debugging.

  • Clone the repository.
git clone https://github.com/aykutalparslan/Ferrite
  • Install .NET 7
  • Make sure default-private.key and default-public-key are copied to the output directory as those are the keys embedded into the modified client.
  • Make sure Ferrite.Data/LangData is also copied to the output directory.
  • Debug the Ferrite Console Application with your favourite IDE or
dotnet run
  • Telegram protocol requires clients to have the server's public key.
  • Use the modified Android client to test with.

Roadmap

A planned refactor is currently in progress(There's a release with the latest commits before this). After the refactor, more unit and integration tests will be added before continuing development. Future development will focus on getting the Android application to run in a stable state and the planned order of steps to achieve that are:

  • All settings screens should work on the Android application
  • Contacts related features should work as expected
  • Phone calls.
  • Basic messaging
  • Groups and channels

After the Android application is working as expected the development will focus on the iOS application and then the Desktop and Web applications. Basic features are planned to be implemented in the beginning. After all this the next planned steps are:

  • There will be a refactor to support memory efficient serialization
  • Support for so called API layers will be added
  • Optimizations and benchmarks
  • Implementation of the missing features

Contributions

The project is not open to contributions at this point unless they are very trivial bug fixes with only a couple of lines. It is planned to open the project to contributions after the first stable release.

License

Project Ferrite is licensed under GNU AGPL-3.0

Special Thanks