test backend changes api snivver interfaces
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 9s
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 9s
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user