feat(onebot): support main-port reverse and forward WebSocket connections

This commit is contained in:
Hyu
2026-10-12 12:28:01 +08:00
parent 8ae182dbd7
commit 9b273d3fdc
18 changed files with 722 additions and 134 deletions
@@ -288,6 +288,10 @@ const BotForm = forwardRef<BotFormHandle, BotFormProps>(function BotForm(
() => ({
bot_uuid: initBotId,
webhook_url: webhookUrl,
onebot_ws_url: webhookUrl
? webhookUrl.replace(/^http/, 'ws').replace(/\/$/, '') +
'/onebot/v11/ws'
: '',
extra_webhook_url: extraWebhookUrl,
adapter_config: { title: embedTitle },
outbound_ips: systemInfo.outbound_ips,
+4
View File
@@ -1823,6 +1823,10 @@ function StepBotConfig({
systemContext={{
is_wizard: true,
webhook_url: webhookUrl,
onebot_ws_url: webhookUrl
? webhookUrl.replace(/^http/, 'ws').replace(/\/$/, '') +
'/onebot/v11/ws'
: '',
extra_webhook_url: extraWebhookUrl,
outbound_ips: systemInfo.outbound_ips,
}}