Handle the ping exit node request backward mode for olm and install handler

This commit is contained in:
Owen
2026-07-30 13:57:45 -04:00
parent 9469fea88f
commit d68f123e13
3 changed files with 12 additions and 1 deletions
@@ -58,9 +58,17 @@ export const handleOlmRegisterMessage: MessageHandler = async (context) => {
pingResults, pingResults,
fingerprint, fingerprint,
postures, postures,
backwardsCompatible,
chainId chainId
} = message.data; } = message.data;
if (backwardsCompatible) {
logger.debug(
"[handleOlmRegisterMessage] Backwards compatible mode detected - not sending connect message and waiting for ping response."
);
return;
}
if (!olm.clientId) { if (!olm.clientId) {
logger.warn("[handleOlmRegisterMessage] Olm client ID not found"); logger.warn("[handleOlmRegisterMessage] Olm client ID not found");
sendOlmError(OlmErrorCodes.CLIENT_ID_NOT_FOUND, olm.olmId); sendOlmError(OlmErrorCodes.CLIENT_ID_NOT_FOUND, olm.olmId);
+1
View File
@@ -15,3 +15,4 @@ export * from "./handleOlmServerInitAddPeerHandshake";
export * from "./offlineChecker"; export * from "./offlineChecker";
export * from "./handleOlmUnLocalMessage"; export * from "./handleOlmUnLocalMessage";
export * from "./handleOlmLocalMessage"; export * from "./handleOlmLocalMessage";
export * from "./handleOlmExitNodesRequestMessage";
+3 -1
View File
@@ -22,7 +22,8 @@ import {
handleOlmDisconnectingMessage, handleOlmDisconnectingMessage,
handleOlmServerInitAddPeerHandshake, handleOlmServerInitAddPeerHandshake,
handleOlmLocalMessage, handleOlmLocalMessage,
handleOlmUnLocalMessage handleOlmUnLocalMessage,
handleOlmExitNodesRequestMessage
} from "../olm"; } from "../olm";
import { handleHealthcheckStatusMessage } from "../target"; import { handleHealthcheckStatusMessage } from "../target";
import { handleRoundTripMessage } from "./handleRoundTripMessage"; import { handleRoundTripMessage } from "./handleRoundTripMessage";
@@ -37,6 +38,7 @@ export const messageHandlers: Record<string, MessageHandler> = {
"olm/wg/local": handleOlmLocalMessage, "olm/wg/local": handleOlmLocalMessage,
"olm/wg/unlocal": handleOlmUnLocalMessage, "olm/wg/unlocal": handleOlmUnLocalMessage,
"olm/ping": handleOlmPingMessage, "olm/ping": handleOlmPingMessage,
"olm/ping/request": handleOlmExitNodesRequestMessage,
"olm/disconnecting": handleOlmDisconnectingMessage, "olm/disconnecting": handleOlmDisconnectingMessage,
"newt/disconnecting": handleNewtDisconnectingMessage, "newt/disconnecting": handleNewtDisconnectingMessage,
"newt/ping": handleNewtPingMessage, "newt/ping": handleNewtPingMessage,