@push.rocks/smartproxy
Version:
A powerful proxy package with unified route-based configuration for high traffic management. Features include SSL/TLS support, flexible routing patterns, WebSocket handling, advanced security options, and automatic ACME certificate management.
66 lines (65 loc) • 1.25 kB
TypeScript
/**
* TLS Protocol Type Definitions
*/
import type { TTlsVersionString } from './constants.js';
/**
* TLS record header structure
*/
export interface ITlsRecordHeader {
type: number;
version: {
major: number;
minor: number;
};
length: number;
}
/**
* TLS handshake header structure
*/
export interface ITlsHandshakeHeader {
type: number;
length: number;
}
/**
* TLS extension structure
*/
export interface ITlsExtension {
type: number;
data: Buffer;
}
/**
* Server Name Indication (SNI) hostname
*/
export interface ISniHostname {
type: number;
hostname: string;
}
/**
* Parsed ClientHello information
*/
export interface IClientHelloInfo {
version: TTlsVersionString | null;
sessionId: Buffer | null;
cipherSuites: number[];
compressionMethods: number[];
extensions: ITlsExtension[];
sni?: string;
alpn?: string[];
supportedVersions?: TTlsVersionString[];
}
/**
* TLS alert structure
*/
export interface ITlsAlert {
level: number;
description: number;
}
/**
* Connection information for TLS tracking
*/
export interface ITlsConnectionInfo {
sourceIp?: string;
sourcePort?: number;
destIp?: string;
destPort?: number;
}