Fixes for siteResources with clients

This commit is contained in:
Owen
2025-08-20 18:49:58 -07:00
parent 77796e8a75
commit 49cb2ae260
8 changed files with 48 additions and 57 deletions

View File

@@ -5,11 +5,9 @@ export async function addTargets(
destinationIp: string,
destinationPort: number,
protocol: string,
port: number | null = null
port: number
) {
const target = `${port ? port + ":" : ""}${
destinationIp
}:${destinationPort}`;
const target = `${port}:${destinationIp}:${destinationPort}`;
await sendToClient(newtId, {
type: `newt/wg/${protocol}/add`,
@@ -24,11 +22,9 @@ export async function removeTargets(
destinationIp: string,
destinationPort: number,
protocol: string,
port: number | null = null
port: number
) {
const target = `${port ? port + ":" : ""}${
destinationIp
}:${destinationPort}`;
const target = `${port}:${destinationIp}:${destinationPort}`;
await sendToClient(newtId, {
type: `newt/wg/${protocol}/remove`,