Add exit node name

This commit is contained in:
Owen
2025-10-01 09:49:29 -07:00
parent 70914e836f
commit b5e04e8111

View File

@@ -280,6 +280,7 @@ export async function updateClient(
reachableAt: string; reachableAt: string;
exitNodeId: number; exitNodeId: number;
type: string; type: string;
name: string;
sourceIp: string; sourceIp: string;
sourcePort: number; sourcePort: number;
destinations: PeerDestination[]; destinations: PeerDestination[];
@@ -310,6 +311,7 @@ export async function updateClient(
reachableAt: site.exitNodes?.reachableAt || "", reachableAt: site.exitNodes?.reachableAt || "",
exitNodeId: site.exitNodes?.exitNodeId || 0, exitNodeId: site.exitNodes?.exitNodeId || 0,
type: site.exitNodes?.type || "", type: site.exitNodes?.type || "",
name: site.exitNodes?.name || "",
sourceIp: site.clientSites.endpoint.split(":")[0] || "", sourceIp: site.clientSites.endpoint.split(":")[0] || "",
sourcePort: sourcePort:
parseInt(site.clientSites.endpoint.split(":")[1]) || 0, parseInt(site.clientSites.endpoint.split(":")[1]) || 0,
@@ -352,7 +354,8 @@ export async function updateClient(
const exitNodeForComm = { const exitNodeForComm = {
exitNodeId: destination.exitNodeId, exitNodeId: destination.exitNodeId,
type: destination.type, type: destination.type,
reachableAt: destination.reachableAt reachableAt: destination.reachableAt,
name: destination.name
} as any; // Using 'as any' since we know sendToExitNode will handle this correctly } as any; // Using 'as any' since we know sendToExitNode will handle this correctly
await sendToExitNode(exitNodeForComm, { await sendToExitNode(exitNodeForComm, {