Merge pull request 'Main - Fix Proxy and and Bun support for backend' (#6) from dsutanto/Deep-Package-Inspection:main into Proxy_Server_API_Netify
Reviewed-on: rafif/Deep-Package-Inspection#6
This commit was merged in pull request #6.
This commit is contained in:
commit
5378a4e6a6
2 files changed
+22
-1
No files matched your search
@@ -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"]
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user