fix eth type and db
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 1m40s

This commit is contained in:
2026-03-07 10:26:51 +01:00
parent 79b2f1e673
commit 161ed0f145
6 changed files with 79 additions and 85 deletions

View File

@@ -12,13 +12,13 @@ class PacketDBModel(BaseModel):
id: Union[int, str]
timestamp: datetime = Field(..., description="Packet timestamp in ISO format.")
packet_uid: str = Field(..., description="Stable packet identity used for upserts/correlation.")
iface: Optional[str] = None
ingress_if: Optional[str] = None
egress_if: Optional[str] = None
observed_ifaces: Optional[list[str]] = None
src_mac: Optional[str] = None
dst_mac: Optional[str] = None
eth_type_raw: Optional[int] = Field(None, description="Numeric Ethernet type from the frame header.")
eth_type: Optional[Union[int, str]] = None
ip_proto_raw: Optional[int] = Field(None, description="Numeric IP protocol / next-header value.")
ip_proto: Optional[Union[int, str]] = None
src_ip: Optional[IPvAnyAddress] = None
dst_ip: Optional[IPvAnyAddress] = None
@@ -36,7 +36,6 @@ class PacketDBModel(BaseModel):
app_risk_score: Optional[int] = Field(None, description="Count/score of detected nDPI risks.")
dpi_metadata: Optional[dict] = Field(None, description="Raw DPI metadata from nDPI.")
telemetry_metadata: Optional[dict] = Field(None, description="Kernel telemetry details from eBPF collector.")
direction: Optional[str] = None
verdict: Optional[str] = None
verdict_reason: Optional[str] = None
verdict_confidence: Optional[str] = None
@@ -51,13 +50,13 @@ class PacketDBModel(BaseModel):
"id": 123,
"timestamp": "2026-03-05T12:34:56.789Z",
"packet_uid": "9f6d3af0d3c81cb20ee8e7d32df7c56414460542",
"iface": "eth0",
"ingress_if": "eth0",
"egress_if": "eth1",
"observed_ifaces": ["eth0", "eth1"],
"src_mac": "aa:bb:cc:dd:ee:ff",
"dst_mac": "11:22:33:44:55:66",
"eth_type_raw": 2048,
"eth_type": "IPv4",
"ip_proto_raw": 6,
"ip_proto": "TCP",
"src_ip": "192.168.1.10",
"dst_ip": "192.168.1.1",
@@ -75,7 +74,6 @@ class PacketDBModel(BaseModel):
"app_risk_score": 0,
"dpi_metadata": {"method": "GET"},
"telemetry_metadata": {"event_type": "egress", "iface": "eth1"},
"direction": "forwarded",
"verdict": "accept",
"verdict_reason": "egress-observed",
"verdict_confidence": "high",