@gibme/ssdp
    Preparing search index...

    Type Alias Options

    Options: Partial<SSDP.Options> & {
        authenticationProvider: (
            ipAddress: string,
        ) => Promise<boolean> | boolean;
        interval: number;
        services: Record<string, HeadersInit>;
        silentMode: boolean;
        uuid: string;
    }

    Type Declaration

    • authenticationProvider: (ipAddress: string) => Promise<boolean> | boolean

      Gates unicast responses to incoming M-SEARCH requests by remote IP. Returns true to allow the response, false to silently drop.

      This callback ONLY governs unicast replies. Outbound multicast NOTIFY / ssdp:alive / ssdp:byebye are sent to the multicast group without consulting this callback. If you need the advertiser to stay silent on the wire and only respond to direct queries, also set silentMode: true.

      If the callback throws, the request fails closed.

      () => true
      
    • interval: number

      How often (in ms) we will advertise our service(s) to the network

      60000
      
    • services: Record<string, HeadersInit>

      The initial services to advertise

    • silentMode: boolean

      When true, the advertiser does not periodically multicast NOTIFY ssdp:alive, does not multicast ssdp:byebye on destroy, and does not react to its own interval timer. It still answers unicast M-SEARCH requests that pass authenticationProvider.

      Use this when SSDP discoverability should be initiated by the requester (pull) rather than announced (push), or when the advertiser should appear only to authorized querents.

      false
      
    • uuid: string

      The UUID for the instance of this server.

      The default is a fresh RFC 9562 v4 (random) UUID. UPnP DA expects device UUIDs to be stable across reboots; if you want that, generate one once at install time, persist it, and pass it here every run. Avoid v1 (leaks MAC) and v7 (leaks creation wall-clock timestamp via every USN multicast).

      new v4 UUID