test backend changes api snivver interfaces
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 9s

This commit is contained in:
2026-03-01 14:40:52 +01:00
parent 153bd4e7c8
commit 2ec5e21e94
6 changed files with 596 additions and 201 deletions

View File

@@ -1,21 +1,33 @@
/**
* Status of an individual interface monitored by the AF_PACKET sniffer.
*/
export interface SnifferStartRequest {
bridge: string;
}
export interface SnifferStartResponse {
started: boolean;
bridge: string;
}
export interface SnifferStopResponse {
stopped: boolean;
}
export interface InterfaceSnifferStatus {
/** Whether the sniffer thread is active */
running: boolean;
/** Whether the interface exists in /sys/class/net */
exists: boolean;
/** Whether the interface is operationally UP */
up: boolean;
}
/**
* Response model for the sniffer status endpoint.
* Maps interface names to their sniffer status.
* Map of interface name -> InterfaceSnifferStatus
*/
export interface SnifferStatusResponse {
interfaces: Record<string, InterfaceSnifferStatus>;
}
/**
* Standard API error shape we expect from FastAPI HTTPException(detail=...)
*/
export interface ApiError {
detail?: string | Record<string, any>;
// FastAPI sometimes returns {"detail": "message"} or other shapes
}