added doga
This commit is contained in:
42
25_02_24/node_modules/@tinyhttp/proxy-addr/dist/index.d.ts
generated
vendored
Normal file
42
25_02_24/node_modules/@tinyhttp/proxy-addr/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
import type { IncomingMessage } from 'node:http';
|
||||
import { type IPv6, type IPv4 } from 'ipaddr.js';
|
||||
type Req = Pick<IncomingMessage, 'headers' | 'socket'>;
|
||||
export type TrustParameter = string | number | string[];
|
||||
export type TrustFunction = (addr: string, i: number) => boolean;
|
||||
export type Trust = TrustFunction | TrustParameter;
|
||||
type Subnet = {
|
||||
ip: IPv4 | IPv6;
|
||||
range: number;
|
||||
};
|
||||
/**
|
||||
* Get all addresses in the request, optionally stopping
|
||||
* at the first untrusted.
|
||||
*
|
||||
* @param req
|
||||
* @param trust
|
||||
*/
|
||||
declare function alladdrs(req: Req, trust?: Trust): string[];
|
||||
/**
|
||||
* Compile argument into trust function.
|
||||
*
|
||||
* @param val
|
||||
*/
|
||||
declare function compile(val: string | number | string[]): (addr: string, i: number) => boolean;
|
||||
/**
|
||||
* Parse IP notation string into range subnet.
|
||||
*
|
||||
* @param {String} note
|
||||
* @private
|
||||
*/
|
||||
export declare function parseIPNotation(note: string): Subnet;
|
||||
/**
|
||||
* Determine address of proxied request.
|
||||
*
|
||||
* @param req
|
||||
* @param trust
|
||||
* @public
|
||||
*/
|
||||
export declare function proxyaddr(req: Req, trust: Trust): string;
|
||||
export { alladdrs as all };
|
||||
export { compile };
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
Reference in New Issue
Block a user