napneko / napcat-docker Goto Github PK
View Code? Open in Web Editor NEWNapCat-Docker
NapCat-Docker
tcp 0 0 127.0.0.1:4310 0.0.0.0:* LISTEN 26/qq
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 26/qq
tcp6 0 0 :::3001 :::* LISTEN 26/qq
希望ws服务器可以自定义监听地址
downloadPath /root/.config/QQ/NapCat/temp
{
selfUin: '手动删除',
selfUid: 'u_r0-e5BSdgvyhDTDjgrq1Zg',
desktopPathConfig: { account_path: '/root/.config/QQ' },
clientVer: '9.9.9-22578',
a2: '',
d2: '',
d2Key: '',
machineId: '',
platform: 3,
platVer: '5.15.0-91-generic',
appid: '537213710',
rdeliveryConfig: {
appKey: '',
systemId: 0,
appId: '',
logicEnvironment: '',
platform: 3,
language: '',
sdkVersion: '',
userId: '',
appVersion: '',
osVersion: '',
bundleId: '',
serverUrl: '',
fixedAfterHitKeys: [ '' ]
},
defaultFileDownloadPath: '/root/.config/QQ/NapCat/temp',
deviceInfo: {
guid: '17755563-a24d-4005-aa53-1a462e014e70',
buildVer: '3.2.7-22868',
localId: 2052,
devName: '09f5266a88e0',
devType: 'Linux',
vendorName: '',
osVer: '5.15.0-91-generic',
vendorOsName: 'Linux',
setMute: false,
vendorType: 0
},
deviceConfig: '{"appearance":{"isSplitViewMode":true},"msg":{}}'
}
linux-bugly: init bugly ...
InitBuglyManager
SetLogger
fatalSetup
GetDllPath: 33
pub_key_path: /opt/QQ/resources/app/pub.key
[BuglyManager.cpp][InitBuglyManager][212]InitBuglyManager path: /root/.config/QQ/crash_files/
BuglyManager/opt/QQ/resources/app/pub.key
[BuglyService.cpp][CreatDir][70]!!!begin to CreatDir 0: /root/.config/QQ/crash_files/
[BuglyService.cpp][registBugly][589]set signal stack
[BuglyService.cpp][registSignalHandler][520]regist native handler
registBugly/opt/QQ/resources/app/pub.key
[BuglyService.cpp][setParam][618]setParam, key:appVersion, value:9.9.9-22578..
setParam/opt/QQ/resources/app/pub.key
StartWithOptions s/opt/QQ/resources/app/pub.key
StartWithOptions e/opt/QQ/resources/app/pub.key
PostDelayedTask s/opt/QQ/resources/app/pub.key
PostDelayedTask e/opt/QQ/resources/app/pub.key
linux-bugly: init bugly done.
ob11 ready
get config {
httpPort: 3000,
httpPostUrls: [ '' ],
httpSecret: '',
wsPort: 3001,
wsReverseUrls: [ 'WS_URLS' ],
enableHttp: false,
enableHttpPost: false,
enableWs: false,
enableWsReverse: true,
messagePostFormat: 'array',
reportSelfMessage: false,
debug: false,
enableLocalFile2Url: false,
heartInterval: 60000,
token: ''
}
开始连接反向ws WS_URLS
SyntaxError: Invalid URL: WS_URLS
at initAsClient (/root/node_modules/ws/lib/websocket.js:692:13)
at new WebSocket (/root/node_modules/ws/lib/websocket.js:85:7)
at x5.connect (/root/napcat.cjs:3:387729)
at new x5 (/root/napcat.cjs:3:385448)
at /root/napcat.cjs:3:388899
at new Promise (<anonymous>)
at r5.start (/root/napcat.cjs:3:388735)
at p5.onReady (/root/napcat.cjs:3:407062)
at /root/napcat.cjs:3:106665
at new Promise (<anonymous>)
ob11 msg listener added
ob11 buddy listener added
ob11 group listener added
login success
[BuglyManager.cpp][UploadBugly][107]!!!in UploadBugly.
[NativeCrashHandler.cpp][getCrashDetailBeanFromRecord][52]!!!! in NativeCrashHandler getCrashDetailBeanFromRecord, open file error!!!,dumpFilePath:/root/.config/QQ/crash_files/rqd_record.eup.
[NativeCrashHandler.cpp][uploadCrashEvent][331]get null crashDetailBean, return!
ws地址为
ws://172.17.0.4:8080/onebot/v11/ws
当在宿主机中直接clone napcatqq使用sh脚本启动时,没有报错(已配置反向ws地址)
version: "3"
services:
napcat:
environment:
- ACCOUNT=<机器人qq>
- HTTP_ENABLE=true
- HTTP_POST_ENABLE=true
- HTTP_URLS="http://192.168.3.8:5140/onebot"
ports:
- 3000:3000
container_name: napcat
network_mode: bridge
image: mlikiowa/napcat-docker:latest
使用上述docker-compose启动后,
在宿主机上 发送
curl --request POST
--url http://127.0.0.1:3000/send_msg
--header 'Content-Type: application/json'
--header 'content-type: application/json'
--data '{
"message_type":"private",
"user_id": ******,
"message":"早上好"
}'
返回:curl: (56) Recv failure: Connection reset by peer
麻烦作者大大看看
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.