From b81b811400f1dfb255d2c0b4c488349dd361a0c6 Mon Sep 17 00:00:00 2001 From: Jon Chambers Date: Thu, 6 May 2021 12:14:52 -0400 Subject: [PATCH] Actually instantiate the Tor exit node manager. --- .../textsecuregcm/WhisperServerConfiguration.java | 10 ++++++++++ .../textsecuregcm/WhisperServerService.java | 3 +++ 2 files changed, 13 insertions(+) diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerConfiguration.java b/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerConfiguration.java index 405c8c1cc..40344035a 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerConfiguration.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerConfiguration.java @@ -39,6 +39,7 @@ import org.whispersystems.textsecuregcm.configuration.RemoteConfigConfiguration; import org.whispersystems.textsecuregcm.configuration.SecureBackupServiceConfiguration; import org.whispersystems.textsecuregcm.configuration.SecureStorageServiceConfiguration; import org.whispersystems.textsecuregcm.configuration.TestDeviceConfiguration; +import org.whispersystems.textsecuregcm.configuration.TorExitNodeConfiguration; import org.whispersystems.textsecuregcm.configuration.TurnConfiguration; import org.whispersystems.textsecuregcm.configuration.TwilioConfiguration; import org.whispersystems.textsecuregcm.configuration.UnidentifiedDeliveryConfiguration; @@ -244,6 +245,11 @@ public class WhisperServerConfiguration extends Configuration { @JsonProperty private AppConfigConfiguration appConfig; + @Valid + @NotNull + @JsonProperty + private TorExitNodeConfiguration tor; + private Map transparentDataIndex = new HashMap<>(); public RecaptchaConfiguration getRecaptchaConfiguration() { @@ -419,4 +425,8 @@ public class WhisperServerConfiguration extends Configuration { public AppConfigConfiguration getAppConfig() { return appConfig; } + + public TorExitNodeConfiguration getTorExitNodeConfiguration() { + return tor; + } } diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java b/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java index 75d214cd6..97e95cb25 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java @@ -176,6 +176,7 @@ import org.whispersystems.textsecuregcm.storage.ReservedUsernames; import org.whispersystems.textsecuregcm.storage.Usernames; import org.whispersystems.textsecuregcm.storage.UsernamesManager; import org.whispersystems.textsecuregcm.util.Constants; +import org.whispersystems.textsecuregcm.util.TorExitNodeManager; import org.whispersystems.textsecuregcm.websocket.AuthenticatedConnectListener; import org.whispersystems.textsecuregcm.websocket.DeadLetterHandler; import org.whispersystems.textsecuregcm.websocket.ProvisioningConnectListener; @@ -370,6 +371,7 @@ public class WhisperServerService extends Application