diff --git a/internal/sdk/message/bark.go b/internal/sdk/message/bark.go index 546e1fb..f93a849 100644 --- a/internal/sdk/message/bark.go +++ b/internal/sdk/message/bark.go @@ -18,6 +18,18 @@ import ( "golang.org/x/net/proxy" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type barkResponse struct { Code int `json:"code"` Message string `json:"message"` diff --git a/internal/sdk/message/custom.go b/internal/sdk/message/custom.go index 3269a6c..65f1731 100644 --- a/internal/sdk/message/custom.go +++ b/internal/sdk/message/custom.go @@ -7,6 +7,18 @@ import ( "time" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type CustomWebhook struct { Webhook string Body string diff --git a/internal/sdk/message/dtalk.go b/internal/sdk/message/dtalk.go index 4eef9cb..76d8dba 100644 --- a/internal/sdk/message/dtalk.go +++ b/internal/sdk/message/dtalk.go @@ -12,6 +12,18 @@ import ( "time" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type response struct { Code int `json:"errcode"` Msg string `json:"errmsg"` diff --git a/internal/sdk/message/email.go b/internal/sdk/message/email.go index f00b79e..9bcd97c 100644 --- a/internal/sdk/message/email.go +++ b/internal/sdk/message/email.go @@ -6,6 +6,18 @@ import ( "gopkg.in/gomail.v2" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type EmailMessage struct { Server string Port int diff --git a/internal/sdk/message/feishu.go b/internal/sdk/message/feishu.go index 3f183ff..67f69bb 100644 --- a/internal/sdk/message/feishu.go +++ b/internal/sdk/message/feishu.go @@ -13,6 +13,18 @@ import ( "time" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type feishuResponse struct { Code int `json:"code"` Msg string `json:"msg"` diff --git a/internal/sdk/message/gotify.go b/internal/sdk/message/gotify.go index 6befe76..fd2b30d 100644 --- a/internal/sdk/message/gotify.go +++ b/internal/sdk/message/gotify.go @@ -9,6 +9,18 @@ import ( "net/url" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type gotifyResponse struct { Id int `json:"id"` Message string `json:"message"` diff --git a/internal/sdk/message/ntfy.go b/internal/sdk/message/ntfy.go index 4d229ad..e994596 100644 --- a/internal/sdk/message/ntfy.go +++ b/internal/sdk/message/ntfy.go @@ -8,6 +8,18 @@ import ( "net/http" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type Ntfy struct { Url string Topic string diff --git a/internal/sdk/message/pushme.go b/internal/sdk/message/pushme.go index 680742f..4d98d52 100644 --- a/internal/sdk/message/pushme.go +++ b/internal/sdk/message/pushme.go @@ -8,6 +8,18 @@ import ( "strings" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type PushMe struct { PushKey string URL string diff --git a/internal/sdk/message/pushplus.go b/internal/sdk/message/pushplus.go index 958430d..cb497f9 100644 --- a/internal/sdk/message/pushplus.go +++ b/internal/sdk/message/pushplus.go @@ -8,6 +8,18 @@ import ( "net/http" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type PushPlus struct { Token string `json:"token"` Topic string `json:"topic,omitempty"` diff --git a/internal/sdk/message/qyweixin.go b/internal/sdk/message/qyweixin.go index 8457954..6045c99 100644 --- a/internal/sdk/message/qyweixin.go +++ b/internal/sdk/message/qyweixin.go @@ -8,6 +8,18 @@ import ( "net/http" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type qywxResponse struct { Code int `json:"errcode"` Msg string `json:"errmsg"` diff --git a/internal/sdk/message/telegram.go b/internal/sdk/message/telegram.go index 699cd59..16388ac 100644 --- a/internal/sdk/message/telegram.go +++ b/internal/sdk/message/telegram.go @@ -15,6 +15,18 @@ import ( "golang.org/x/net/proxy" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type telegramResponse struct { Ok bool `json:"ok"` Description string `json:"description"` diff --git a/internal/sdk/message/vocechat.go b/internal/sdk/message/vocechat.go index e68570e..811da19 100644 --- a/internal/sdk/message/vocechat.go +++ b/internal/sdk/message/vocechat.go @@ -8,6 +8,18 @@ import ( "strings" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type VoceChat struct { Server string APIKey string diff --git a/internal/sdk/message/wechat_account.go b/internal/sdk/message/wechat_account.go index e848f85..17bc8d0 100644 --- a/internal/sdk/message/wechat_account.go +++ b/internal/sdk/message/wechat_account.go @@ -8,6 +8,18 @@ import ( "github.com/sirupsen/logrus" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type WeChatOFAccount struct { AppID string AppSecret string diff --git a/internal/sdk/message/wxpusher.go b/internal/sdk/message/wxpusher.go index 13d76af..0658857 100644 --- a/internal/sdk/message/wxpusher.go +++ b/internal/sdk/message/wxpusher.go @@ -8,6 +8,18 @@ import ( "net/http" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type WxPusher struct { AppToken string `json:"appToken"` Content string `json:"content"` diff --git a/internal/sdk/messenger/channels/aliyun_sms.go b/internal/sdk/messenger/channels/aliyun_sms.go index 7bf6e43..ca510b7 100644 --- a/internal/sdk/messenger/channels/aliyun_sms.go +++ b/internal/sdk/messenger/channels/aliyun_sms.go @@ -1,5 +1,17 @@ package channels +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type AliyunSMSChannel struct{ *BaseChannel } func NewAliyunSMSChannel() Channel { diff --git a/internal/sdk/messenger/channels/bark.go b/internal/sdk/messenger/channels/bark.go index 84a4d4b..49f9770 100644 --- a/internal/sdk/messenger/channels/bark.go +++ b/internal/sdk/messenger/channels/bark.go @@ -2,6 +2,18 @@ package channels import "github.com/engigu/baihu-panel/internal/sdk/message" +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type BarkChannel struct{ *BaseChannel } func NewBarkChannel() Channel { diff --git a/internal/sdk/messenger/channels/channel.go b/internal/sdk/messenger/channels/channel.go index 9d7be13..aa7fbc0 100644 --- a/internal/sdk/messenger/channels/channel.go +++ b/internal/sdk/messenger/channels/channel.go @@ -2,6 +2,18 @@ package channels import "fmt" +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + // Channel 渠道接口 - SDK 版本,零业务依赖 type Channel interface { // GetType 返回渠道类型标识 diff --git a/internal/sdk/messenger/channels/custom.go b/internal/sdk/messenger/channels/custom.go index 121fbff..c78053b 100644 --- a/internal/sdk/messenger/channels/custom.go +++ b/internal/sdk/messenger/channels/custom.go @@ -6,6 +6,18 @@ import ( "github.com/engigu/baihu-panel/internal/sdk/message" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type CustomChannel struct{ *BaseChannel } func NewCustomChannel() Channel { diff --git a/internal/sdk/messenger/channels/dtalk.go b/internal/sdk/messenger/channels/dtalk.go index fd4e162..f2dec75 100644 --- a/internal/sdk/messenger/channels/dtalk.go +++ b/internal/sdk/messenger/channels/dtalk.go @@ -2,6 +2,18 @@ package channels import "github.com/engigu/baihu-panel/internal/sdk/message" +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type DtalkChannel struct{ *BaseChannel } func NewDtalkChannel() Channel { diff --git a/internal/sdk/messenger/channels/email.go b/internal/sdk/messenger/channels/email.go index e45d076..552b5a4 100644 --- a/internal/sdk/messenger/channels/email.go +++ b/internal/sdk/messenger/channels/email.go @@ -6,6 +6,18 @@ import ( "strconv" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type EmailChannel struct{ *BaseChannel } func NewEmailChannel() Channel { diff --git a/internal/sdk/messenger/channels/feishu.go b/internal/sdk/messenger/channels/feishu.go index 7208cee..bf7a965 100644 --- a/internal/sdk/messenger/channels/feishu.go +++ b/internal/sdk/messenger/channels/feishu.go @@ -2,6 +2,18 @@ package channels import "github.com/engigu/baihu-panel/internal/sdk/message" +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type FeishuChannel struct{ *BaseChannel } func NewFeishuChannel() Channel { diff --git a/internal/sdk/messenger/channels/gotify.go b/internal/sdk/messenger/channels/gotify.go index 94b1d78..efca389 100644 --- a/internal/sdk/messenger/channels/gotify.go +++ b/internal/sdk/messenger/channels/gotify.go @@ -5,6 +5,18 @@ import ( "strconv" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type GotifyChannel struct{ *BaseChannel } func NewGotifyChannel() Channel { diff --git a/internal/sdk/messenger/channels/helpers.go b/internal/sdk/messenger/channels/helpers.go index b4400ac..4cfca11 100644 --- a/internal/sdk/messenger/channels/helpers.go +++ b/internal/sdk/messenger/channels/helpers.go @@ -10,6 +10,18 @@ import ( "github.com/alibabacloud-go/tea/tea" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + // replaceBodyPlaceholder 替换自定义 webhook body 中的 TEXT 占位符 func replaceBodyPlaceholder(body string, content string) string { data, _ := json.Marshal(content) diff --git a/internal/sdk/messenger/channels/ntfy.go b/internal/sdk/messenger/channels/ntfy.go index 441df95..3a286d1 100644 --- a/internal/sdk/messenger/channels/ntfy.go +++ b/internal/sdk/messenger/channels/ntfy.go @@ -2,6 +2,18 @@ package channels import "github.com/engigu/baihu-panel/internal/sdk/message" +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type NtfyChannel struct{ *BaseChannel } func NewNtfyChannel() Channel { diff --git a/internal/sdk/messenger/channels/pushme.go b/internal/sdk/messenger/channels/pushme.go index 78a15fb..ec3021d 100644 --- a/internal/sdk/messenger/channels/pushme.go +++ b/internal/sdk/messenger/channels/pushme.go @@ -2,6 +2,18 @@ package channels import "github.com/engigu/baihu-panel/internal/sdk/message" +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type PushMeChannel struct{ *BaseChannel } func NewPushMeChannel() Channel { diff --git a/internal/sdk/messenger/channels/pushplus.go b/internal/sdk/messenger/channels/pushplus.go index 4512199..1ccd5c5 100644 --- a/internal/sdk/messenger/channels/pushplus.go +++ b/internal/sdk/messenger/channels/pushplus.go @@ -2,6 +2,18 @@ package channels import "github.com/engigu/baihu-panel/internal/sdk/message" +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type PushPlusChannel struct{ *BaseChannel } func NewPushPlusChannel() Channel { diff --git a/internal/sdk/messenger/channels/qyweixin.go b/internal/sdk/messenger/channels/qyweixin.go index f9329d1..a6a12fa 100644 --- a/internal/sdk/messenger/channels/qyweixin.go +++ b/internal/sdk/messenger/channels/qyweixin.go @@ -2,6 +2,18 @@ package channels import "github.com/engigu/baihu-panel/internal/sdk/message" +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type QyWeiXinChannel struct{ *BaseChannel } func NewQyWeiXinChannel() Channel { diff --git a/internal/sdk/messenger/channels/telegram.go b/internal/sdk/messenger/channels/telegram.go index 4d63bec..edb614b 100644 --- a/internal/sdk/messenger/channels/telegram.go +++ b/internal/sdk/messenger/channels/telegram.go @@ -2,6 +2,18 @@ package channels import "github.com/engigu/baihu-panel/internal/sdk/message" +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type TelegramChannel struct{ *BaseChannel } func NewTelegramChannel() Channel { diff --git a/internal/sdk/messenger/channels/types.go b/internal/sdk/messenger/channels/types.go index 0d5e935..32c9aca 100644 --- a/internal/sdk/messenger/channels/types.go +++ b/internal/sdk/messenger/channels/types.go @@ -1,5 +1,17 @@ package channels +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + // Message 统一消息内容 type Message struct { Title string `json:"title"` diff --git a/internal/sdk/messenger/channels/vocechat.go b/internal/sdk/messenger/channels/vocechat.go index d005b32..907a500 100644 --- a/internal/sdk/messenger/channels/vocechat.go +++ b/internal/sdk/messenger/channels/vocechat.go @@ -2,6 +2,18 @@ package channels import "github.com/engigu/baihu-panel/internal/sdk/message" +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type VoceChatChannel struct{ *BaseChannel } func NewVoceChatChannel() Channel { diff --git a/internal/sdk/messenger/channels/wechat.go b/internal/sdk/messenger/channels/wechat.go index d457ba9..304c6b0 100644 --- a/internal/sdk/messenger/channels/wechat.go +++ b/internal/sdk/messenger/channels/wechat.go @@ -2,6 +2,18 @@ package channels import "github.com/engigu/baihu-panel/internal/sdk/message" +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type WeChatOFAccountChannel struct{ *BaseChannel } func NewWeChatOFAccountChannel() Channel { diff --git a/internal/sdk/messenger/channels/wxpusher.go b/internal/sdk/messenger/channels/wxpusher.go index 58fa5cf..5316569 100644 --- a/internal/sdk/messenger/channels/wxpusher.go +++ b/internal/sdk/messenger/channels/wxpusher.go @@ -7,6 +7,18 @@ import ( "strings" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + type WxPusherChannel struct{ *BaseChannel } func NewWxPusherChannel() Channel { diff --git a/internal/sdk/messenger/messenger.go b/internal/sdk/messenger/messenger.go index 66c0a7d..3c49b8f 100644 --- a/internal/sdk/messenger/messenger.go +++ b/internal/sdk/messenger/messenger.go @@ -20,6 +20,18 @@ import ( "sync" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + + // 重导出 channels 包的类型,方便外部使用 type ( Channel = channels.Channel diff --git a/internal/tunnel/client.go b/internal/tunnel/client.go index a43892d..d547a7d 100644 --- a/internal/tunnel/client.go +++ b/internal/tunnel/client.go @@ -16,6 +16,17 @@ import ( "github.com/hashicorp/yamux" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + var ( tunnelActive bool clientConn *yamux.Session diff --git a/internal/tunnel/conn.go b/internal/tunnel/conn.go index 8c190c8..f681ad0 100644 --- a/internal/tunnel/conn.go +++ b/internal/tunnel/conn.go @@ -8,6 +8,17 @@ import ( "github.com/gorilla/websocket" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + // wsConn 包装 gorilla websocket 以实现 net.Conn 接口 type wsConn struct { conn *websocket.Conn diff --git a/internal/tunnel/proxy.go b/internal/tunnel/proxy.go index c5a14f8..1b3b9ec 100644 --- a/internal/tunnel/proxy.go +++ b/internal/tunnel/proxy.go @@ -13,6 +13,17 @@ import ( "github.com/hashicorp/yamux" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + // ProxyHTTP 以完全透明的流式转发将 HTTP 请求代理到远程节点 (主节点调用) func ProxyHTTP(nodeID string, c *gin.Context, targetPath string) error { sess := GetSession(nodeID) diff --git a/internal/tunnel/reporter.go b/internal/tunnel/reporter.go index beff10b..1546e54 100644 --- a/internal/tunnel/reporter.go +++ b/internal/tunnel/reporter.go @@ -14,6 +14,17 @@ import ( "github.com/robfig/cron/v3" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + var ( reporterCronID cron.EntryID isReporting bool diff --git a/internal/tunnel/server.go b/internal/tunnel/server.go index e0a881f..35cbb31 100644 --- a/internal/tunnel/server.go +++ b/internal/tunnel/server.go @@ -15,6 +15,17 @@ import ( "github.com/hashicorp/yamux" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + var upgrader = websocket.Upgrader{ CheckOrigin: func(r *http.Request) bool { return true diff --git a/internal/tunnel/session.go b/internal/tunnel/session.go index f55437e..22de8fd 100644 --- a/internal/tunnel/session.go +++ b/internal/tunnel/session.go @@ -11,6 +11,17 @@ import ( "github.com/hashicorp/yamux" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + // TunnelSession 表示一个基于 WebSocket 的 Yamux 活跃会话 type TunnelSession struct { NodeID string diff --git a/internal/tunnel/traffic.go b/internal/tunnel/traffic.go index 1c9bdfe..54e688a 100644 --- a/internal/tunnel/traffic.go +++ b/internal/tunnel/traffic.go @@ -5,6 +5,17 @@ import ( "sync/atomic" ) +// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved. +// Use of this source code is governed by the Apache License 2.0. +// +// 【重要声明 / IMPORTANT NOTICE】 +// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。 +// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明, +// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。 +// +// Anyone referencing, porting, modifying, or redistributing this code must retain this +// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel). + var ( txBytes uint64 rxBytes uint64 diff --git a/web/src/views/interconnect/components/MasterView.vue b/web/src/views/interconnect/components/MasterView.vue index 786c035..9a14dc3 100644 --- a/web/src/views/interconnect/components/MasterView.vue +++ b/web/src/views/interconnect/components/MasterView.vue @@ -38,7 +38,7 @@ onMounted(() => {