🎨 Support configuration of cloud provider connectivity check URL https://github.com/siyuan-note/siyuan/issues/7805

This commit is contained in:
Liang Ding 2023-03-29 14:10:18 +08:00
parent 947e5aad9d
commit 07414dcdc8
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
5 changed files with 35 additions and 1 deletions

View file

@ -47,6 +47,7 @@ type S3 struct {
PathStyle bool `json:"pathStyle"` // 是否使用路径风格
SkipTlsVerify bool `json:"skipTlsVerify"` // 是否跳过 TLS 验证
Timeout int `json:"timeout"` // 超时时间,单位:秒
CheckURL string `json:"checkURL"` // 连通性检查 URL // https://github.com/siyuan-note/siyuan/issues/7805
}
type WebDAV struct {
@ -55,6 +56,7 @@ type WebDAV struct {
Password string `json:"password"` // 密码
SkipTlsVerify bool `json:"skipTlsVerify"` // 是否跳过 TLS 验证
Timeout int `json:"timeout"` // 超时时间,单位:秒
CheckURL string `json:"checkUrl"` // 连通性检查 URL // https://github.com/siyuan-note/siyuan/issues/7805
}
const (
@ -62,3 +64,7 @@ const (
ProviderS3 = 2 // ProviderS3 为 S3 协议对象存储提供的云端存储服务
ProviderWebDAV = 3 // ProviderWebDAV 为 WebDAV 协议提供的云端存储服务
)
func NewSyncProviderCheckURL() string {
return "https://www.baidu.com https://icanhazip.com https://api.ipify.org"
}