UNPKG

@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.

36 lines (35 loc) 1.32 kB
import * as plugins from '../../plugins.js'; import { ForwardingHandler } from './base-handler.js'; import type { IForwardConfig } from '../config/forwarding-types.js'; /** * Handler for HTTPS termination with HTTPS backend */ export declare class HttpsTerminateToHttpsHandler extends ForwardingHandler { private secureContext; /** * Create a new HTTPS termination with HTTPS backend handler * @param config The forwarding configuration */ constructor(config: IForwardConfig); /** * Initialize the handler, setting up TLS context */ initialize(): Promise<void>; /** * Set the secure context for TLS termination * Called when a certificate is available * @param context The secure context */ setSecureContext(context: plugins.tls.SecureContext): void; /** * Handle a TLS/SSL socket connection by terminating TLS and creating a new TLS connection to backend * @param clientSocket The incoming socket from the client */ handleConnection(clientSocket: plugins.net.Socket): void; /** * Handle an HTTP request by forwarding to the HTTPS backend * @param req The HTTP request * @param res The HTTP response */ handleHttpRequest(req: plugins.http.IncomingMessage, res: plugins.http.ServerResponse): void; }