From 79b9bda9ce24981b647e8f3e07afa4b5f289bc90 Mon Sep 17 00:00:00 2001 From: dsutanto Date: Fri, 17 Jul 2026 07:52:55 +0700 Subject: [PATCH 1/2] Fix proxy double check with backend --- proxy/netifyClient.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy/netifyClient.js b/proxy/netifyClient.js index 748d7aa..bb578f2 100644 --- a/proxy/netifyClient.js +++ b/proxy/netifyClient.js @@ -170,7 +170,8 @@ async function fetchFlows(limit = 10000, agentUuid = null, siteUuid = null) { const port = r.remote_port ?? null; const portService = port ? (PORT_SERVICE_MAP[port] ?? `Port ${port}`) : null; const appLabel = r.application?.label || portService; - const domain = r.tls_sni || r.dns_hostname || r.hostname || null; + const sniVal = typeof r.tls_sni === 'object' ? r.tls_sni?.label : r.tls_sni; + const domain = sniVal || r.dns_hostname || r.hostname || null; return { flow_id: String(r.flow_id ?? ''), src_ip: r.local_ip?.address ?? null, From a5a41f4c22020d23f4e109f8ef2d74781cf13c34 Mon Sep 17 00:00:00 2001 From: dsutanto Date: Fri, 17 Jul 2026 07:53:09 +0700 Subject: [PATCH 2/2] Dockerfile with bun for backend --- backend/Dockerfile.bun | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 backend/Dockerfile.bun diff --git a/backend/Dockerfile.bun b/backend/Dockerfile.bun new file mode 100644 index 0000000..55545b7 --- /dev/null +++ b/backend/Dockerfile.bun @@ -0,0 +1,20 @@ +FROM oven/bun:1-alpine + +WORKDIR /app + +# Install dependencies first (layer caching) +# bun install is compatible with npm package.json / package-lock.json +COPY package*.json ./ +RUN bun install --production + +# Copy application source +COPY . . + +# Expose backend API port +EXPOSE 3001 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=20s --retries=3 \ + CMD bun -e "require('http').get('http://localhost:3001/api/health', r => r.statusCode === 200 ? process.exit(0) : process.exit(1)).on('error', () => process.exit(1))" + +CMD ["bun", "run", "server.js"]