proxy-chain
Version:
Node.js implementation of a proxy server (think Squid) with support for SSL, authentication, upstream proxy chaining, and protocol tunneling.
18 lines • 679 B
TypeScript
/// <reference types="node" />
import type net from 'node:net';
type Stats = {
bytesWritten: number | null;
bytesRead: number | null;
};
/**
* Socket object extended with previous read and written bytes.
* Necessary due to target socket re-use.
*/
export type SocketWithPreviousStats = net.Socket & {
previousBytesWritten?: number;
previousBytesRead?: number;
};
export declare const countTargetBytes: (source: net.Socket, target: SocketWithPreviousStats, registerCloseHandler?: ((handler: () => void) => void) | undefined) => void;
export declare const getTargetStats: (socket: net.Socket) => Stats;
export {};
//# sourceMappingURL=count_target_bytes.d.ts.map