mirror of
https://github.com/GLEGram/GLEGram-iOS.git
synced 2026-04-23 03:16:21 +02:00
Remove TorEmbedded stub module
This commit is contained in:
@@ -209,6 +209,5 @@ GLEGram/
|
||||
├── SGFakeLocation/ (location spoofing)
|
||||
├── SGLocalPremium/ (premium emulation)
|
||||
├── SGSupporters/ (badges, subscriptions)
|
||||
├── TorEmbedded/ (Tor stub)
|
||||
└── VoiceMorpher/ (voice effects)
|
||||
```
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"],
|
||||
)
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
// MARK: Swiftgram — Built-in Tor runner (SOCKS 9050, control 9051). Only browser traffic uses Tor; Telegram API is unchanged.
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
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
|
||||
@@ -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
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user