1 package org
.asamk
.signal
.manager
;
3 import org
.whispersystems
.signalservice
.api
.push
.TrustStore
;
4 import org
.whispersystems
.signalservice
.internal
.configuration
.SignalCdnUrl
;
5 import org
.whispersystems
.signalservice
.internal
.configuration
.SignalContactDiscoveryUrl
;
6 import org
.whispersystems
.signalservice
.internal
.configuration
.SignalKeyBackupServiceUrl
;
7 import org
.whispersystems
.signalservice
.internal
.configuration
.SignalServiceConfiguration
;
8 import org
.whispersystems
.signalservice
.internal
.configuration
.SignalServiceUrl
;
9 import org
.whispersystems
.signalservice
.internal
.configuration
.SignalStorageUrl
;
11 import java
.util
.Collections
;
12 import java
.util
.List
;
14 import okhttp3
.Interceptor
;
16 public class BaseConfig
{
18 public final static String PROJECT_NAME
= Manager
.class.getPackage().getImplementationTitle();
19 public final static String PROJECT_VERSION
= Manager
.class.getPackage().getImplementationVersion();
21 final static String USER_AGENT
= PROJECT_NAME
== null ?
"signal-cli" : PROJECT_NAME
+ " " + PROJECT_VERSION
;
22 final static String UNIDENTIFIED_SENDER_TRUST_ROOT
= "BXu6QIKVz5MA8gstzfOgRQGqyLqOwNKHL6INkv3IHWMF";
23 final static int PREKEY_MINIMUM_COUNT
= 20;
24 final static int PREKEY_BATCH_SIZE
= 100;
25 final static int MAX_ATTACHMENT_SIZE
= 150 * 1024 * 1024;
27 private final static String URL
= "https://textsecure-service.whispersystems.org";
28 private final static String CDN_URL
= "https://cdn.signal.org";
29 private final static String SIGNAL_KEY_BACKUP_URL
= "https://api.backup.signal.org";
30 private final static String STORAGE_URL
= "https://storage.signal.org";
31 private final static TrustStore TRUST_STORE
= new WhisperTrustStore();
33 private final static Interceptor userAgentInterceptor
= chain
->
34 chain
.proceed(chain
.request().newBuilder()
35 .header("User-Agent", USER_AGENT
)
38 private final static List
<Interceptor
> interceptors
= Collections
.singletonList(userAgentInterceptor
);
40 private final static byte[] zkGroupServerPublicParams
= new byte[]{};
42 final static SignalServiceConfiguration serviceConfiguration
= new SignalServiceConfiguration(
43 new SignalServiceUrl
[]{new SignalServiceUrl(URL
, TRUST_STORE
)},
44 new SignalCdnUrl
[]{new SignalCdnUrl(CDN_URL
, TRUST_STORE
)},
45 new SignalContactDiscoveryUrl
[0],
46 new SignalKeyBackupServiceUrl
[]{new SignalKeyBackupServiceUrl(SIGNAL_KEY_BACKUP_URL
, TRUST_STORE
)},
47 new SignalStorageUrl
[]{new SignalStorageUrl(STORAGE_URL
, TRUST_STORE
)},
49 zkGroupServerPublicParams
52 private BaseConfig() {