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.

31 lines (30 loc) 1 kB
import * as plugins from '../../plugins.js'; import { ForwardingHandler } from './base-handler.js'; import type { IForwardConfig } from '../config/forwarding-types.js'; /** * Handler for HTTP-only forwarding */ export declare class HttpForwardingHandler extends ForwardingHandler { /** * Create a new HTTP forwarding handler * @param config The forwarding configuration */ constructor(config: IForwardConfig); /** * Initialize the handler * HTTP handler doesn't need special initialization */ initialize(): Promise<void>; /** * Handle a raw socket connection * HTTP handler doesn't do much with raw sockets as it mainly processes * parsed HTTP requests */ handleConnection(socket: plugins.net.Socket): void; /** * Handle an HTTP request * @param req The HTTP request * @param res The HTTP response */ handleHttpRequest(req: plugins.http.IncomingMessage, res: plugins.http.ServerResponse): void; }