docs: add open-source license and attribution statements to internal/sdk and internal/tunnel source files
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user