2022-09-04 04:43:52 +00:00
|
|
|
package sftp
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/alist-org/alist/v3/internal/driver"
|
|
|
|
"github.com/alist-org/alist/v3/internal/op"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Addition struct {
|
|
|
|
Address string `json:"address" required:"true"`
|
|
|
|
Username string `json:"username" required:"true"`
|
|
|
|
PrivateKey string `json:"private_key" type:"text"`
|
|
|
|
Password string `json:"password"`
|
2024-06-28 15:50:00 +00:00
|
|
|
Passphrase string `json:"passphrase"`
|
2022-09-04 05:07:53 +00:00
|
|
|
driver.RootPath
|
2024-02-15 10:54:19 +00:00
|
|
|
IgnoreSymlinkError bool `json:"ignore_symlink_error" default:"false" info:"Ignore symlink error"`
|
2022-09-04 04:43:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var config = driver.Config{
|
|
|
|
Name: "SFTP",
|
|
|
|
LocalSort: true,
|
|
|
|
OnlyLocal: true,
|
|
|
|
DefaultRoot: "/",
|
|
|
|
CheckStatus: true,
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
2022-12-13 10:03:30 +00:00
|
|
|
op.RegisterDriver(func() driver.Driver {
|
|
|
|
return &SFTP{}
|
|
|
|
})
|
2022-09-04 04:43:52 +00:00
|
|
|
}
|