Add some initial backupV2 network infrastructure.

This commit is contained in:
Greyson Parrelli
2023-12-07 16:11:57 -05:00
committed by Cody Henthorne
parent e17b07bb12
commit 6230a7553d
20 changed files with 609 additions and 11 deletions

View File

@@ -158,6 +158,12 @@ open class SignalServiceNetworkAccess(context: Context) {
throw AssertionError(e)
}
private val backupServerPublicParams: ByteArray = try {
Base64.decode(BuildConfig.BACKUP_SERVER_PUBLIC_PARAMS)
} catch (e: IOException) {
throw AssertionError(e)
}
private val baseGHostConfigs: List<HostConfig> = listOf(
HostConfig("https://www.google.com", G_HOST, GMAIL_CONNECTION_SPEC),
HostConfig("https://android.clients.google.com", G_HOST, PLAY_CONNECTION_SPEC),
@@ -182,7 +188,8 @@ open class SignalServiceNetworkAccess(context: Context) {
dns = Optional.of(DNS),
signalProxy = Optional.empty(),
zkGroupServerPublicParams = zkGroupServerPublicParams,
genericServerPublicParams = genericServerPublicParams
genericServerPublicParams = genericServerPublicParams,
backupServerPublicParams = backupServerPublicParams
)
private val censorshipConfiguration: Map<Int, SignalServiceConfiguration> = mapOf(
@@ -234,7 +241,8 @@ open class SignalServiceNetworkAccess(context: Context) {
dns = Optional.of(DNS),
signalProxy = if (SignalStore.proxy().isProxyEnabled) Optional.ofNullable(SignalStore.proxy().proxy) else Optional.empty(),
zkGroupServerPublicParams = zkGroupServerPublicParams,
genericServerPublicParams = genericServerPublicParams
genericServerPublicParams = genericServerPublicParams,
backupServerPublicParams = backupServerPublicParams
)
open fun getConfiguration(): SignalServiceConfiguration {
@@ -303,7 +311,8 @@ open class SignalServiceNetworkAccess(context: Context) {
dns = Optional.of(DNS),
signalProxy = Optional.empty(),
zkGroupServerPublicParams = zkGroupServerPublicParams,
genericServerPublicParams = genericServerPublicParams
genericServerPublicParams = genericServerPublicParams,
backupServerPublicParams = backupServerPublicParams
)
}