Website Structure

This commit is contained in:
supalerk-ar66 2026-01-13 10:46:40 +07:00
parent 62812f2090
commit 71f0676a62
22365 changed files with 4265753 additions and 791 deletions

View file

@ -0,0 +1,7 @@
// npx -y node@22.14 -e 'const tls=require("tls");console.log(Object.entries(tls).filter(e => ["string", "number"].includes(typeof e[1])).map(([k,v]) => `export const ${k} = ${JSON.stringify(v)}`).join("\n"))'
export declare const CLIENT_RENEG_LIMIT = 3;
export declare const CLIENT_RENEG_WINDOW = 600;
export declare const DEFAULT_CIPHERS = "";
export declare const DEFAULT_ECDH_CURVE = "auto";
export declare const DEFAULT_MIN_VERSION = "TLSv1.2";
export declare const DEFAULT_MAX_VERSION = "TLSv1.3";

View file

@ -0,0 +1,7 @@
// npx -y node@22.14 -e 'const tls=require("tls");console.log(Object.entries(tls).filter(e => ["string", "number"].includes(typeof e[1])).map(([k,v]) => `export const ${k} = ${JSON.stringify(v)}`).join("\n"))'
export const CLIENT_RENEG_LIMIT = 3;
export const CLIENT_RENEG_WINDOW = 600;
export const DEFAULT_CIPHERS = "";
export const DEFAULT_ECDH_CURVE = "auto";
export const DEFAULT_MIN_VERSION = "TLSv1.2";
export const DEFAULT_MAX_VERSION = "TLSv1.3";

View file

@ -0,0 +1,4 @@
import type nodeTls from "node:tls";
export declare class SecureContext implements nodeTls.SecureContext {
context: {};
}

View file

@ -0,0 +1,3 @@
export class SecureContext {
context = {};
}

View file

@ -0,0 +1,9 @@
import type nodeTls from "node:tls";
import { Server as _Server } from "node:net";
export declare class Server extends _Server implements nodeTls.Server {
constructor(arg1?: nodeTls.TlsOptions | ((socket: nodeTls.TLSSocket) => void), arg2?: (socket: nodeTls.TLSSocket) => void);
addContext(hostname: string, context: nodeTls.SecureContextOptions);
setSecureContext(options: nodeTls.SecureContextOptions);
setTicketKeys(_keys: Buffer);
getTicketKeys(): Buffer;
}

View file

@ -0,0 +1,15 @@
import { createNotImplementedError } from "../../../_internal/utils.mjs";
import { Server as _Server } from "node:net";
export class Server extends _Server {
constructor(arg1, arg2) {
super(arg1, arg2);
}
addContext(hostname, context) {}
setSecureContext(options) {}
setTicketKeys(_keys) {
throw createNotImplementedError("Server.setTicketKeys");
}
getTicketKeys() {
throw createNotImplementedError("Server.getTicketKeys");
}
}

View file

@ -0,0 +1,31 @@
import type nodeTls from "node:tls";
import { Socket } from "node:net";
export declare class TLSSocket extends Socket implements nodeTls.TLSSocket {
authorized: boolean;
encrypted: true;
alpnProtocol: null;
authorizationError: Error;
exportKeyingMaterial(): Buffer;
getCipher(): nodeTls.CipherNameAndProtocol;
getPeerCertificate(detailed: true): nodeTls.DetailedPeerCertificate;
getPeerCertificate(detailed?: false): nodeTls.PeerCertificate;
getPeerCertificate(detailed?: boolean): nodeTls.PeerCertificate | nodeTls.DetailedPeerCertificate;
getCertificate(): null;
getEphemeralKeyInfo(): null;
getFinished(): undefined;
getPeerFinished(): undefined;
getProtocol(): null;
getSession(): undefined;
getSharedSigalgs(): unknown;
getTLSTicket(): undefined;
isSessionReused(): boolean;
renegotiate(options: {
rejectUnauthorized?: boolean | undefined;
requestCert?: boolean | undefined;
}, callback: (err: Error | null) => void): undefined;
setMaxSendFragment(size: number): boolean;
disableRenegotiation();
enableTrace();
getPeerX509Certificate(): undefined;
getX509Certificate(): undefined;
}

View file

@ -0,0 +1,48 @@
import { Socket } from "node:net";
import { createNotImplementedError } from "../../../_internal/utils.mjs";
export class TLSSocket extends Socket {
authorized = false;
encrypted = true;
alpnProtocol = null;
authorizationError = new Error("[unenv] TLSSocket.authorizationError is not implemented yet!");
exportKeyingMaterial() {
throw createNotImplementedError("TLSSocket.exportKeyingMaterial");
}
getCipher() {
throw createNotImplementedError("TLSSocket.getCipher");
}
getPeerCertificate(_detailed) {
throw createNotImplementedError("TLSSocket.getPeerCertificate");
}
getCertificate() {
return null;
}
getEphemeralKeyInfo() {
return null;
}
getFinished() {}
getPeerFinished() {}
getProtocol() {
return null;
}
getSession() {}
getSharedSigalgs() {
return [];
}
getTLSTicket() {}
isSessionReused() {
return false;
}
renegotiate(options, callback) {
if (typeof callback === "function") {
callback(null);
}
}
setMaxSendFragment(size) {
return false;
}
disableRenegotiation() {}
enableTrace() {}
getPeerX509Certificate() {}
getX509Certificate() {}
}