Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@msimerson/stun

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@msimerson/stun - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

6

changelog.md

@@ -5,2 +5,6 @@ # Change Log

### [3.0.2] - 2024-11-13
- dep: replace ip dependency with ipaddr.js
### [3.0.1] - 2024-04-02

@@ -15,3 +19,3 @@

- installed by npx when needed
- dramatically shrinks package-lock.json
- shrinks package-lock.json from 229KB to 5.7KB
- next version: replaced with node:test

@@ -18,0 +22,0 @@

6

package.json
{
"name": "@msimerson/stun",
"version": "3.0.1",
"version": "3.0.2",
"description": "Session Traversal Utilities for NAT (STUN) client and server.",

@@ -37,4 +37,4 @@ "main": "src/index.js",

"buffer-xor": "^2.0.2",
"debug": "^4.3.4",
"ip": "^2.0.1",
"debug": "^4.3.7",
"ipaddr.js": "^2.2.0",
"ip2buf": "^2.0.0",

@@ -41,0 +41,0 @@ "is-stun": "^2.0.0",

@@ -10,3 +10,3 @@ 'use strict';

} = require('binary-data');
const ip = require('ip');
const ipa = require('ipaddr.js');
const { pton4, pton6 } = require('ip2buf');

@@ -63,3 +63,3 @@ const constants = require('../lib/constants');

const ipaddr = ip.toString(address);
const ipaddr = ipa.fromByteArray(address).toString();

@@ -66,0 +66,0 @@ assert(isPort(port));

'use strict';
const net = require('net');
const ip = require('ip');
const ipa = require('ipaddr.js');
const xor = require('buffer-xor');

@@ -39,3 +39,3 @@ const { pton4, pton6 } = require('ip2buf');

const port = xorPort(packet.port);
const address = xorIP(ip.toString(packet.address), owner);
const address = xorIP(ipa.fromByteArray(packet.address).toString(), owner);

@@ -108,3 +108,3 @@ const attribute = new StunXorAddressAttribute(type, address, port);

return ip.toString(xored);
return ipa.fromByteArray(xored).toString();
}

@@ -111,0 +111,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc