netutils-plugin-ws

WebSocket diagnostics plugin for netutils


Keywords
network, websocket, diagnostics, netutils, plugins, rust
License
MIT

Documentation

netutils plugins

Official external plugins for netutils-cli.

The core CLI discovers plugins as external subcommands. For example:

netutils install chrome-proxy
netutils chrome-proxy https://www.google.com/generate_204 --proxy socks5://127.0.0.1:7890
netutils install mcp
netutils mcp https://example.com/mcp
netutils mcp https://example.com/mcp --tool tabs --args '{"action":"list"}'
netutils install sse
netutils sse https://example.com/events
netutils install ws
netutils ws wss://echo.websocket.events --message ping
netutils install subdomain
netutils subdomain example.com

During local development, install a plugin from a local checkout:

cd <path-to-netutils-cli>
cargo run -- install chrome-proxy --path <path-to-netutils-plugins>/plugins/chrome-proxy --force
cargo run -- chrome-proxy https://www.google.com/generate_204 --proxy socks5://127.0.0.1:7890
cargo run -- install mcp --path <path-to-netutils-plugins>/plugins/mcp --force
cargo run -- mcp https://example.com/mcp
cargo run -- install sse --path <path-to-netutils-plugins>/plugins/sse --force
cargo run -- sse https://example.com/events
cargo run -- install ws --path <path-to-netutils-plugins>/plugins/ws --force
cargo run -- ws wss://echo.websocket.events --message ping
cargo run -- install subdomain --path <path-to-netutils-plugins>/plugins/subdomain --force
cargo run -- subdomain example.com

See PLUGIN_DEVELOPMENT.md for plugin layout, command conventions, testing, and release guidance.

SDK

This workspace includes netutils-plugin-sdk, a small helper crate for plugin authors. It provides shared output primitives such as OutputMode, JSON printing, status text, color handling, and a small table renderer. Plugins still own their command-specific human output and JSON report schema.

Plugins

Plugin Binary Platforms Description
chrome-proxy netutils-chrome-proxy windows, linux, macos Chrome proxy-chain diagnostics through a local bridge
mcp netutils-mcp windows, linux, macos MCP Streamable HTTP diagnostics
sse netutils-sse windows, linux, macos Server-Sent Events diagnostics
subdomain netutils-subdomain windows, linux, macos Passive subdomain discovery from public sources
ws netutils-ws windows, linux, macos WebSocket diagnostics

Chrome Proxy plugin

The Chrome Proxy plugin starts a local HTTP proxy bridge, launches Chrome with --proxy-server pointing at that bridge, and applies --host-resolver-rules so normal hostnames are not resolved by the local browser process.

Examples:

netutils chrome-proxy https://www.google.com/generate_204 --proxy socks5://127.0.0.1:7890
netutils chrome-proxy https://ipinfo.io --proxy http://user:pass@127.0.0.1:8080
netutils chrome-proxy https://www.youtube.com --proxy socks5h://127.0.0.1:7890 --show --wait 30

MCP plugin

The MCP plugin tests Streamable HTTP servers by running:

  • initialize
  • notifications/initialized
  • tools/list by default
  • optional tools/call
  • optional GET server-to-client SSE listen stream

Examples:

netutils mcp https://example.com/mcp
netutils mcp https://example.com/mcp -H "Authorization: Bearer xxx"
netutils mcp https://example.com/mcp --protocol-version 2025-11-25 --listen
netutils mcp https://example.com/mcp --tool tabs --args '{"action":"list"}'
netutils mcp https://example.com/mcp --tool search --args '{"query":"netutils"}' --require-tool

Options for calling a tool:

Option Description
--tool <NAME> Calls one MCP tool with tools/call after initialization
--args <JSON> JSON object passed as params.arguments; defaults to {}
--require-tool Calls the tool only if it appears in tools/list
--no-tools Skips tools/list; cannot be combined meaningfully with --require-tool

The plugin accepts both application/json and text/event-stream JSON-RPC responses. JSON output includes the raw tools/call response under tool_call.

SSE plugin

The SSE plugin connects to a text/event-stream endpoint and parses event, id, retry, and data fields.

Examples:

netutils sse https://example.com/events
netutils sse https://example.com/events -H "Authorization: Bearer xxx"
netutils sse https://example.com/events --max-events 10 --max-seconds 60
netutils sse https://example.com/events --proxy http://127.0.0.1:7897

WebSocket plugin

The WebSocket plugin performs a WebSocket handshake, sends optional text messages, and receives the first messages.

Examples:

netutils ws wss://echo.websocket.events
netutils ws wss://echo.websocket.events --message ping
netutils ws https://example.com/socket -H "Authorization: Bearer xxx"
netutils websocket wss://echo.websocket.events --message ping

Subdomain plugin

The Subdomain plugin discovers names below a domain from public certificate transparency logs. It is passive discovery, not a guaranteed full DNS zone dump.

Examples:

netutils subdomain example.com
netutils subdomain example.com --max 100
netutils subdomain example.com --include-wildcards
netutils --json subdomain example.com

# Route the passive source lookups through a proxy, or force direct access
netutils subdomain example.com --proxy socks5h://127.0.0.1:1080
netutils subdomain example.com --no-proxy

The report records which proxy was selected, with credentials redacted. Without --proxy, the plugin honors the proxy forwarded by the core and then the standard HTTPS_PROXY/NO_PROXY environment variables; --no-proxy forces direct access.

Output Conventions

All plugins accept --json for a single machine-readable JSON value on stdout.

Plugins with colored human output also accept --color <auto|always|never> and honor NO_COLOR. Color is resolved the same way as in the core CLI, so JSON output is always plain text and redirected output carries no ANSI escapes. When dispatched by the core, the plugin uses the color decision the core already made, which means netutils --color never <plugin> works end to end.

See the color and proxy contracts in PLUGIN_DEVELOPMENT.md for the exact precedence rules.