From d9856616f2b30c5b4c6865bcce0ee3d27df1d83e Mon Sep 17 00:00:00 2001 From: Leeksov <78694696+Leeksov@users.noreply.github.com> Date: Mon, 6 Apr 2026 10:43:19 +0300 Subject: [PATCH] Remove TorEmbedded stub module --- CHANGELOG_12.5.md | 1 - CLAUDE.md | 1 - GLEGram/TorEmbedded/BUILD | 20 ------------ GLEGram/TorEmbedded/Sources/TorEmbedded.swift | 32 ------------------- .../TorEmbedded/Sources/TorEmbeddedRunner.h | 22 ------------- .../TorEmbedded/Sources/TorEmbeddedRunner.m | 21 ------------ README.md | 1 - 7 files changed, 98 deletions(-) delete mode 100755 GLEGram/TorEmbedded/BUILD delete mode 100755 GLEGram/TorEmbedded/Sources/TorEmbedded.swift delete mode 100755 GLEGram/TorEmbedded/Sources/TorEmbeddedRunner.h delete mode 100755 GLEGram/TorEmbedded/Sources/TorEmbeddedRunner.m diff --git a/CHANGELOG_12.5.md b/CHANGELOG_12.5.md index 275b4c9a..ecd6c67c 100644 --- a/CHANGELOG_12.5.md +++ b/CHANGELOG_12.5.md @@ -209,6 +209,5 @@ GLEGram/ ├── SGFakeLocation/ (location spoofing) ├── SGLocalPremium/ (premium emulation) ├── SGSupporters/ (badges, subscriptions) -├── TorEmbedded/ (Tor stub) └── VoiceMorpher/ (voice effects) ``` diff --git a/CLAUDE.md b/CLAUDE.md index e68f90ba..e0ffcc4a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -46,7 +46,6 @@ GLEGram — a fork of Swiftgram (which is a fork of Telegram iOS). Base version: - `ChatPassword` — Per-chat password protection - `VoiceMorpher` — Voice preset engine - `GLESettingsUI` — 18 controllers (paywall, plugins, fonts, fake profile, etc.) - - `TorEmbedded` — Tor stub ### Key modified Telegram files diff --git a/GLEGram/TorEmbedded/BUILD b/GLEGram/TorEmbedded/BUILD deleted file mode 100755 index 08b57147..00000000 --- a/GLEGram/TorEmbedded/BUILD +++ /dev/null @@ -1,20 +0,0 @@ -# Tor removed to reduce IPA size (~70 MB). Stub only; no Tor.framework. -load("@rules_cc//cc:defs.bzl", "objc_library") -load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library") - -objc_library( - name = "TorEmbeddedRunner", - module_name = "TorEmbeddedRunner", - srcs = ["Sources/TorEmbeddedRunner.m"], - hdrs = ["Sources/TorEmbeddedRunner.h"], - copts = ["-fobjc-arc"], - visibility = ["//visibility:public"], -) - -swift_library( - name = "TorEmbedded", - module_name = "TorEmbedded", - srcs = ["Sources/TorEmbedded.swift"], - deps = [":TorEmbeddedRunner"], - visibility = ["//visibility:public"], -) diff --git a/GLEGram/TorEmbedded/Sources/TorEmbedded.swift b/GLEGram/TorEmbedded/Sources/TorEmbedded.swift deleted file mode 100755 index 265fe69c..00000000 --- a/GLEGram/TorEmbedded/Sources/TorEmbedded.swift +++ /dev/null @@ -1,32 +0,0 @@ -// MARK: Swiftgram — Tor removed to reduce IPA size. Stub only. -import Foundation -import TorEmbeddedRunner - -public enum TorEmbedded { - /// Log lines from last Tor startup (when "Show Tor startup logs" is on). Updated on main queue. - private static let _logLinesLock = NSLock() - private static var _logLines: [String] = [] - public static var logLines: [String] { - _logLinesLock.lock() - defer { _logLinesLock.unlock() } - return _logLines - } - - /// Posted when a new log line is appended (object = line String). Subscribe to refresh Tor logs UI. - public static let didAppendLogNotification = Notification.Name("TorEmbedded.didAppendLog") - - /// Tor removed to reduce IPA size. No-op. - public static func startIfNeeded() { - return - } - - /// Stop Tor (e.g. when user disables "Use Tor in browser"). - public static func stop() { - TorEmbeddedRunner.stop() - } - - /// Whether Tor is running and circuit is established (browser can use SOCKS 9050). - public static var isReady: Bool { - TorEmbeddedRunner.isReady() - } -} diff --git a/GLEGram/TorEmbedded/Sources/TorEmbeddedRunner.h b/GLEGram/TorEmbedded/Sources/TorEmbeddedRunner.h deleted file mode 100755 index 317294cd..00000000 --- a/GLEGram/TorEmbedded/Sources/TorEmbeddedRunner.h +++ /dev/null @@ -1,22 +0,0 @@ -// MARK: Swiftgram — Built-in Tor runner (SOCKS 9050, control 9051). Only browser traffic uses Tor; Telegram API is unchanged. -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface TorEmbeddedRunner : NSObject - -/// Start Tor in-process. Bridges string: one bridge per line (e.g. "obfs4 1.2.3.4:443 fingerprint" or meek URL). Pass nil or empty for no bridges. -+ (void)startWithBridges:(nullable NSString *)bridges; - -/// Stop Tor. -+ (void)stop; - -/// Whether Tor is running and circuit is established (SOCKS on 9050, control on 9051). -+ (BOOL)isReady; - -/// Optional. When set, startup log messages are reported (e.g. "Starting Tor...", "Circuit established."). Call from main or background; handler may be invoked on any queue. -+ (void)setLogCallback:(void (^ _Nullable)(NSString * _Nonnull message))callback; - -@end - -NS_ASSUME_NONNULL_END diff --git a/GLEGram/TorEmbedded/Sources/TorEmbeddedRunner.m b/GLEGram/TorEmbedded/Sources/TorEmbeddedRunner.m deleted file mode 100755 index e1653510..00000000 --- a/GLEGram/TorEmbedded/Sources/TorEmbeddedRunner.m +++ /dev/null @@ -1,21 +0,0 @@ -// Tor removed to reduce IPA size. No-op stub; no Tor.framework linked. -#import "TorEmbeddedRunner.h" - -@implementation TorEmbeddedRunner - -+ (void)setLogCallback:(void (^)(NSString * _Nonnull))callback { - (void)callback; -} - -+ (void)startWithBridges:(NSString *)bridges { - (void)bridges; -} - -+ (void)stop { -} - -+ (BOOL)isReady { - return NO; -} - -@end diff --git a/README.md b/README.md index 370ce13d..e282f288 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,6 @@ GLEGram/ — GLEGram-exclusive modules ├── ChatPassword/ Per-chat password ├── VoiceMorpher/ Voice effects ├── GLESettingsUI/ Settings controllers -└── TorEmbedded/ Tor stub Swiftgram/ — Shared Swiftgram modules (50+) submodules/ — Telegram iOS base (patched with // MARK: - GLEGram)