feat(detector): Enhance port detection and service fingerprinting with improved HTTP/HTTPS and SSH checks, update test scripts for verbose output, and revise documentation with new hints and a detailed improvement plan.
This commit is contained in:
44
ts/detector.interfaces.ts
Normal file
44
ts/detector.interfaces.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
export enum ServiceType {
|
||||
HTTP = 'http',
|
||||
HTTPS = 'https',
|
||||
SSH = 'ssh',
|
||||
FTP = 'ftp',
|
||||
SMTP = 'smtp',
|
||||
POP3 = 'pop3',
|
||||
IMAP = 'imap',
|
||||
MYSQL = 'mysql',
|
||||
POSTGRESQL = 'postgresql',
|
||||
MONGODB = 'mongodb',
|
||||
REDIS = 'redis',
|
||||
UNKNOWN = 'unknown'
|
||||
}
|
||||
|
||||
export interface IDetectorResult {
|
||||
isActive: boolean;
|
||||
serviceType?: ServiceType;
|
||||
protocol?: 'tcp' | 'udp';
|
||||
responseTime?: number;
|
||||
tlsVersion?: string;
|
||||
serviceBanner?: string;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface INetworkDiagnostics {
|
||||
ping?: {
|
||||
reachable: boolean;
|
||||
averageLatency: number;
|
||||
packetLoss: number;
|
||||
};
|
||||
traceroute?: Array<{
|
||||
hop: number;
|
||||
hostname: string;
|
||||
ip: string;
|
||||
latency: number;
|
||||
}>;
|
||||
}
|
||||
|
||||
export interface IDetectorOptions {
|
||||
timeout?: number;
|
||||
includeNetworkDiagnostics?: boolean;
|
||||
detectServiceType?: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user