@buoy-gg/network

中文文档
7.0.87发布于 2026/11/07TypeScriptESM + CJS近 30 天下载 3.8万

In-app network inspector for React Native — requests, responses, timing & errors live, with GraphQL operation parsing. Part of Buoy devtools.

原始使用文档
文档目录5 节
  1. Install
  2. Sockets
  3. Slow links
  4. App link state
  5. MCP and Desktop

@buoy-gg/network

Inspect HTTP requests captured through your React Native app's global fetch and XMLHttpRequest hooks. Open a request to see its URL, status, headers, timing and captured body.

Network guide  ·  buoy.gg  ·  All tools

npm version npm downloads

Watch the Network film on buoy.gg

Buoy hides its own cloud settings calls from the list.

Install

npm install @buoy-gg/core @buoy-gg/network

Render <FloatingDevTools /> once in your app root and Network appears in the menu. Requests sent through a separate native transport are not captured.

Buoy keeps its own web calls out of this view. App calls still show when they use the same files.

Sockets

Open ⋯ → Sockets to see each WebSocket your app opens. You see each message, sent and got, newest first. A request shows its reply and how long it took. A row turns red when Buoy finds a problem. One example is a request with no reply. Another is a socket that drops again and again.

Tricks need Pro. They push a fake server message into your app. They can also drop, freeze or block the socket. Your app's real code handles each one. Buoy hides tokens and passwords. It does this before it keeps a message.

The MCP tools are get_sockets and socket_action. See the Sockets guide.

Open ⋯ → Speed and link state in Network. The floating strip stays on while you test. On Android, drag by the grip while you edit. Tap Edit to show the controls, or Done to hide them. Choose Slow 3G, Slow 4G, Fast 4G, or Offline. The old Slow and Very slow choices just add waits.

Down caps pace bytes to the app in JS. Up caps wait before send based on body bytes. For gzip, down caps count unpacked body bytes. Upload time is simulated. Neither cap paces the socket. Caps apply to each call. They use global fetch and RN XHR. Text, bytes and Blob uploads have known sizes. FormData adds a wait for the parts we can size. This includes text, bytes, Blob, and files with a size. Unknown parts use just the start wait, then pass through. The count skips headers and the bytes between fields. Streams use just that wait. We do not read them first. The list, detail, and MCP show each cap gap.

Native images, native SDKs and file transfers stay real. WebSocket stays real too, except in Offline. Direct expo/fetch imports and saved fetch refs may bypass hooks. Local file reads and Buoy's own web calls stay real.

The chip stays on when you close the tool. No throttling clears both speed and app link state. App reload clears them too. No throttling adds no byte wrapper or cap timer. Normal capture still has its own cost. In a release build, these controls need a paid plan and the Buoy menu on screen.

Load the hook before app imports in your dev entry:

import '@buoy-gg/network/netinfo';
// Or, if your app uses Expo Network:
import '@buoy-gg/network/expo-network';

Each hook needs its peer in the app already. Core does not load these peers. It adds no native code. Late setup shows a gap. Move the hook, then reload. NetInfo 12 and Expo Network 56 are the tested peers.

Choose Real link, Offline, Wi-Fi, Cellular, or No internet. Follow speed sets Offline with the Offline speed choice. All other speed choices use the real link state. No internet reports Wi-Fi with no internet access. The radio and web calls do not change. Restore sends the latest real state to the app.

NetInfo covers fetch, refresh, addEventListener, and useNetInfo. Its isolated useNetInfoInstance hook is not a supported path. Expo covers getNetworkStateAsync, addNetworkStateListener, and useNetworkState. IP address and airplane-mode reads stay real.

MCP and Desktop

Both views send changes to the selected device. MCP uses network_conditions with action: 'get' or 'set'. Set accepts profile, connection, or both. The reply shows rates, hook support, and what they affect. If the link is lost, the view says so.

The Network guide covers setup, what it captures and its limits. New to Buoy? Start with the Quick start.


Part of Buoy, developer tools that live inside your app. Proprietary software. © Buoy LLC. Terms

版本与发布记录

@buoy-gg/network 共发布 120 个版本,首次发布于 2026/01/04;过去 12 个月发布了 120 个版本。

版本发布日期距今
7.0.87latest2026/11/071 天前
7.0.862026/11/062 天前
7.0.852026/11/053 天前
7.0.842026/11/035 天前
7.0.832026/11/035 天前
7.0.822026/11/036 天前

其他发布通道:beta → 2.1.4-beta.2。

关于 @buoy-gg/network 的常见问题

@buoy-gg/network 是什么?

In-app network inspector for React Native — requests, responses, timing & errors live, with GraphQL operation parsing. Part of Buoy devtools.

如何安装 @buoy-gg/network?

在项目目录运行 npm install @buoy-gg/network,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@buoy-gg/network 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@buoy-gg/network 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@buoy-gg/network 可以商用吗?

@buoy-gg/network 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@buoy-gg/network 的下载量有多少?

根据 npm 官方下载统计,@buoy-gg/network 在 2026/10/09 – 2026/11/07 这 30 天内被下载 37,576 次,日均约 1,253 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@buoy-gg/network 还在维护吗?

最新版本 7.0.87 发布于 2026/11/07(1 天前);至今共发布 120 个版本,其中过去 12 个月发布了 120 个;首次发布于 2026/01/04。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。