test backend codec ndpi
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 1m40s

This commit is contained in:
2026-03-06 22:05:45 +01:00
parent 991f26e5f2
commit 25bb7be29d
11 changed files with 1144 additions and 49 deletions

View File

@@ -23,6 +23,14 @@ class PacketDBModel(BaseModel):
vlan_id: Optional[int] = None
length: Optional[int] = None
raw_b64: Optional[str] = Field(None, description="Base64-encoded packet bytes.")
app_protocol: Optional[str] = Field(None, description="Detected application protocol.")
app_master_protocol: Optional[str] = Field(None, description="Detected application master protocol.")
app_category: Optional[str] = Field(None, description="nDPI category, if available.")
app_confidence: Optional[str] = Field(None, description="nDPI confidence level, if available.")
app_hostname: Optional[str] = Field(None, description="Detected hostname/SNI, if available.")
app_is_encrypted: Optional[bool] = Field(None, description="Whether detected protocol appears encrypted.")
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.")
direction: Optional[str] = None
packets: Optional[int] = None
@@ -43,5 +51,13 @@ class PacketDBModel(BaseModel):
"vlan_id": None,
"length": 128,
"raw_b64": "BASE64...",
"app_protocol": "HTTP",
"app_master_protocol": "HTTP",
"app_category": "Web",
"app_confidence": "high",
"app_hostname": "example.org",
"app_is_encrypted": False,
"app_risk_score": 0,
"dpi_metadata": {"method": "GET"},
}
}