Channels
Go Cqhttp
go-cqhttp channel plugin for OpenClaw - QQ bot integration via reverse WebSocket
Install
npm install
```
Configuration Example
servers:
- ws-reverse:
# If go-cqhttp runs on host (Linux):
universal: ws://192.168.x.1:8080/ws?access_token=your-secret-token
# If go-cqhttp runs on host (macOS/Windows):
# universal: ws://host.docker.internal:8080/ws
# If go-cqhttp runs in another container on same network:
# universal: ws://openclaw:8080/ws
README
# go-cqhttp Plugin for OpenClaw
QQ bot integration via go-cqhttp reverse WebSocket.
## Features
- โ
Reverse WebSocket server (go-cqhttp connects to OpenClaw)
- โ
Private message support
- โ
Group message support
- โ
Access token authentication
- โ
DM pairing/allowlist security
- โ
CQ code support (images, faces, mentions, shares)
## Quick Start
### 1. Install dependencies
```bash
cd /app/extensions/go-cqhttp
pnpm install
```
### 2. Configure OpenClaw
Add to your OpenClaw config:
```json5
{
channels: {
"go-cqhttp": {
accounts: {
"default": {
name: "QQ Bot",
host: "0.0.0.0", // In Docker, use 0.0.0.0
port: 8080,
accessToken: "your-secret-token", // optional but recommended
dmPolicy: "pairing"
}
}
}
}
}
```
**Docker ็จๆทๆณจๆ๏ผ** ๅฏๅจๅฎนๅจๆถๆ ๅฐ็ซฏๅฃ๏ผ
```bash
docker run -d -p 8080:8080 openclaw-image
```
### 3. Configure go-cqhttp
In go-cqhttp's `config.yml`:
```yaml
servers:
- ws-reverse:
# If go-cqhttp runs on host (Linux):
universal: ws://192.168.x.1:8080/ws?access_token=your-secret-token
# If go-cqhttp runs on host (macOS/Windows):
# universal: ws://host.docker.internal:8080/ws
# If go-cqhttp runs in another container on same network:
# universal: ws://openclaw:8080/ws
```
### 4. Start both services
```bash
# Start OpenClaw
openclaw gateway
# Start go-cqhttp
./go-cqhttp
```
## Project Structure
```
go-cqhttp/
โโโ openclaw.plugin.json # Plugin manifest
โโโ package.json # Dependencies
โโโ tsconfig.json # TypeScript config
โโโ index.ts # Plugin entry point
โโโ src/
โ โโโ schema.ts # Configuration schemas
โ โโโ runtime.ts # WebSocket server & API client
โ โโโ channel.ts # OpenClaw channel implementation
```
## Development
```bash
# Build
pnpm build
# Watch mode
pnpm dev
```
## Documentation
Full documentation: https://docs.openclaw.ai/channels/go-cqhttp
## License
Same as OpenClaw
channels
Comments
Sign in to leave a comment