xmpp-httpx - v0.11.0
    Preparing search index...

    Interface HttpxServerOptions

    interface HttpxServerOptions {
        advertise?: boolean;
        authorize?: AuthorizeFn;
        compress?: boolean;
        ibbBlockSize?: number;
        ibbSessionWindow?: number;
        ibbWindow?: number;
        idleTimeoutMs?: number;
        inlineBudgetBytes?: number;
        maxRequestBodyBytes?: number;
        onError?: (
            error: unknown,
            context: { from: string; resource?: string },
        ) => void;
        preferredStreams?: readonly StreamMechanism[];
        socks5?: Socks5Adapter;
        tunnels?: boolean;
    }
    Index
    advertise?: boolean

    Answer disco#info with the urn:xmpp:http feature. Default true.

    authorize?: AuthorizeFn

    Authorization hook, called before the body is consumed. Defaults to deny-all (with a one-time warning) per the XEP's security considerations — pass policy helpers from ./policy.js or your own function.

    compress?: boolean

    Compress compressible response bodies when the requester sent Accept-Encoding, and transparently decompress encoded request bodies. Default true.

    ibbBlockSize?: number

    Ceiling on the decoded bytes per IBB block this server sends. The block size is the requester's call — it is the side whose stanza limit has to carry the base64 — so this only ever lowers what <req maxChunkSize=…> asked for, never raises it. Derive the requester's side with stanzaBudgets(maxStanzaBytes).

    ibbSessionWindow?: number

    IBB blocks in flight across every stream on this session together — the fair scheduler's budget. Default 16. When it is full, freed slots go to waiting streams in turn, so one large transfer cannot starve the rest. Per session: shared with anything else using IBB on it.

    ibbWindow?: number

    IBB blocks kept in flight when streaming a response body, and the number an inbound request body may run ahead before acks are withheld. Default 8. One block costs a round trip, so this is the multiplier on a high-latency path; 1 restores the block-at-a-time sender. The session budget (ibbSessionWindow) caps it.

    idleTimeoutMs?: number

    Idle timeout for streamed request bodies.

    inlineBudgetBytes?: number

    Max encoded bytes inlined into the result IQ. Default 4096.

    maxRequestBodyBytes?: number

    Cap on request body size. Default 8 MiB.

    onError?: (error: unknown, context: { from: string; resource?: string }) => void

    Called with errors from handlers and post-reply body streaming.

    preferredStreams?: readonly StreamMechanism[]

    Stream mechanism preference for large response bodies.

    socks5?: Socks5Adapter

    Enables XEP-0065 SOCKS5 Bytestreams as a sipub stream-method alongside IBB (Node-only — see xmpp-httpx/node's createSocks5Adapter).

    tunnels?: boolean

    Accept CONNECT and hand the handler tunnels; advertises urn:xmpp:http:connect:0. Default false: CONNECT is answered 501 without reaching the handler, so a handler written for GET and POST never sees one — and a requester that checks disco never sends one.

    With advertise: false the feature is yours to add to your own disco answer — httpxFeatures([NS_HTTPX_CONNECT]) — or HttpxClient.connect() will refuse this server.