
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@mtop-devtools/cloud-connector
Advanced tools
Cloud connector for Mtop DevTools — bridges cloud WebSocket server to local native-host
本地连接器,用于将本地的 native-host 通过 WebSocket 连接到云端 Server。
npm install -g @mtop-devtools/cloud-connector
# 或
pnpm add -g @mtop-devtools/cloud-connector
mtop-devtools-cloud-connector <server-url> [options]
参数:
server-url - 云端 WebSocket Server 地址(包含 token,如 ws://host:port/ws?token=xxx)选项:
--heartbeat <seconds> - 心跳间隔(默认 30 秒)--reconnect <ms> - 重连间隔(默认 5000 毫秒)--max-reconnect <n> - 最大重连次数,-1 表示无限(默认 -1)示例:
# 连接到本地测试服务器
mtop-devtools-cloud-connector "ws://localhost:8080/ws?token=xxx"
# 连接到云端服务器
mtop-devtools-cloud-connector "wss://cloud.example.com/ws?token=xxx"
# 自定义心跳和重连配置
mtop-devtools-cloud-connector "ws://localhost:8080/ws?token=xxx" --heartbeat 60 --max-reconnect 10
import { CloudConnector } from '@mtop-devtools/cloud-connector';
const connector = new CloudConnector({
serverUrl: 'wss://cloud.example.com/ws?token=xxx',
heartbeatInterval: 30,
reconnectInterval: 5000,
maxReconnectAttempts: -1,
});
connector.connect();
// 优雅关闭
process.on('SIGINT', () => {
connector.disconnect();
process.exit(0);
});
安装 @mtop-devtools/native-host
npm install -g @mtop-devtools/native-host
或使用本项目的 monorepo 构建产物。
确保 native-host 已初始化
mtop-devtools-native-host --init
确保 Chrome 浏览器正在运行,且:
chrome://inspect/#remote-debugging 启用远程调试(Chrome 145+)云端 Agent
↓
@mtop-devtools/cloud-client
↓
@mtop-devtools/cloud-server
↓ (WebSocket)
@mtop-devtools/cloud-connector (本进程)
↓ (Unix Socket)
@mtop-devtools/native-host
↓
Chrome Extension / CDP
FAQs
Cloud connector for Mtop DevTools — bridges cloud WebSocket server to local native-host
The npm package @mtop-devtools/cloud-connector receives a total of 40 weekly downloads. As such, @mtop-devtools/cloud-connector popularity was classified as not popular.
We found that @mtop-devtools/cloud-connector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.