Add noise tunnel connection metrics

This commit is contained in:
Ravi Khadiwala
2025-08-20 14:01:59 -05:00
committed by ravi-signal
parent 7ca3604601
commit be8b44d645
11 changed files with 96 additions and 12 deletions

View File

@@ -46,6 +46,7 @@ import java.util.function.Supplier;
import javax.net.ssl.SSLException;
import org.signal.libsignal.protocol.ecc.ECKeyPair;
import org.signal.libsignal.protocol.ecc.ECPublicKey;
import org.whispersystems.textsecuregcm.grpc.net.FramingType;
import org.whispersystems.textsecuregcm.grpc.net.NoiseTunnelProtos;
import org.whispersystems.textsecuregcm.grpc.net.noisedirect.NoiseDirectFrame;
import org.whispersystems.textsecuregcm.grpc.net.noisedirect.NoiseDirectFrameCodec;
@@ -64,11 +65,6 @@ public class NoiseTunnelClient implements AutoCloseable {
public static final URI AUTHENTICATED_WEBSOCKET_URI = URI.create("wss://localhost/authenticated");
public static final URI ANONYMOUS_WEBSOCKET_URI = URI.create("wss://localhost/anonymous");
public enum FramingType {
WEBSOCKET,
NOISE_DIRECT
}
public static class Builder {
final SocketAddress remoteServerAddress;

View File

@@ -4,6 +4,7 @@ import io.netty.channel.local.LocalAddress;
import io.netty.channel.nio.NioEventLoopGroup;
import org.signal.libsignal.protocol.ecc.ECKeyPair;
import org.signal.libsignal.protocol.ecc.ECPublicKey;
import org.whispersystems.textsecuregcm.grpc.net.FramingType;
import org.whispersystems.textsecuregcm.grpc.net.GrpcClientConnectionManager;
import org.whispersystems.textsecuregcm.grpc.net.client.NoiseTunnelClient;
import org.whispersystems.textsecuregcm.grpc.net.AbstractNoiseTunnelServerIntegrationTest;
@@ -44,6 +45,6 @@ class DirectNoiseTunnelServerIntegrationTest extends AbstractNoiseTunnelServerIn
protected NoiseTunnelClient.Builder clientBuilder(final NioEventLoopGroup eventLoopGroup, final ECPublicKey serverPublicKey) {
return new NoiseTunnelClient
.Builder(noiseDirectTunnelServer.getLocalAddress(), eventLoopGroup, serverPublicKey)
.setFramingType(NoiseTunnelClient.FramingType.NOISE_DIRECT);
.setFramingType(FramingType.NOISE_DIRECT);
}
}