diff --git a/Podfile b/Podfile index e9d6266656..3b0827a52f 100644 --- a/Podfile +++ b/Podfile @@ -11,8 +11,8 @@ source 'https://cdn.cocoapods.org/' pod 'blurhash', podspec: './ThirdParty/blurhash.podspec' pod 'SwiftProtobuf', "1.36.1" -ENV['LIBSIGNAL_FFI_PREBUILD_CHECKSUM'] = 'e3b89de2afc950c9e317f2fff426ae8edc77a397520d2e0afbb717d738213fd5' -pod 'LibSignalClient', git: 'https://github.com/signalapp/libsignal.git', tag: 'v0.94.1', testspecs: ["Tests"] +ENV['LIBSIGNAL_FFI_PREBUILD_CHECKSUM'] = '2a98cb34023fa47bc70d052612fbe60f75c3379a5cf7f6fd718d393ee93744ac' +pod 'LibSignalClient', git: 'https://github.com/signalapp/libsignal.git', tag: 'v0.94.2', testspecs: ["Tests"] # pod 'LibSignalClient', path: '../libsignal', testspecs: ["Tests"] ENV['RINGRTC_PREBUILD_CHECKSUM'] = 'c19c813ab5255aa3cd7c2af36374100f7cc69c2fd794cae23baebd6ec9dae90c' diff --git a/Podfile.lock b/Podfile.lock index 20637b98b9..30409124b6 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -9,8 +9,8 @@ PODS: - LibMobileCoin/CoreHTTP (6.0.2): - SwiftProtobuf (~> 1.5) - libPhoneNumber-iOS (1.2.0) - - LibSignalClient (0.94.1) - - LibSignalClient/Tests (0.94.1) + - LibSignalClient (0.94.2) + - LibSignalClient/Tests (0.94.2) - libwebp (1.5.0): - libwebp/demux (= 1.5.0) - libwebp/mux (= 1.5.0) @@ -52,8 +52,8 @@ DEPENDENCIES: - GRDB.swift/SQLCipher - LibMobileCoin/CoreHTTP (from `https://github.com/signalapp/libmobilecoin-ios-artifacts`, tag `signal/6.0.2`) - libPhoneNumber-iOS (from `https://github.com/signalapp/libPhoneNumber-iOS`, branch `signal-master`) - - LibSignalClient (from `https://github.com/signalapp/libsignal.git`, tag `v0.94.1`) - - LibSignalClient/Tests (from `https://github.com/signalapp/libsignal.git`, tag `v0.94.1`) + - LibSignalClient (from `https://github.com/signalapp/libsignal.git`, tag `v0.94.2`) + - LibSignalClient/Tests (from `https://github.com/signalapp/libsignal.git`, tag `v0.94.2`) - libwebp - lottie-ios - MobileCoin/CoreHTTP (from `https://github.com/mobilecoinofficial/MobileCoin-Swift`, tag `v6.0.3`) @@ -89,7 +89,7 @@ EXTERNAL SOURCES: :git: https://github.com/signalapp/libPhoneNumber-iOS LibSignalClient: :git: https://github.com/signalapp/libsignal.git - :tag: v0.94.1 + :tag: v0.94.2 MobileCoin: :git: https://github.com/mobilecoinofficial/MobileCoin-Swift :tag: v6.0.3 @@ -113,7 +113,7 @@ CHECKOUT OPTIONS: :git: https://github.com/signalapp/libPhoneNumber-iOS LibSignalClient: :git: https://github.com/signalapp/libsignal.git - :tag: v0.94.1 + :tag: v0.94.2 MobileCoin: :git: https://github.com/mobilecoinofficial/MobileCoin-Swift :tag: v6.0.3 @@ -131,7 +131,7 @@ SPEC CHECKSUMS: GRDB.swift: 1395cb3556df6b16ed69dfc74c3886abc75d2825 LibMobileCoin: 8503f567fa32184a5be7bc038fbd727747dd9991 libPhoneNumber-iOS: 1a34106b49dc6e12a7f37eb9aee7c64011509547 - LibSignalClient: cf53cea3c6cd2cac3e87d0f5f34c3a1c59fe1b8f + LibSignalClient: 1a4cda7ed480d2358e423791bdcb48338be2168b libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8 Logging: beeb016c9c80cf77042d62e83495816847ef108b lottie-ios: fcb5e73e17ba4c983140b7d21095c834b3087418 @@ -143,6 +143,6 @@ SPEC CHECKSUMS: SQLCipher: ff2f045b20d675a73a70f7329395ddd4a2580063 SwiftProtobuf: 9e106a71456f4d3f6a3b0c8fd87ef0be085efc38 -PODFILE CHECKSUM: cf592eb2b2ccbf3e467f82142ef4d4096e132343 +PODFILE CHECKSUM: 58e46c9db135d243c9938376063757f7c0ce6c78 COCOAPODS: 1.15.2 diff --git a/Pods b/Pods index 2f7bce71b0..d39e7d86c8 160000 --- a/Pods +++ b/Pods @@ -1 +1 @@ -Subproject commit 2f7bce71b0b302c4961c940606b79b6f32bfb8d0 +Subproject commit d39e7d86c87791d1bbef9acf832ea1c8eac8438d diff --git a/SignalServiceKit/Environment/BuildFlags.swift b/SignalServiceKit/Environment/BuildFlags.swift index d442ce5aee..d7c9a07077 100644 --- a/SignalServiceKit/Environment/BuildFlags.swift +++ b/SignalServiceKit/Environment/BuildFlags.swift @@ -77,6 +77,8 @@ public enum BuildFlags { public static let collapsingChatEvents = build <= .beta + public static let reflectorProxyTest = build <= .internal + public enum ReleaseNotesChannel { public static let announcementFetch = build <= .dev } diff --git a/SignalServiceKit/Environment/RemoteConfigManager.swift b/SignalServiceKit/Environment/RemoteConfigManager.swift index 1741c8cbb3..1ec523f19f 100644 --- a/SignalServiceKit/Environment/RemoteConfigManager.swift +++ b/SignalServiceKit/Environment/RemoteConfigManager.swift @@ -316,6 +316,13 @@ public class RemoteConfig { return !isEnabled(.serviceExtensionFailureKillSwitch) } + public var enableReflectorsTest: Bool { + guard BuildFlags.reflectorProxyTest else { + return false + } + return isEnabled(.enableReflectorsTest) + } + public var groupTerminateReceiveEnabled: Bool { guard BuildFlags.GroupTerminate.receive else { return false @@ -650,6 +657,7 @@ private enum IsEnabledFlag: String, FlagType { case dynamicSendMessageTimeoutKillSwitch = "ios.dynamicSendMessageTimeoutKillSwitch" case enableAutoAPNSRotation = "ios.enableAutoAPNSRotation" case enableGifSearch = "global.gifSearch" + case enableReflectorsTest = "ios.enableReflectorsTest" case groupTerminateReceiveKillSwitch = "ios.groupTerminateReceiveKillSwitch" case messageResendKillSwitch = "ios.messageResendKillSwitch" case optimizeStorageEnabled = "ios.optimizeStorageEnabled" @@ -680,6 +688,7 @@ private enum IsEnabledFlag: String, FlagType { case .dynamicSendMessageTimeoutKillSwitch: true case .enableAutoAPNSRotation: false case .enableGifSearch: false + case .enableReflectorsTest: true case .groupTerminateReceiveKillSwitch: true case .messageResendKillSwitch: false case .optimizeStorageEnabled: true diff --git a/SignalServiceKit/Network/API/NetworkManager.swift b/SignalServiceKit/Network/API/NetworkManager.swift index 2125d544d7..d5700391f0 100644 --- a/SignalServiceKit/Network/API/NetworkManager.swift +++ b/SignalServiceKit/Network/API/NetworkManager.swift @@ -96,10 +96,23 @@ public class NetworkManager: NetworkManagerProtocol { } } + if shouldEnableReflectorProxy(appReadiness: appReadiness) { + Logger.info("Applying reflector proxy settings to libsignal Net.") + libsignalNet.INTERNAL_TESTING_setReflectorProxy(true) + return + } + // This may be clearing a system proxy, or a previously set in-app proxy that is no longer in use. libsignalNet.clearProxy() } + private static func shouldEnableReflectorProxy(appReadiness: AppReadiness) -> Bool { + guard appReadiness.isAppReady else { + return false + } + return RemoteConfig.current.enableReflectorsTest + } + // MARK: - public struct RetryPolicy {