feat: http与ws允许监听同一端口,快速登录允许自动选择QQ号,允许禁用webUI

This commit is contained in:
挂神
2024-07-22 18:41:31 +08:00
parent 0efdffd857
commit f7bdc35ed6
6 changed files with 69 additions and 18 deletions

View File

@@ -73,7 +73,11 @@ export class NapCatOnebot11 {
ob11HTTPServer.start(ob11Config.http.port, ob11Config.http.host);
}
if (ob11Config.ws.enable) {
ob11WebsocketServer.start(ob11Config.ws.port, ob11Config.ws.host);
if (ob11Config.http.port == ob11Config.ws.port && ob11Config.http.host == ob11Config.ws.host && ob11HTTPServer.server) {
ob11WebsocketServer.start(ob11HTTPServer.server);
} else {
ob11WebsocketServer.start(ob11Config.ws.port, ob11Config.ws.host);
}
}
if (ob11Config.reverseWs.enable) {
ob11ReverseWebsockets.start();