/** * 바인드 정책 위반으로 HTTP 서버를 시작할 수 없을 때 throw되는 오류. * 라이브러리/테스트 호출자는 `instanceof MementoHttpSecurityStartupError` 또는 `err.code`로 구분할 수 있다. */ export declare class MementoHttpSecurityStartupError extends Error { readonly code: "MEMENTO_HTTP_SECURITY_STARTUP"; constructor(message: string); } /** * HTTP 리슨 주소가 루프백 전용인지(원격에서 도달하기 어려운지) 판별. * - IPv4: 127.0.0.0/8 전체 (RFC 1122) * - IPv6: ::1 및 [::1] * - 호스트명: localhost * - IPv4-mapped: ::ffff:127.x.x.x * 0.0.0.0, :: 및 그 외 명시 IP는 원격 도달 가능으로 간주한다. */ /** * Node `server.listen(port, host)` 에 넘길 호스트 문자열. * URL/문서에서 쓰는 대괄호 IPv6 표기(`[::1]`)는 Node가 해석하지 못하므로 `::1` 로 벗긴다. */ export declare function canonicalizeHttpBindHostForListen(host: string): string; /** * 로그·브라우저용 `http://host:port` 의 host 부분. IPv6 리터럴은 대괄호를 포함한다. */ export declare function formatHttpBindHostForUrl(host: string): string; export declare function isHttpBindHostRemotelyReachable(host: string): boolean; /** * 원격 도달 가능한 바인딩인데 ADMIN_API_KEY도 없고 insecure 옵션도 없으면 기동 불가 메시지. */ export declare function getMementoHttpSecurityStartupViolationMessage(config: { httpListenHost: string; adminApiKey: string | undefined; apiTokens?: readonly unknown[]; allowInsecureHttpAdmin: boolean; }): string | null; //# sourceMappingURL=http-bind-policy.d.ts.map