From ef4cdc6815f8f4c24648665b71c322764100ab50 Mon Sep 17 00:00:00 2001 From: yichere <3142438625@qq.com> Date: Sat, 18 Jan 2025 22:03:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?instruction:=E6=8F=90=E4=BE=9B=20Lagrange?= =?UTF-8?q?=20=E6=A0=B7=E4=BE=8B=E9=85=8D=E7=BD=AE=20=09modified:=20=20=20?= =?UTF-8?q?docs/deploy/platform-qq.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/deploy/platform-qq.md | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/docs/deploy/platform-qq.md b/docs/deploy/platform-qq.md index 12c1e4546..527cf53c3 100644 --- a/docs/deploy/platform-qq.md +++ b/docs/deploy/platform-qq.md @@ -194,6 +194,64 @@ Windows Server 2012 可能会缺少部分运行库,需要自行下载安装。 请按照 [Lagrange 手册](https://lagrangedev.github.io/Lagrange.Doc/Lagrange.OneBot/Config/)自行部署 Lagrange,并按照手册和自己的需求填写配置文件。 +::: warning Config + +海豹的反向 ws 连接仅连接 `ws://{HOST}:{PORT}/ws` 地址。 + +以下的 `appsettings.json` 适合海豹连接。 + +``` json + +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information", + }, + }, + "SignServerUrl": "https://sign.lagrangecore.org/api/sign", + "SignProxyUrl": "", + "Account": { + "Uin": 0, + "Password": "", + "Protocol": "Linux", + "AutoReconnect": true, + "GetOptimumServer": true, + }, + "Message": { + "IgnoreSelf": true, + "StringPost": false, + }, + "QrCode": { + "ConsoleCompatibilityMode": false, + }, + "Implementations": [ + { + "Type": "ReverseWebSocket", + "Host": "127.0.0.1", + "Port": 8100, + "Suffix": "/ws", + "ReconnectInterval": 5000, + "HeartBeatInterval": 5000, + "HeartBeatEnable": true, + "AccessToken": "", + }, + { + "Type": "ForwardWebSocket", + "Host": "127.0.0.1", + "Port": 8101, + "HeartBeatInterval": 5000, + "HeartBeatEnable": true, + "AccessToken": "", + }, + ], +} + +``` + +::: + #### 海豹连接 Lagrange 进入海豹 Web UI 的「账号设置」新增链接,按照自己的 Lagrange 配置文件选择 onebot11 账号类型,填写 QQ 号和「连接地址」。 From ba456a495e389ce447dc5834abee546d61259653 Mon Sep 17 00:00:00 2001 From: yichere <3142438625@qq.com> Date: Sun, 19 Jan 2025 18:06:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?instruction:=E6=9B=B4=E6=B8=85=E6=99=B0?= =?UTF-8?q?=E7=9A=84=E8=BF=9E=E6=8E=A5=E8=AF=B4=E6=98=8E=20=09modified:=20?= =?UTF-8?q?=20=20docs/deploy/platform-qq.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/deploy/platform-qq.md | 56 +++++++++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 7 deletions(-) diff --git a/docs/deploy/platform-qq.md b/docs/deploy/platform-qq.md index 527cf53c3..cf66985c9 100644 --- a/docs/deploy/platform-qq.md +++ b/docs/deploy/platform-qq.md @@ -200,6 +200,8 @@ Windows Server 2012 可能会缺少部分运行库,需要自行下载安装。 以下的 `appsettings.json` 适合海豹连接。 +> **正向** ws 连接 + ``` json { @@ -228,28 +230,68 @@ Windows Server 2012 可能会缺少部分运行库,需要自行下载安装。 }, "Implementations": [ { - "Type": "ReverseWebSocket", + "Type": "ForwardWebSocket", "Host": "127.0.0.1", - "Port": 8100, - "Suffix": "/ws", - "ReconnectInterval": 5000, + "Port": 8101, "HeartBeatInterval": 5000, "HeartBeatEnable": true, "AccessToken": "", + } + ], +} + + +``` + +按照以下配置登陆的 `Lagrange`,在海豹的 UI 中新增账号中,「账号类型」选择 `OneBot11 正向 WS`,连接地址填写 `ws://127.0.0.1:8101`。 + +>**反向** ws 连接 + +``` json + +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information", }, + }, + "SignServerUrl": "https://sign.lagrangecore.org/api/sign", + "SignProxyUrl": "", + "Account": { + "Uin": 0, + "Password": "", + "Protocol": "Linux", + "AutoReconnect": true, + "GetOptimumServer": true, + }, + "Message": { + "IgnoreSelf": true, + "StringPost": false, + }, + "QrCode": { + "ConsoleCompatibilityMode": false, + }, + "Implementations": [ { - "Type": "ForwardWebSocket", + "Type": "ReverseWebSocket", "Host": "127.0.0.1", - "Port": 8101, + "Port": 8100, + "Suffix": "/ws", + "ReconnectInterval": 5000, "HeartBeatInterval": 5000, "HeartBeatEnable": true, "AccessToken": "", - }, + } ], } + ``` +按照以下配置登陆的 `Lagrange`,在海豹的 UI 中新增账号中,「账号类型」选择 `OneBot11 反向 WS`,连接地址填写 `:8100`。 + ::: #### 海豹连接 Lagrange