Skip to content

Mercurygram/Mercurygram

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mercurygram logo

Mercurygram

Telegram is a messaging app with a focus on speed and security. It’s superfast, simple and free.

This is an unofficial fork of the FOSS-friendly fork of Telegram App for Android.

Releases Discussions

Features

  • Add ID in Profile Info
  • Add a menu in Notifications and Sounds in order to set the UnifiedPush Distributors. The same menu may be longclicked in order to know if UnifiedPush notifications are working correctly.
  • Add a menu in Notifications and Sounds in order to set UnifiedPush PUT to POST gateway.
  • Add toggle setting in Chat Settings to start video messages with rear-facing camera
  • Add toggle setting in Chat Settings to hide keyboard on chat scroll
  • Add toggle setting in Chat Setting to hide "All Chats" tab (feature from NekoX)
  • Add toggle setting in Debug Menu to enable Message Details menu
  • Add toggle setting in Debug Menu to disable Unified Push support
  • Add toggle setting in Debug Menu to disable Secure Flags. This option must only be used for debugging.
  • Re-add Monet themes (#31).
  • Disabled DOH resolving since this leaks your used proxy to Google and it's not needed since Android DNS over TLS should be used instead.
  • Unlock premium app icons for anybody
  • Add toggle setting in Chat Settings to send large photos (2560px instead of 1280px)
  • Telegram application icons are replaced with hermes wing (Created by Anthony Ledoux from Noun Project)

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 UnifiedPush
  • 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

Notes

In order to have reliable notifications, it may be necessary to set battery optimization to Not optimized for Mercurygram (no, it won't use more battery).

Background Connections setting is not necessary and uses lot of battery, so please disable it when you use UnifiedPush.

If you set Battery optimization to Not optimized, Keep-Alive Service will be not necessary.

See dontkillmyapp for more information.

If you can't/want set Battery optimization to Not optimized and you don't receive notifications after a while (more than 30 minutes) please enable Keep-Alive Service instead.

UnifiedPush PUT to POST gateway

I tested the Telegram web push notifications, but it seems they are not reliable at all and so I came back to use Simple push.

Simple push is quite reliable, but it uses PUT and UnifiedPush only supports POST.

In order to avoid that, it's necessary to use a gateway that converts from PUT to POST.

I wrote 2 different gateway implementations, one in Python and one in Rust.

The Rust implementation is live at https://p2p.belloworld.it/ and it's currently used, by default, by Mercurygram.

My live instance only accepts Telegram servers IP ranges (https://core.telegram.org/resources/cidr.txt) in order to avoid abuses.

Since ntfy supports PUT the gateway is not used if you use it as distributor.

Why the name Mercurygram?

For a couple of reasons:

  • Mercury is the Roman, and I'm Italian, God and the "messenger of the gods"
  • The logo is a stylized 'F' representing his winged shoes, but it also resembles an 'F' in honor of Freddy Mercury.

Current Maintainers

Contributors

Current Telegram-FOSS Maintainers

Telegram-FOSS Contributors

Versioning

This repository contains tags to make tracking versions easier.

Versions are in form "$UPSTREAM.$RELEASE" where:

  • $UPSTREAM is the tag of Telegram-FOSS upstream.
  • $RELEASE is a number ([0-9]*), indicating minor releases between official Telegram-FOSS versions.

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. WindowsSupport

Important:

  1. You need the Android NDK, Go(Golang) and Ninja to build the apk.

  2. Don't forget to include the submodules when you clone:

    • git clone --recursive https://github.com/drizzt/Mercurygram.git
  3. 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
    
  4. 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

The project can be built with Android Studio or from the command line with gradle:

./gradlew assembleAfatRelease

DIGITAL RESISTANCE

DIGITALRESISTANCE

About

Unofficial, FOSS-friendly fork of the original Telegram client for Android

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 51.2%
  • C++ 30.4%
  • C 16.4%
  • Assembly 1.5%
  • PHP 0.2%
  • CMake 0.1%
  • Other 0.2%