GLEGram 12.5 — Initial public release

Based on Swiftgram 12.5 (Telegram iOS 12.5).
All GLEGram features ported and organized in GLEGram/ folder.

Features: Ghost Mode, Saved Deleted Messages, Content Protection Bypass,
Font Replacement, Fake Profile, Chat Export, Plugin System, and more.

See CHANGELOG_12.5.md for full details.
This commit is contained in:
Leeksov
2026-04-06 09:48:12 +03:00
commit 4647310322
39685 changed files with 11052678 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
swift_library(
name = "AppLockState",
module_name = "AppLockState",
srcs = glob([
"Sources/**/*.swift",
]),
deps = [
"//submodules/MonotonicTime:MonotonicTime",
],
visibility = [
"//visibility:public",
],
)
@@ -0,0 +1,62 @@
import Foundation
import MonotonicTime
public struct MonotonicTimestamp: Codable, Equatable {
public var bootTimestamp: Int32
public var uptime: Int32
public init(bootTimestamp: Int32, uptime: Int32) {
self.bootTimestamp = bootTimestamp
self.uptime = uptime
}
}
public struct UnlockAttempts: Codable, Equatable {
public var count: Int32
public var timestamp: MonotonicTimestamp
public init(count: Int32, timestamp: MonotonicTimestamp) {
self.count = count
self.timestamp = timestamp
}
}
public struct LockState: Codable, Equatable {
public var isManuallyLocked: Bool
public var autolockTimeout: Int32?
public var unlockAttempts: UnlockAttempts?
public var applicationActivityTimestamp: MonotonicTimestamp?
public init(isManuallyLocked: Bool = false, autolockTimeout: Int32? = nil, unlockAttemts: UnlockAttempts? = nil, applicationActivityTimestamp: MonotonicTimestamp? = nil) {
self.isManuallyLocked = isManuallyLocked
self.autolockTimeout = autolockTimeout
self.unlockAttempts = unlockAttemts
self.applicationActivityTimestamp = applicationActivityTimestamp
}
}
public func appLockStatePath(rootPath: String) -> String {
return rootPath + "/lockState.json"
}
public func isAppLocked(state: LockState) -> Bool {
if state.isManuallyLocked {
return true
} else if let autolockTimeout = state.autolockTimeout {
var bootTimestamp: Int32 = 0
let uptime = getDeviceUptimeSeconds(&bootTimestamp)
let timestamp = MonotonicTimestamp(bootTimestamp: bootTimestamp, uptime: uptime)
if let applicationActivityTimestamp = state.applicationActivityTimestamp {
if timestamp.bootTimestamp != applicationActivityTimestamp.bootTimestamp {
return true
}
if timestamp.uptime >= applicationActivityTimestamp.uptime + autolockTimeout {
return true
}
} else {
return true
}
}
return false
}