Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alist-org
GitHub Repository: alist-org/alist
Path: blob/main/drivers/crypt/meta.go
1987 views
1
package crypt
2
3
import (
4
"github.com/alist-org/alist/v3/internal/driver"
5
"github.com/alist-org/alist/v3/internal/op"
6
)
7
8
type Addition struct {
9
// Usually one of two
10
//driver.RootPath
11
//driver.RootID
12
// define other
13
14
FileNameEnc string `json:"filename_encryption" type:"select" required:"true" options:"off,standard,obfuscate" default:"off"`
15
DirNameEnc string `json:"directory_name_encryption" type:"select" required:"true" options:"false,true" default:"false"`
16
RemotePath string `json:"remote_path" required:"true" help:"This is where the encrypted data stores"`
17
18
Password string `json:"password" required:"true" confidential:"true" help:"the main password"`
19
Salt string `json:"salt" confidential:"true" help:"If you don't know what is salt, treat it as a second password. Optional but recommended"`
20
EncryptedSuffix string `json:"encrypted_suffix" required:"true" default:".bin" help:"for advanced user only! encrypted files will have this suffix"`
21
FileNameEncoding string `json:"filename_encoding" type:"select" required:"true" options:"base64,base32,base32768" default:"base64" help:"for advanced user only!"`
22
23
Thumbnail bool `json:"thumbnail" required:"true" default:"false" help:"enable thumbnail which pre-generated under .thumbnails folder"`
24
25
ShowHidden bool `json:"show_hidden" default:"true" required:"false" help:"show hidden directories and files"`
26
}
27
28
var config = driver.Config{
29
Name: "Crypt",
30
LocalSort: true,
31
OnlyLocal: false,
32
OnlyProxy: true,
33
NoCache: true,
34
NoUpload: false,
35
NeedMs: false,
36
DefaultRoot: "/",
37
CheckStatus: false,
38
Alert: "",
39
NoOverwriteUpload: false,
40
}
41
42
func init() {
43
op.RegisterDriver(func() driver.Driver {
44
return &Crypt{}
45
})
46
}
47
48