You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

does-it-fit

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

does-it-fit - npm Package Compare versions

Comparing version
1.0.1
to
1.0.2
+1
-1
package.json
{
"name": "does-it-fit",
"version": "1.0.1",
"version": "1.0.2",
"description": "Determine whether an HTTP endpoint's TCP response fits within minimum constraints",

@@ -5,0 +5,0 @@ "main": "index.js",

+39
-18

@@ -21,31 +21,51 @@ # does-it-fit

### require('does-it-fit') => (url, opts, cb(err, result))
### `require('does-it-fit') => (url, opts, cb(err, result))`
#### opts
#### `opts`
**constraints**: Array of bytes - index of each matches labels
Default: `[536, 1024, 14336, 66560]`
##### `constraints`
Array of bytes - index of each matches labels
Default: `[536, 1024, 14336, 66560]`
**labels**: Array of labels matching byte windows,
Default: `['First TCP Segment', 'First Ethernet Packet', 'First TCP Roundtrip', 'First TCP Frame']`
##### `labels`
Array of labels matching byte windows,
Default: `['First TCP Segment', 'First Ethernet Packet', 'First TCP Roundtrip', 'First TCP Frame']`
**ssl**: Add SSL overhead (default: true)
##### `ssl`
Add SSL overhead (default: true)
**gzip**: GZIP the body (default: true)
##### `gzip`
GZIP the body (default: true)
**sslCost**: Estimated amount of bytes for SSL overhead (default: 40)
##### `sslCost`
Estimated amount of bytes for SSL overhead (default: 40)
**gzipLevel**: Compression level: 1-9. Defaults to Node's default gzip level
##### `gzipLevel`
Compression level: 1-9. Defaults to Node's default gzip level
#### result { total, fits, headers, body, emulatedSslSize, emulateGzip, gzipLevel }
#### `result`
**total**: Total estimated bytes sent along TCP connection for endpoint
**fits**: Relevant TCP constraint (First TCP Segment, First Ethernet Packet, First TCP Roundtrip, First TCP Frame or No target TCP constraints)
**headers**: Size of headers
**body**: Size of body (after gzipping, if enabled)
**emulatedSslSize**: Estimated size of SSL overhead (as set by `sslCost`)
**emulateGzip**: Whether GZIP was emulated (disabled with `noGzip`)
**gzipLevel**: The compression level applied, only added if `emulateGzip` is `true`
##### `total`
Total estimated bytes sent along TCP connection for endpoint
##### `fits`
Relevant TCP constraint (First TCP Segment, First Ethernet Packet, First TCP Roundtrip, First
TCP Frame or No target TCP constraints)
##### `headers`
Size of headers
##### `body`
Size of body (after gzipping, if enabled)
##### `emulatedSslSize`
Estimated size of SSL overhead (as set by `sslCost`)
##### `emulateGzip`
Whether GZIP was emulated (disabled with `noGzip`)
##### `gzipLevel`
The compression level applied, only added if `emulateGzip` is `true`
## CLI

@@ -89,2 +109,3 @@

## Acknowledgements
* [Yoshua Wuyts](https://github.com/yoshuawuyts)

@@ -91,0 +112,0 @@ * Sponsored by [nearForm](http://nearform.com)