webssh2-server
Version: 
A Websocket to SSH2 gateway using xterm.js, socket.io, ssh2
50 lines (49 loc) • 1.4 kB
TypeScript
import type { Config } from '../types/config.js';
export interface MaskedConfig {
    listen: Config['listen'];
    http: {
        origins: string;
    };
    user: {
        name: string | null;
        password: string | null;
        privateKey: string | null;
        passphrase: string | null;
    };
    ssh: {
        host: Config['ssh']['host'];
        port: Config['ssh']['port'];
        localAddress?: Config['ssh']['localAddress'];
        localPort?: Config['ssh']['localPort'];
        term: Config['ssh']['term'];
        readyTimeout: Config['ssh']['readyTimeout'];
        keepaliveInterval: Config['ssh']['keepaliveInterval'];
        keepaliveCountMax: Config['ssh']['keepaliveCountMax'];
        allowedSubnets: number;
        algorithms: {
            cipher: number;
            kex: number;
            hmac: number;
            compress: number;
            serverHostKey: number;
        };
    };
    header: Config['header'];
    options: Config['options'];
    session: {
        name: string;
        secret: string;
    };
    sso: {
        enabled: boolean;
        csrfProtection: boolean;
        trustedProxies: number;
    };
}
/**
 * Masks sensitive configuration data for logging
 * @param config - Configuration to mask
 * @returns Masked configuration safe for logging
 * @pure
 */
export declare const maskSensitiveConfig: (config: Config) => MaskedConfig;