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,
fingerprint,
postures,
backwardsCompatible,
chainId
} = message.data;
if (backwardsCompatible) {
logger.debug(
"[handleOlmRegisterMessage] Backwards compatible mode detected - not sending connect message and waiting for ping response."
);
return;
}
if (!olm.clientId) {
logger.warn("[handleOlmRegisterMessage] Olm client ID not found");
sendOlmError(OlmErrorCodes.CLIENT_ID_NOT_FOUND, olm.olmId);
+1
View File
@@ -15,3 +15,4 @@ export * from "./handleOlmServerInitAddPeerHandshake";
export * from "./offlineChecker";
export * from "./handleOlmUnLocalMessage";
export * from "./handleOlmLocalMessage";
export * from "./handleOlmExitNodesRequestMessage";
+3 -1
View File
@@ -22,7 +22,8 @@ import {
handleOlmDisconnectingMessage,
handleOlmServerInitAddPeerHandshake,
handleOlmLocalMessage,
handleOlmUnLocalMessage
handleOlmUnLocalMessage,
handleOlmExitNodesRequestMessage
} from "../olm";
import { handleHealthcheckStatusMessage } from "../target";
import { handleRoundTripMessage } from "./handleRoundTripMessage";
@@ -37,6 +38,7 @@ export const messageHandlers: Record<string, MessageHandler> = {
"olm/wg/local": handleOlmLocalMessage,
"olm/wg/unlocal": handleOlmUnLocalMessage,
"olm/ping": handleOlmPingMessage,
"olm/ping/request": handleOlmExitNodesRequestMessage,
"olm/disconnecting": handleOlmDisconnectingMessage,
"newt/disconnecting": handleNewtDisconnectingMessage,
"newt/ping": handleNewtPingMessage,