feijx3

OpenQQ

feijx3

OpenQQ is a OneBot v11 bridge for QQ NT on Windows x64 and Linux (x64 / arm64) (JavaScript + C++, AGPL-3.0): it hooks sessions at the native module registration point `qq_magic_napi_register` instead of opening Electron's `--inspect` port, never edits files in the QQ install directory, and ships a WebUI plus Docker support.

v0.5.0
Published at
4d ago
73
Stars
1,394
Download
Synced at
4d ago

Latest release

v0.5.0Nov 22, 2026, 02:52 PM
Downloads slow? Switch the source anytime above

README

Project Overview

The usual way to turn QQ NT into a OneBot bot is opening Electron's debug port; OpenQQ takes another route: a C++ native bootstrap hooks the session where QQ registers native modules (qq_magic_napi_register), leaving --inspect closed and the install directory untouched. The Windows native part depends only on the system UCRT, while Linux preloads a bootstrap library via LD_PRELOAD and injects the session when wrapper.node loads.

Item Value
Platform Windows 10 / 11 x64; Linux x64 / arm64; Docker
Language Node.js / JavaScript + C++ bootstrap
Protocol OneBot v11
License AGPL-3.0

No --inspect, no edits inside the QQ install directory.

Key Features

  • OneBot v11 both ways: forward WebSocket server (Bearer header or access_token query auth, rate-limited on failures) and reverse WebSocket client (up to 8 targets, retrying every 3 s after drops once the session is ready); the heartbeat is fixed at 15 s and not configurable yet
  • Preflight checks: Windows scans the registry and common paths for QQ NT and parses the x64 PE export tables of QQNT.dll and wrapper.node; Linux probes paths such as /opt/QQ and parses ELF64 dynamic symbols to confirm N-API symbols like qq_magic_napi_register
  • Messaging and group management: text, CQ codes, mentions, emoji, images, voice, video, files, dice, rock-paper-scissors, quote replies; recall, kick, mute, mute-all, admin, group card, group name, leave, join and friend request handling, likes, plus group and member queries
  • WebUI: binds 127.0.0.1 by default with a per-run access key; a /setup wizard plus a console covering overview (sessions, throughput, connection state), per-session messaging, event stream, OneBot action debugging and logs
  • Docker: bundled Dockerfile and compose.yaml with Xvfb and optional noVNC for headless QR and slider login
  • Terminal: interactive mode with completion, history and /verbose, /clear, /quit; piped output or --json emits OneBot JSON Lines

Quick Start

git clone https://github.com/feijx3/OpenQQ.git
cd OpenQQ
npm install

Docker: docker compose up -d --build (see docs/docker.md).

System Requirements

Item Requirement
QQ QQ NT 9.x on Windows 10 / 11 x64 (tested 9.9.33-52230 and 9.9.37-54395) or official Linux QQ NT (default /opt/QQ)
Runtime Node.js >= 22
Build CMake and a C++17 compiler (LLVM-MinGW / MinGW + Ninja or Visual Studio on Windows; g++ / clang++ on Linux)

Release packages include prebuilt native components — no compiler needed.

Notes

  • Account risk: the README leads with a warning that this is unofficial, that hooking QQ may violate its licence terms, and that accounts can be restricted or banned — use it only on your own account and device for study
  • AGPL-3.0: network distribution and modified distribution must both follow the license
  • WebUI exposure: it listens locally by default; exposing it from a container requires --web-host 0.0.0.0 plus port mapping, so verify authentication at the same time

Release history

Sort