mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-06-03 14:40:52 +08:00
feat!: (WIP) decouple storage, users, and configuration files to support multiple users
This commit is contained in:
23
storage/alist/utils.go
Normal file
23
storage/alist/utils.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package alist
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
httpClient *http.Client
|
||||
)
|
||||
|
||||
func getHttpClient() *http.Client {
|
||||
if httpClient != nil {
|
||||
return httpClient
|
||||
}
|
||||
httpClient = &http.Client{
|
||||
Timeout: 12 * time.Hour,
|
||||
Transport: &http.Transport{
|
||||
TLSHandshakeTimeout: 10 * time.Second,
|
||||
},
|
||||
}
|
||||
return httpClient
|
||||
}
|
||||
Reference in New Issue
Block a user