Catalog npm
Back to packageRELEASE DETAILS

0.1.0

npm

@0x5278/wiretap

Low-level Node networking toolkit. Raw TCP/UDP, HTTP/1.1, instances, structured logging. No dependencies.

httplow-levelnetworkingproxysockstcptorudp
Published19 Aug 2026
Direct dependencies0
Transitive dependenciesNot calculated

README

Current package documentation

wiretap

npm version license node engine CI

Low-level Node networking toolkit. Raw TCP and UDP, an HTTP/1.1 client, named instances and structured logging. Zero dependencies, just the Node core (net, tls, dgram, http, zlib).

High-level clients like axios, got and fetch hide the parts of the stack that matter when you care about the wire. wiretap keeps them visible: header order, raw sockets, timeouts you control. SOCKS, Tor and identity management are next; the plan is in docs/ROADMAP.md.

Install

npm install @0x5278/wiretap

Quick start

const wiretap = require('@0x5278/wiretap');

// an instance carries headers and a named log scope
const api = wiretap.wiretap({
  name: 'api',
  headers: { 'x-api-key': 'secret' },
});

const res = await api.get('https://api.example.com/data');
console.log(res.status, res.body.toString());

// stateless client when you do not want instance semantics
const { HttpClient } = wiretap;
const res2 = await new HttpClient().post('https://api.example.com/thing', { a: 1 });

Responses resolve for any status code. Transport failures reject, with code set (ECONNREFUSED, ETIMEDOUT, ABORT_ERR).

Low level

const { TcpSocket, UdpSocket } = require('@0x5278/wiretap');

const sock = new TcpSocket({ host: 'example.com', port: 80, idleTimeout: 30000 });
sock.on('data', (chunk) => console.log(chunk.toString()));
await sock.connect();
sock.write('GET / HTTP/1.1\r\nHost: example.com\r\n\r\n');

TLS sockets work the same way, pass tls options to the constructor for a custom CA, SNI override or stricter verification.

API

exportwhat it is
wiretap(options)named instance factory, merges headers, exposes request helpers
HttpClientstateless HTTP/1.1 client with redirects, gzip/br, abort
TcpSocketraw TCP with optional TLS, connect and idle timeouts
UdpSocketraw UDP send and receive
createLoggerstructured JSON logs, secret redaction on by default
createInstancewhat wiretap() calls, exported if you want it directly

HTTP request options: url, method, headers (object or flat [k, v, ...] array to preserve order), body (string, Buffer, stream, or object which becomes JSON), timeout, redirects, decompress, signal (AbortController).

Docs

License

MIT, see LICENSE.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-P/87iI1qlcys5iTWrq16H2Cj/R8zUU4DH5ZNNf2066306E18i5HH5VXdTSYEOVki5EJG518YisCMX9JhFZTAdQ==",
  "shasum": "e03a1baf9680657dfcce9587453430bd41610599",
  "tarball": "https://registry.npmjs.org/@0x5278/wiretap/-/wiretap-0.1.0.tgz",
  "fileCount": 9,
  "unpackedSize": 22368,
  "attestations": {
    "url": "https://registry.npmjs.org/-/npm/v1/attestations/@0x5278%2fwiretap@0.1.0",
    "provenance": {
      "predicateType": "https://slsa.dev/provenance/v1"
    }
  },
  "signatures": [
    {
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
      "sig": "MEUCIDqgyl+mnWBQxFKQochWQl2XQ0BoNxakP1utvSzswzL2AiEAkFK4FDxm9n8hY7OA86rLvmD3p+O0YR88J7kcPs7+bDQ="
    }
  ]
}

Repository

PENDING
joeykoch1/wiretap

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:37 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:b847570cb77704ea250f5cfada3c6ad336564bbf2df433b58da9f9bb4d0931af

Other collected versions

View all collected versions →