Telegram-FOSS
Unofficial, FOSS-friendly fork of the original Telegram client for Android
Top Related Projects
Telegram for Android source
Telegram-iOS
Telegram Desktop messaging app
Cross-platform library for building Telegram clients
signal-cli provides an unofficial commandline, JSON-RPC and dbus interface for the Signal messenger.
Quick Overview
Telegram-FOSS is an unofficial, FOSS-friendly fork of the official Telegram for Android app. It aims to provide a more privacy-focused and open-source version of the popular messaging application, removing proprietary dependencies and adding additional security features.
Pros
- Fully open-source, allowing for community audits and contributions
- Removes proprietary dependencies, enhancing privacy and security
- Regular updates to keep pace with the official Telegram app
- Includes additional privacy-focused features not found in the official app
Cons
- May lack some features present in the official Telegram app
- Smaller user base compared to the official app, potentially leading to slower bug detection and fixes
- Not available on official app stores, requiring manual installation and updates
- May experience compatibility issues with certain Telegram features or services
Getting Started
To get started with Telegram-FOSS:
- Visit the Telegram-FOSS GitHub repository
- Download the latest APK release from the Releases page
- Enable "Install from unknown sources" in your Android device settings
- Install the downloaded APK on your Android device
- Open the app and follow the on-screen instructions to set up your account
Note: Always download the app from trusted sources and verify the APK signature to ensure authenticity and security.
Competitor Comparisons
Telegram for Android source
Pros of Telegram
- Official repository maintained by the Telegram team
- More frequent updates and new feature implementations
- Potentially better integration with Telegram's servers and services
Cons of Telegram
- Includes proprietary components and closed-source elements
- May contain tracking or analytics code not present in FOSS version
- Less transparent development process
Code Comparison
Telegram:
public class TelegramApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
NativeLoader.initNativeLibs(ApplicationLoader.applicationContext);
ConnectionsManager.native_setJava(false);
}
}
Telegram-FOSS:
public class TelegramApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
NativeLoader.initNativeLibs(ApplicationLoader.applicationContext);
ConnectionsManager.native_setJava(true);
}
}
The main difference in this code snippet is the ConnectionsManager.native_setJava()
call, where Telegram-FOSS sets it to true
, potentially indicating a preference for Java implementations over native code for certain functionalities.
Telegram-FOSS focuses on providing a fully open-source version of the Telegram client, removing proprietary components and potential tracking code. While it may lag behind the official repository in terms of features and updates, it offers greater transparency and control over the application's behavior.
Telegram-iOS
Pros of Telegram-iOS
- Official iOS client, ensuring full compatibility with Telegram's features
- Regular updates and support from the Telegram team
- Optimized performance for iOS devices
Cons of Telegram-iOS
- Closed-source, limiting transparency and community contributions
- May include proprietary components or tracking mechanisms
- Less customizable compared to FOSS alternatives
Code Comparison
Telegram-iOS (Swift):
override func viewDidLoad() {
super.viewDidLoad()
self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: "Back", style: .plain, target: self, action: #selector(backButtonPressed))
}
Telegram-FOSS (Java):
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
The code snippets show differences in language and platform-specific implementations. Telegram-iOS uses Swift and UIKit, while Telegram-FOSS uses Java and Android's SDK. Both examples demonstrate setting up navigation elements, but with different approaches tailored to their respective platforms.
Telegram Desktop messaging app
Pros of tdesktop
- Official desktop client developed by Telegram, ensuring faster updates and better integration with the Telegram ecosystem
- Supports a wider range of platforms, including Windows, macOS, and Linux
- More feature-rich, with advanced customization options and better performance
Cons of tdesktop
- Not fully open-source, as it includes some proprietary components
- Less focus on privacy and security compared to Telegram-FOSS
- Larger file size and potentially higher resource usage
Code Comparison
Telegram-FOSS (Android):
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// FOSS-specific initialization
}
tdesktop (Desktop):
void MainWindow::initWindow() {
setWindowTitle(qsl("Telegram"));
initSystemTray();
updateGlobalMenu();
// tdesktop-specific initialization
}
The code snippets show different initialization approaches for the main window or activity in each project, reflecting their respective platforms and architectures.
Cross-platform library for building Telegram clients
Pros of td
- Cross-platform C++ library for building Telegram clients
- Provides low-level API access for custom Telegram client development
- Supports multiple programming languages through bindings
Cons of td
- Requires more development effort to create a full-featured client
- Steeper learning curve for developers new to Telegram API
- May need additional components for a complete messaging application
Code Comparison
td:
auto client = td::Client::create();
client->send({1, td_api::make_object<td_api::getChats>()});
Telegram-FOSS:
TLRPC.TL_messages_getDialogs req = new TLRPC.TL_messages_getDialogs();
ConnectionsManager.getInstance().sendRequest(req, (response, error) -> {
// Handle response
});
Summary
td is a powerful library for building custom Telegram clients with low-level API access, while Telegram-FOSS is a full-featured, open-source Telegram client. td offers more flexibility and cross-platform support but requires more development effort. Telegram-FOSS provides a ready-to-use application but may have limitations in customization. The choice between the two depends on the specific needs of the project and the developer's expertise in working with Telegram's API.
signal-cli provides an unofficial commandline, JSON-RPC and dbus interface for the Signal messenger.
Pros of signal-cli
- Command-line interface allows for easy scripting and automation
- Supports multiple accounts and devices
- More focused on privacy and security features
Cons of signal-cli
- Limited graphical user interface options
- Requires more technical knowledge to set up and use
- Fewer features compared to full-fledged messaging apps
Code Comparison
signal-cli:
public class Main {
public static void main(String[] args) {
SignalService service = new SignalService();
service.sendMessage("Hello, Signal!");
}
}
Telegram-FOSS:
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TelegramApplication.sendMessage("Hello, Telegram!");
}
}
The code comparison shows that signal-cli is designed for command-line usage, while Telegram-FOSS is built as an Android application. signal-cli's approach allows for more flexibility in integration with other systems, but Telegram-FOSS provides a more user-friendly interface for mobile devices.
Both projects aim to provide secure messaging capabilities, but they target different use cases. signal-cli is better suited for developers and power users who need programmatic access to Signal's features, while Telegram-FOSS offers a more traditional messaging app experience for end-users.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
or 1P8kNcifVAkBWtWmjKY4RvVLy5QwruE2LQ
Telegram-FOSS
Telegram is a messaging app with a focus on speed and security. Itâs superfast, simple and free.
This is an unofficial, FOSS-friendly fork of the original Telegram App for Android.
This version of Telegram is available on FDroid:
Current Maintainers
- thermatk
- you? :)
Contributors
- slp
- Bubu
- Sudokamikaze
- l2dy
- maximgrafin
- vn971
- theel0ja
- AnXh3L0
- noplanman
- vk496
- verdulo
- anupritaisno1
- nekohasekai
- kdrag0n
- terachad
- ppnplus
- luvletter2333
- 23rd
- proletarius101
- CWJamieson
- verdulo
- tehcneko
Discussion
Join the Telegram-FOSS Offtopics group
You can also join #telegram-foss:matrix.org
via matrix or #telegram-foss
on freenode.
Changes:
Replacement of non-FOSS, untrustworthy or suspicious binaries or source code:
- Do location sharing with OpenStreetMap(osmdroid) instead of Google Maps
- Use Noto emoji set instead of Apple's emoji
- Google Play Services GCM replaced with Telegram's push service
- Has to show a notification on Oreo+, ask Google
- SECURITY: BoringSSL prebuilts are replaced with recent upstream source code built at compile time
- SECURITY: FFmpeg prebuilts are replaced with recent upstream source code built at compile time
- SECURITY: libvpx prebuilts are replaced with recent upstream source code built at compile time
- SECURITY: Bundled libWebP is updated
Removal of non-FOSS, untrustworthy or suspicious binaries or source code and their functionality:
- Google Vision face detection and barcode scanning (Passport)
- Google Wallet and Android Pay integration
- Google Voice integration
- HockeyApp crash reporting and self-updates
- Google SMS retrieval
- Google ML Kit
Other:
- Added the ability to parse locations from intents containing a
geo:<lat>,<lon>,<zoom>
string - Force static map previews from Telegram
- No content restrictions
Versioning
This repository contains tags to make tracking versions easier.
Versions are in form "v$UPSTREAM$RELEASE" where:
- $UPSTREAM is the public, visible version of upstream.
- $RELEASE is a letter ([a-z]) indicating minor releases between official versions (sometimes, upstream is updated without relating the changes to an specific version).
API, Protocol documentation
Telegram API manuals: https://core.telegram.org/api
MTproto protocol manuals: https://core.telegram.org/mtproto
Building
NOTE: Building on Windows is, unfortunately, not supported. Consider using a Linux VM or dual booting.
Important:
-
You need the Android NDK, Go(Golang) and Ninja to build the apk.
-
Don't forget to include the submodules when you clone:
git clone --recursive https://github.com/Telegram-FOSS-Team/Telegram-FOSS.git
-
Build native FFmpeg and BoringSSL dependencies:
- Go to the
TMessagesProj/jni
folder and execute the following (define the paths to your NDK and Ninja):
export NDK=[PATH_TO_NDK] export NINJA_PATH=[PATH_TO_NINJA] ./build_libvpx_clang.sh ./build_ffmpeg_clang.sh ./patch_ffmpeg.sh ./patch_boringssl.sh ./build_boringssl.sh
- Go to the
-
If you want to publish a modified version of Telegram:
- You should get your own API key here: https://core.telegram.org/api/obtaining_api_id and create a file called
API_KEYS
in the source root directory. The contents should look like this:APP_ID = 12345 APP_HASH = aaaaaaaabbbbbbccccccfffffff001122
- Do not use the name Telegram and the standard logo (white paper plane in a blue circle) for your app â or make sure your users understand that it is unofficial
- Take good care of your users' data and privacy
- Please remember to publish your code too in order to comply with the licenses
- You should get your own API key here: https://core.telegram.org/api/obtaining_api_id and create a file called
The project can be built with Android Studio or from the command line with gradle:
./gradlew assembleAfatRelease
DIGITAL RESISTANCE
Top Related Projects
Telegram for Android source
Telegram-iOS
Telegram Desktop messaging app
Cross-platform library for building Telegram clients
signal-cli provides an unofficial commandline, JSON-RPC and dbus interface for the Signal messenger.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot