{"_id":"@bun-win32/fwpuclnt","_rev":"4-4dc4248ee943af8581156b682e7514f9","name":"@bun-win32/fwpuclnt","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/fwpuclnt","version":"1.0.0","keywords":["bun","ffi","win32","windows","fwpuclnt","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/fwpuclnt@1.0.0","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"b5b9b1c9e852fe134abc4df28b1dd951aed617d3","tarball":"https://registry.npmjs.org/@bun-win32/fwpuclnt/-/fwpuclnt-1.0.0.tgz","fileCount":6,"integrity":"sha512-M6O0kFSQSCHBcXwM5af9VxSspekNDj+lmDyw78B1iS4gSu/6LFp0k3P2W2XA53yTmXSmSKNkqb7CUgB5Fty60A==","signatures":[{"sig":"MEUCIQDq8ntnfmKgsMHBt1fN4BaIojJk5SS/bJySOB9TEZTsYQIgM/cECIyrzfJq5CMRZjOPInpKiSd0MEgRGt7L0g7vqFM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":111599},"main":"./index.ts","type":"module","module":"index.ts","shasum":"b5b9b1c9e852fe134abc4df28b1dd951aed617d3","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:filter-radar":"bun ./example/filter-radar.ts","example:bfe-inventory":"bun ./example/bfe-inventory.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-M6O0kFSQSCHBcXwM5af9VxSspekNDj+lmDyw78B1iS4gSu/6LFp0k3P2W2XA53yTmXSmSKNkqb7CUgB5Fty60A==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/fwpuclnt"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 FWPUCLNT bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/fwpuclnt_1.0.0_1780539751070_0.09869642572532067","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bun-win32/fwpuclnt","version":"1.0.1","keywords":["bun","ffi","win32","windows","fwpuclnt","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/fwpuclnt@1.0.1","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"8d236eb8fa7327cf53aecb383cacce4ec98cd6dc","tarball":"https://registry.npmjs.org/@bun-win32/fwpuclnt/-/fwpuclnt-1.0.1.tgz","fileCount":6,"integrity":"sha512-8gZYMdza48RgVfAJB3VIHESqbI3b8zd56FnuXb9Wga3JTC+HjYja1kIYzuWQV73ENN8pcC5aolY6mbgLrQ1BNQ==","signatures":[{"sig":"MEUCIQDftSdYSeN0GhK8ybA6QCZ7brWckaoGKDd6hbfwglgAZQIgdkyHJSuEuTe6VveKJrr7P2pKYxbCfR6Famlyp5A1vL0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":111604},"main":"./index.ts","type":"module","module":"index.ts","shasum":"8d236eb8fa7327cf53aecb383cacce4ec98cd6dc","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:filter-radar":"bun ./example/filter-radar.ts","example:bfe-inventory":"bun ./example/bfe-inventory.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-8gZYMdza48RgVfAJB3VIHESqbI3b8zd56FnuXb9Wga3JTC+HjYja1kIYzuWQV73ENN8pcC5aolY6mbgLrQ1BNQ==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/fwpuclnt"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 FWPUCLNT bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.4"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/fwpuclnt_1.0.1_1781130835056_0.21278460486751571","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/fwpuclnt","version":"2.0.0","keywords":["bun","ffi","win32","windows","fwpuclnt","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/fwpuclnt@2.0.0","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"dacbdad08d0477e19178d34dcb071f950b82a063","tarball":"https://registry.npmjs.org/@bun-win32/fwpuclnt/-/fwpuclnt-2.0.0.tgz","fileCount":6,"integrity":"sha512-8/hJiYXXX2cd65u7FSr20cI6H2r5mJkahVPWyLSKRPyzoq1oR/XhvYrllydwvPBh88Ppo/gnArd3bBPUzBzFxw==","signatures":[{"sig":"MEYCIQCc0COdcbYSjI36SUpvGr8WpfsVSbh3XmS4UVYxomPguwIhAJn4e9f497dFERhzo+uyRdX9NDjfpcx0EMrBylNex5mM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":115786},"main":"./index.ts","type":"module","module":"index.ts","shasum":"dacbdad08d0477e19178d34dcb071f950b82a063","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:filter-radar":"bun ./example/filter-radar.ts","example:bfe-inventory":"bun ./example/bfe-inventory.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-8/hJiYXXX2cd65u7FSr20cI6H2r5mJkahVPWyLSKRPyzoq1oR/XhvYrllydwvPBh88Ppo/gnArd3bBPUzBzFxw==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/fwpuclnt"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 FWPUCLNT bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","dependencies":{"@bun-win32/core":"2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/fwpuclnt_2.0.0_1782435312942_0.722800689322775","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"author":"Stev Peifer <stev.p@outlook.com>","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dependencies":{"@bun-win32/core":"2.0.1"},"description":"Zero-dependency, zero-overhead Win32 FWPUCLNT bindings for Bun (FFI) on Windows.","devDependencies":{"@types/bun":"latest"},"exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/fwpuclnt","peerDependencies":{"typescript":"^5"},"private":false,"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/fwpuclnt"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bun","ffi","win32","windows","fwpuclnt","bindings","typescript","dll"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:bfe-inventory":"bun ./example/bfe-inventory.ts","example:filter-radar":"bun ./example/filter-radar.ts"},"_id":"@bun-win32/fwpuclnt@2.0.1","_integrity":"sha512-YgcbsmCLJr4lPOmizHr2YE6boSJSnXAzF49IckAh4Jz8LOXgbPi9iaWPIkYmcfOYKA4eFnumnlNUuVpoSpBRDQ==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"f9be84a8569bdea56e7a2dbb675b6333d8595f90","dist":{"integrity":"sha512-YgcbsmCLJr4lPOmizHr2YE6boSJSnXAzF49IckAh4Jz8LOXgbPi9iaWPIkYmcfOYKA4eFnumnlNUuVpoSpBRDQ==","shasum":"f9be84a8569bdea56e7a2dbb675b6333d8595f90","tarball":"https://registry.npmjs.org/@bun-win32/fwpuclnt/-/fwpuclnt-2.0.1.tgz","fileCount":6,"unpackedSize":115786,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDVOQeRkIKn1VX3+ZT4xJL2Om+MN+NQRVE9j0xbkd9gDQIhAN/klZmbEI72hXrCcX+jwz9+HWCxJ1vduwb50ftdqSmS"}]},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"directories":{},"maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fwpuclnt_2.0.1_1782437774909_0.8887491786341513"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-04T02:22:30.926Z","modified":"2026-06-26T01:36:15.172Z","1.0.0":"2026-06-04T02:22:31.191Z","1.0.1":"2026-06-10T22:33:55.198Z","2.0.0":"2026-06-26T00:55:13.062Z","2.0.1":"2026-06-26T01:36:15.036Z"},"bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","homepage":"https://github.com/ObscuritySRL/bun-win32#readme","keywords":["bun","ffi","win32","windows","fwpuclnt","bindings","typescript","dll"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/fwpuclnt"},"description":"Zero-dependency, zero-overhead Win32 FWPUCLNT bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/fwpuclnt\n\nZero-dependency, zero-overhead Win32 FWPUCLNT (Windows Filtering Platform) bindings for [Bun](https://bun.sh) on Windows.\n\n## Overview\n\n`@bun-win32/fwpuclnt` exposes the `fwpuclnt.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `Fwpuclnt`, which lazily binds native symbols on first use. You can optionally preload a subset or all symbols up-front via `Preload()`.\n\nFWPUCLNT is the user-mode Windows Filtering Platform management surface: open a session against the Base Filtering Engine (`FwpmEngineOpen0`), run explicit transactions (`FwpmTransactionBegin0` / `FwpmTransactionCommit0` / `FwpmTransactionAbort0`), and create, delete, query, enumerate, and subscribe to changes for every WFP object class — providers, provider contexts, sub-layers, layers, callouts, and filters. It also covers IPsec SA / tunnel / key-manager management, IKE/AuthIP security associations, IPsec DoS protection, ALE endpoint enumeration, net-event diagnostics, vSwitch events, dynamic keyword and system-port tracking, and the Winsock secure-socket extensions (`WSASetSocketSecurity`, `WSAQuerySocketSecurity`, …). All 199 documented `fwpmu.h` / `fwpsu.h` / `ws2tcpip.h` exports are bound.\n\nThe bindings are strongly typed for a smooth DX in TypeScript.\n\n## Features\n\n- [Bun](https://bun.sh)-first ergonomics on Windows 10/11.\n- Direct FFI to `fwpuclnt.dll` (filter engine, providers, sub-layers, layers, callouts, filters, IPsec/IKE SAs, net-event diagnostics, secure sockets).\n- In-source docs in `structs/Fwpuclnt.ts` with links to Microsoft Docs.\n- Lazy binding on first call; optional eager preload (`Fwpuclnt.Preload()`).\n- No wrapper overhead; calls map 1:1 to native APIs.\n- Strongly-typed Win32 aliases and enums (see `types/Fwpuclnt.ts`).\n\n## Requirements\n\n- [Bun](https://bun.sh) runtime\n- Windows 10 or later\n- Most Base Filtering Engine reads/writes require an **elevated** process.\n\n## Installation\n\n```sh\nbun add @bun-win32/fwpuclnt\n```\n\n## Quick Start\n\n```ts\nimport Fwpuclnt, { RPC_C_AUTHN_WINNT } from '@bun-win32/fwpuclnt';\n\nconst ERROR_SUCCESS = 0;\n\n// Open a session against the Base Filtering Engine.\nconst engineHandleBuf = Buffer.alloc(8);\nif (Fwpuclnt.FwpmEngineOpen0(null, RPC_C_AUTHN_WINNT, null, null, engineHandleBuf.ptr) === ERROR_SUCCESS) {\n  const engineHandle = engineHandleBuf.readBigUInt64LE(0);\n\n  // Enumerate every installed filter using the documented enum pattern.\n  const enumHandleBuf = Buffer.alloc(8);\n  Fwpuclnt.FwpmFilterCreateEnumHandle0(engineHandle, null, enumHandleBuf.ptr);\n  const enumHandle = enumHandleBuf.readBigUInt64LE(0);\n\n  const entries = Buffer.alloc(8); // receives a DLL-allocated array pointer\n  const numReturned = Buffer.alloc(4);\n  Fwpuclnt.FwpmFilterEnum0(engineHandle, enumHandle, 512, entries.ptr, numReturned.ptr);\n  console.log('Filters in this batch:', numReturned.readUInt32LE(0));\n\n  if (entries.readBigUInt64LE(0) !== 0n) Fwpuclnt.FwpmFreeMemory0(entries.ptr); // free DLL memory\n  Fwpuclnt.FwpmFilterDestroyEnumHandle0(engineHandle, enumHandle);\n  Fwpuclnt.FwpmEngineClose0(engineHandle); // always pair with FwpmEngineOpen0\n}\n```\n\n> [!NOTE]\n> AI agents: see `AI.md` for the package binding contract and source-navigation guidance. It explains how to use the package without scanning the entire implementation.\n\n## Examples\n\nRun the included examples:\n\n```sh\nbun run example/bfe-inventory.ts\nbun run example/filter-radar.ts\n```\n\n## Notes\n\n- Either rely on lazy binding or call `Fwpuclnt.Preload()`.\n- Most functions return a Win32 / `FWP_E_*` status (`0` = `ERROR_SUCCESS`); `FwpmFreeMemory0` returns `void`.\n- `FwpmEngineOpen0` returns an engine handle via an out-parameter; always release it with `FwpmEngineClose0`.\n- Enumeration is a three-call pattern: `*CreateEnumHandle0` → `*Enum0` (paged) → `*DestroyEnumHandle0`. `*Enum0` allocates the result array in the DLL — free it with `FwpmFreeMemory0`.\n- Reading or modifying the Base Filtering Engine generally requires elevation; non-elevated calls return `ERROR_ACCESS_DENIED` — the binding still round-trips correctly.\n- Windows only. Bun runtime required.\n- **SAL types & naming:** nullability is in the **type** — `Optional<T>` (formally optional, SAL `_*opt_`) and `Nullable<T>` (plain `[in]`/`[out]` the docs say can be NULL), the null sentinel derived from `T` (`null` for pointers `LP*`/`P*`, `0n` for handles/by-value addresses); direction is in the **parameter name** — `_out` (`_Out_`), `_in_out` (`_Inout_`), `_In_` bare. See `AI.md` and the repo `AGENTS.md`.\n","readmeFilename":"README.md"}