Releases: msimerson/stun
Releases · msimerson/stun
Release list
3.2.1
3.2.0
RFC 8489 (STUN 2020) support:
- New attributes:
MESSAGE_INTEGRITY_SHA256(0x001C),PASSWORD_ALGORITHM(0x001D),USERHASH(0x001E),PASSWORD_ALGORITHMS(0x8002),ALTERNATE_DOMAIN(0x8003) addMessageIntegritySha256(key)onStunRequestaddUserhash(username, realm)— sends SHA-256(username:realm) instead of plaintext usernameaddPasswordAlgorithm(algorithm, params?)— single algorithm selectionaddPasswordAlgorithms(algorithms)— server-side algorithm advertisementaddAlternateDomain(domain)— FQDN companion toALTERNATE_SERVER- Corresponding getters on
StunResponse:getMessageIntegritySha256(),getUserhash(),getPasswordAlgorithm(),getPasswordAlgorithms(),getAlternateDomain() validateMessageIntegritySha256(message, key)exported fromlib/validateand from the top-level moduleconstants.passwordAlgorithm({ MD5: 0x0001, SHA_256: 0x0002 }) and public constants prefixedSTUN_PASSWORD_ALGORITHM_- Custom codec classes
StunPasswordAlgorithmAttributeandStunPasswordAlgorithmsAttributewith correct per-entry padding for the list format
RFC 7064 (stuns: URI scheme) support:
request('stuns://host:port')routes to a new TLS-over-TCP transport (tls-request)- default port for
stuns:is 5349 (was previously an error) rejectUnauthorizedoption forwarded to the TLS socket (defaultstrue)http:and other non-STUN protocols still throwInvalid protocol
Modern JS idioms
- index — constants export rewritten using
Object.fromEntries & assign+ a smallprefix()helper, replacing fiveObject.keys().forEach()mutation loops util— removed redundant!Number.isNaN(m)fromisNumber()create-message—||→transaction ?? createTransaction()(nullish coalescing)
3.1.2
- fix(stun-error-code-attribute) — fix errorClass * 100 + code
- fix(response) — fix getFingerprint() and getPriority()
- fix(validate) — Buffer.from(...subarray(...)) + timingSafeEqual
- fix(stun-xor-address-attribute) — fix xor() with ?? and Buffer.alloc
- fix(request) — addPriority uint32 check, addUsername off-by-one, 2 ** retries
- fix(dgram-server) — strengthen isStun with magic cookie check
- fix(decode) — add length guard
3.1.1
v3.0.2
v3.0.1
- dep(ip): bump 2.0.0 to 2.0.1
- configure eslint & prettier the modern way
- jettison @nodertc/eslint-config, much of local config was turning off stuff imported from there
- ci: bump GHA versions
- test: remove eslint from devDependencies (installed by GHA for tests, npx will use local version)
- test: remove jest from devDependencies
- installed by npx when needed
- dramatically shrinks package-lock.json
- next version: replaced with node:test