Releases: gibme-npm/radius
Releases · gibme-npm/radius
v22.1.1
A TypeScript/Node.js library for the RADIUS protocol (RFC 2865, RFC 2866, RFC 2868, RFC 2869) — packet parsing and construction, a UDP server and client, FreeRADIUS dictionary-based attribute resolution, and the protocol's authentication and password-encryption schemes.
Highlights
Packet model
- Parse, construct, and serialize RADIUS packets per RFC 2865/2866/2868/2869.
- Standard attributes, vendor-specific attributes (VSAs), extended and long-extended attributes, nested TLVs, and struct decoding.
- Typed encode/decode for integer, string, text, octets, ipaddr, ipv6addr/prefix, and date values, with strict length and bounds checking on both paths.
Dictionary
- FreeRADIUS-format dictionary loader with nested includes, vendor blocks,
BEGIN/END-VENDORscoping, and value mappings. - Bundled vendor dictionaries for attribute and value name resolution.
Server & Client
- Asynchronous UDP
ServerandClientbuilt onnode:dgram, exposingpacketanddiscardevents with per-request tracking keyed by identifier and source.
Authentication
- Request Authenticator generation from cryptographically secure random bytes, and Accounting-Request Authenticator computation per RFC 2866.
- Message-Authenticator (attribute 80) HMAC-MD5 generation and constant-time verification, enforced by default for authenticated packets.
- Opt-in
allowMissingMessageAuthenticator/allowMismatchedMessageAuthenticatorflags for interoperating with legacy CHAP/PAP equipment that omits attribute 80 (both default tofalse).
Password encryption
- User-Password (RFC 2865) and Tunnel-Password (RFC 2868) encryption, with a unique salt generated per packet.
Requirements
- Node.js >= 22
Installation
yarn add @gibme/radius
# or
npm install @gibme/radiusSee the README for full usage and API documentation.