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.0 to 3.0.1

.eslintrc.yaml

18

changelog.md

@@ -5,7 +5,18 @@ # Change Log

### [3.0.1] - 2024-04-02
- 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
### [3.0.0] - 2023-12-13
- BREAKING: drop support for node.js <= 16
- still works, but no legacy version testing
- still works, but no legacy version testing
- dep(eslint): bump to 8.55.0

@@ -15,3 +26,2 @@ - dep(jest): bump to 29.7.0

## [2.1.16] - 2023-12-09

@@ -21,6 +31,5 @@

- dep(parse-url): replace with native URL
- require node.js >= 10
- require node.js >= 10
- ci: replace Travis with GHA
## [2.1.0] - 2019-11-23

@@ -30,3 +39,2 @@

## [2.0.0] - 2019-06-02

@@ -33,0 +41,0 @@

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

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

"lint-fix": "npx eslint --fix .",
"test": "npm run lint && npx jest",
"test-ci": "npx jest",
"prettier": "npx prettier --check .",
"prettier:fix": "npx prettier --write .",
"test": "npx jest",
"versions": "npx dependency-version-checker check"

@@ -33,9 +34,3 @@ },

"homepage": "https://github.com/msimerson/stun#readme",
"devDependencies": {
"@nodertc/eslint-config": "^0.3.0",
"eslint": "^8.55.0",
"eslint-plugin-prettier": "^5.0.1",
"jest": "^29.7.0",
"prettier": "^3.1.1"
},
"devDependencies": {},
"dependencies": {

@@ -45,3 +40,3 @@ "binary-data": "^0.6.0",

"debug": "^4.3.4",
"ip": "^2.0.0",
"ip": "^2.0.1",
"ip2buf": "^2.0.0",

@@ -51,3 +46,3 @@ "is-stun": "^2.0.0",

"turbo-crc32": "^1.0.1",
"universalify": "^2.0.0"
"universalify": "^2.0.1"
},

@@ -78,54 +73,3 @@ "engines": {

"cacheDirectory": ".jest-cache"
},
"eslintConfig": {
"extends": "@nodertc",
"rules": {
"no-plusplus": "off",
"no-bitwise": "off",
"consistent-return": "off",
"jsdoc/require-returns": "off"
},
"overrides": [
{
"files": [
"test/**/*.js"
],
"env": {
"jest": true
},
"settings": {
"import/resolver": {
"node": {
"moduleDirectory": [
"node_modules",
"src"
]
}
}
},
"rules": {
"require-jsdoc": "off",
"jsdoc/require-jsdoc": "off",
"unicorn/prevent-abbreviations": "off"
}
},
{
"files": [
"examples/*.js"
],
"rules": {
"no-console": "off",
"require-jsdoc": "off"
}
},
{
"files": [
"**/attributes/stun-*.js"
],
"rules": {
"class-methods-use-this": "off"
}
}
]
}
}

@@ -26,5 +26,5 @@ # stun

```js
const stun = require("stun");
const stun = require('stun');
stun.request("stun.l.google.com:19302", (err, res) => {
stun.request('stun.l.google.com:19302', (err, res) => {
if (err) {

@@ -34,3 +34,3 @@ console.error(err);

const { address } = res.getXorAddress();
console.log("your ip", address);
console.log('your ip', address);
}

@@ -41,4 +41,4 @@ });

const res = await stun.request("stun.l.google.com:19302");
console.log("your ip", res.getXorAddress().address);
const res = await stun.request('stun.l.google.com:19302');
console.log('your ip', res.getXorAddress().address);
```

@@ -167,3 +167,3 @@

```js
stunServer.on("bindingResponse", (msg) => {
stunServer.on('bindingResponse', (msg) => {
if (!stun.validateFingerprint(msg)) {

@@ -213,3 +213,3 @@ // do stuff..

socket.on("message", (message) => {
socket.on('message', (message) => {
const response = stun.decode(message);

@@ -292,3 +292,3 @@ // do stuff ...

```js
stunMsg.addAttribute(STUN_ATTR_XOR_MAPPED_ADDRESS, "8.8.8.8", 19302);
stunMsg.addAttribute(STUN_ATTR_XOR_MAPPED_ADDRESS, '8.8.8.8', 19302);
```

@@ -317,3 +317,3 @@

```js
stunMsg.addAttribute(STUN_ATTR_SOFTWARE, "node/8.2.0 stun/1.0.0");
stunMsg.addAttribute(STUN_ATTR_SOFTWARE, 'node/8.2.0 stun/1.0.0');
```

@@ -358,7 +358,3 @@

```js
stunMsg.addAttribute(
STUN_ATTR_ERROR_CODE,
STUN_CODE_UNAUTHORIZED,
STUN_REASON_UNAUTHORIZED
);
stunMsg.addAttribute(STUN_ATTR_ERROR_CODE, STUN_CODE_UNAUTHORIZED, STUN_REASON_UNAUTHORIZED);
```

@@ -365,0 +361,0 @@

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

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(1);

@@ -125,3 +125,3 @@ expect(attributes[0].valueType).toEqual(attributeValueType.ADDRESS);

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(1);

@@ -142,3 +142,3 @@ expect(attributes[0].valueType).toEqual(attributeValueType.XOR_ADDRESS);

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(1);

@@ -159,3 +159,3 @@ expect(attributes[0].type).toEqual(attributeType.ALTERNATE_SERVER);

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(1);

@@ -183,3 +183,3 @@ expect(attributes[0].type).toEqual(attributeType.USERNAME);

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(1);

@@ -195,3 +195,3 @@ expect(attributes[0].type).toEqual(attributeType.SOFTWARE);

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(1);

@@ -207,3 +207,3 @@ expect(attributes[0].type).toEqual(attributeType.REALM);

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(1);

@@ -239,3 +239,3 @@ expect(attributes[0].type).toEqual(attributeType.NONCE);

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(1);

@@ -255,3 +255,3 @@ expect(attributes[0].valueType).toEqual(attributeValueType.XOR_ADDRESS);

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(1);

@@ -272,3 +272,3 @@ expect(attributes[0].valueType).toEqual(attributeValueType.ADDRESS);

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(2);

@@ -287,3 +287,3 @@ expect(attributes[0].type).toEqual(attributeType.SOFTWARE);

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(1);

@@ -319,3 +319,3 @@ expect(attributes[0].type).toEqual(attributeType.ERROR_CODE);

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(1);

@@ -334,3 +334,3 @@ expect(attributes[0].type).toEqual(attributeType.ERROR_CODE);

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(1);

@@ -347,3 +347,3 @@ expect(attributes[0].type).toEqual(attributeType.UNKNOWN_ATTRIBUTES);

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(1);

@@ -364,3 +364,3 @@ expect(attributes[0].type).toEqual(attributeType.PRIORITY);

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(1);

@@ -379,3 +379,3 @@ expect(attributes[0].type).toEqual(attributeType.USE_CANDIDATE);

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(1);

@@ -405,3 +405,3 @@ expect(attributes[0].type).toEqual(attributeType.ICE_CONTROLLED);

const attributes = Array.from(message); // eslint-disable-line unicorn/prefer-spread
const attributes = Array.from(message);
expect(attributes.length).toEqual(1);

@@ -408,0 +408,0 @@ expect(attributes[0].type).toEqual(attributeType.ICE_CONTROLLING);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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