Back to Explore

szmarczak/resolve-alpn

GitHub
1 watchersOpen source

Last release:

resolve-alpn is a Node.js utility that detects which ALPN protocol a server negotiates during a TLS connection. It exposes a resolveALPN API that returns an alpnProtocol value (and can optionally return the underlying socket) and is useful for verifying HTTP/2, HTTP/1.1, or other negotiated application protocols.

Project status

  • The repository appears quiet and not actively maintained as of today (last upstream push was 2021-08-30, over four years ago), so there are no recent updates to indicate ongoing maintenance.
  • The apparent update cadence is low, with changes in 2021 and no updates after 2021-08-30 (e.g., v1.2.1 on 2021-08-30, v1.2.0 on 2021-07-21, v1.1.2 on 2021-04-15).

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v1.2.1

    Release v1.2.1 includes a timing fix so the internal callback does not run until the TLS socket creation promise has been resolved. It also adds a regression test to verify behavior when `resolveSocket: true` is used.

  • v1.2.0

    Release v1.2.0 adds support for using an asynchronous socket creation function when resolving ALPN. The implementation changes the exported API to accept a custom `connect` function and awaits it before wiring socket event handlers.

    Features
  • v1.1.2

    Release v1.1.2 appears to be a small packaging metadata update. The only code diff provided changes package.json, updating the version and adding an npm publish file whitelist.

  • v1.1.1

    v1.1.1 is a small behavioral fix focused on how the module handles the TLS socket 'timeout' event relative to when the returned promise settles. The change primarily adjusts event listener cleanup and how the timeout handler re-enters the connection callback.

  • v1.1.0

    v1.1.0 updates resolve-alpn so callers can detect socket timeouts via a new `result.timeout` field. The implementation also changes how the promise resolves on timeout, and adjusts the shape of the resolved value for both success and failure paths.

  • v1.0.1

    v1.0.1 fixes an issue where the exported Promise could remain unresolved when the underlying TLS socket hit a timeout. The code now explicitly handles the socket timeout event and resolves the Promise instead of leaving it pending.

  • v1.0.0

    This release is tagged v1.0.0, but no release notes were provided by the publisher. As a result, no specific changes, fixes, or upgrade guidance can be extracted from the supplied notes.