2024-08-02 18:33:06 +08:00
|
|
|
//go:build !xpack
|
|
|
|
|
|
|
|
package xpack
|
|
|
|
|
|
|
|
import (
|
2025-01-22 14:28:22 +08:00
|
|
|
"crypto/tls"
|
2024-12-26 14:13:41 +08:00
|
|
|
"io"
|
2025-01-22 14:28:22 +08:00
|
|
|
"net"
|
|
|
|
"net/http"
|
|
|
|
"time"
|
2024-12-26 14:13:41 +08:00
|
|
|
|
2024-08-02 18:33:06 +08:00
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
2025-01-14 14:27:51 +08:00
|
|
|
func Proxy(c *gin.Context, currentNode string) {}
|
2024-08-19 18:04:43 +08:00
|
|
|
|
2024-12-23 22:05:31 +08:00
|
|
|
func UpdateGroup(name string, group, newGroup uint) error { return nil }
|
2024-08-19 18:04:43 +08:00
|
|
|
|
2024-12-23 22:05:31 +08:00
|
|
|
func CheckBackupUsed(id uint) error { return nil }
|
2024-08-21 15:14:50 +08:00
|
|
|
|
2025-01-14 14:27:51 +08:00
|
|
|
func RequestToAllAgent(reqUrl, reqMethod string, reqBody io.Reader) error { return nil }
|
2025-01-22 14:28:22 +08:00
|
|
|
|
|
|
|
func LoadRequestTransport() *http.Transport {
|
|
|
|
return &http.Transport{
|
|
|
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
|
|
|
DialContext: (&net.Dialer{
|
|
|
|
Timeout: 60 * time.Second,
|
|
|
|
KeepAlive: 60 * time.Second,
|
|
|
|
}).DialContext,
|
|
|
|
TLSHandshakeTimeout: 5 * time.Second,
|
|
|
|
ResponseHeaderTimeout: 10 * time.Second,
|
|
|
|
IdleConnTimeout: 15 * time.Second,
|
|
|
|
}
|
|
|
|
}
|