Compare commits

...
Author SHA1 Message Date
Nick Craig-Wood 3034ecf33f protondrive: add debug to help with #8860 FIXME DO NOT MERGE 2025-10-21 11:05:24 +01:00
Nick Craig-Wood 40b3251e41 Changelog updates from Version v1.71.2 2025-10-20 16:56:47 +01:00
albertony 484d955ea8 lib/http: cleanup indentation and other whitespace in http serve template 2025-10-20 11:53:55 +01:00
albertony 8fa9f255a0 docs: improve formatting of http serve template parameters 2025-10-20 11:53:55 +01:00
Nick Craig-Wood e7f11af1ca build: stop markdown linter leaving behind docker containers 2025-10-20 11:51:23 +01:00
Nick Craig-Wood 0b5c4cc442 Add Marco Ferretti to contributors 2025-10-20 11:51:23 +01:00
Marco Ferretti 178ddafdc7 s3: add cubbit as provider 2025-10-20 11:01:34 +01:00
dougal ad316ec6e3 s3: add servercore as a provider 2025-10-17 16:35:06 +01:00
Nick Craig-Wood 61b022dfc3 docs: update sponsors 2025-10-17 12:04:51 +01:00
Nick Craig-Wood 1903b4c1a2 docs: update sponsor images 2025-10-15 16:33:10 +01:00
Nick Craig-Wood f7cbcf556f docs: update privacy policy with a section on user data 2025-10-14 16:24:07 +01:00
Nick Craig-Wood 3581e628c0 Add Dulani Woods to contributors 2025-10-14 16:24:07 +01:00
Nick Craig-Wood 62c41bf449 Add spiffytech to contributors 2025-10-14 16:24:07 +01:00
Dulani Woods c5864e113b gcs: add region us-east5 - fixes #8863 2025-10-14 14:13:56 +01:00
albertony 39259a5bd1 jottacloud: refactor service list from map to slice to get predefined order 2025-10-11 20:57:19 +02:00
albertony 2e376eb3b9 jottacloud: added support for traditional oauth authentication also for the main service
This renames whitelabel authentication to traditional authentication and adds support for
the main Jottacloud service also here, as it can be used as an alternative to the
authentication based on personal login token for those who prefer it. Documentation
also adjusted correspondingly, and restructured the authentication section a bit more
since some of the sections that was under standard authentication in reality also
applies to the traditional authentication.
2025-10-11 20:57:19 +02:00
albertony de8e9d4693 oauthutil: improved debug logs from token refresh 2025-10-10 20:10:21 +02:00
spiffytech 710cf49bc6 backend: add S3 provider for Hetzner object storage #8183 2025-10-10 18:20:43 +01:00
albertony 8dacac60ea jottacloud: improved token refresh handling
The oauthutil.Renew was initialized early in NewFs, before the first request to the
service where a token is needed. When token is already expired at the time NewFs is
called, the Renew operation would be triggered immediately, only to abort before actually
performing a token refresh, for reason described in debug message:

    Token expired but no uploads in progress - doing nothing

Then later in NewFs, a request to the customer endpoint was made, and since it requires
a valid token it would perform a token refresh after all.

This was not a big problem, but a bit unnecessary, and the debug log messages made it
confusing to understand what rclone was actually doing regarding token refreshing.

If, from debugger, we were forcing the Renew operation to perform actual token refresh,
even if no uploads in process, then it would fail because it actually needs the username
which is retrieved from the customer endpoint

    jottacloud root '': Token refresh failed: read metadata failed: error 400: org.springframework.security.core.userdetails.UsernameNotFoundException: Username not found in url! (Bad Request)

Don't think this can happen in any real situations, but better to make sure it never can.
2025-10-10 18:59:19 +02:00
dougal 3a80d4d4b4 s3: provider reordering
+ fixing some typos
2025-10-10 16:30:03 +01:00
dougal a531f987a8 index: add missing providers 2025-10-10 16:30:03 +01:00
dougal e906b8d0c4 docs: add missing ` 2025-10-10 16:30:03 +01:00
dougal a5932ef91a s3: add rabata as a provider 2025-10-10 16:30:03 +01:00
Nick Craig-Wood 3afa563eaf mega: fix 402 payment required errors - fixes #8758
The underlying library now supports hashcash which should fix this
problem.
2025-10-09 11:58:49 +01:00
Nick Craig-Wood 9d9654b31f Add Andrew Ruthven to contributors 2025-10-09 11:58:49 +01:00
Nick Craig-Wood cfe257f13d Add Microscotch to contributors 2025-10-09 11:58:49 +01:00
Nick Craig-Wood 0375efbd35 Add iTrooz to contributors 2025-10-09 11:58:49 +01:00
Andrew Ruthven cad1954213 build: Bump SwiftAIO container to a newer one
The bouncestorage image hasn't been updated for 4 years and has this
message at the top of the docs:

  This repository is outdated; please use dockerswiftaio/docker-swift instead.

However, dockerswiftaio/docker-swift hasn't been updated for 2 years.
Switch to openstackswift/saio instead, which is getting regular updates.

This requires some minor changes to one test, and how we start the
container.
2025-10-06 16:55:48 +01:00
Andrew Ruthven 604e37caa5 build: Retry stopping the test server
On my system there needs to be a slight pause between stopping and
checking to see if SwiftAIO has stopped. Without the pause the tests fail for
a non-obvious reason.

Instead of using a magic sleep, re-use the retry logic that is used for
starting the test server.
2025-10-06 16:55:48 +01:00
Andrew Ruthven b249d384b9 build: Increase attempts to connect to test server
On the system I'm testing Swift on it can take ~90 retries for SwiftAIO to
be ready. Extend the retry attempts.
2025-10-06 16:55:48 +01:00
Andrew Ruthven 04e91838db swift: If storage_policy isn't set, use the root containers policy
Ensure that if we need to create a segments container it uses the same
storage policy as the root container.

Fixes #8858
2025-10-06 16:55:48 +01:00
Microscotch 94829aaec5 proton: automated 2FA login with OTP secret key
add OTP secret key to config to generate 2FA code
2025-10-06 16:18:38 +01:00
iTrooz f574e3395c serve s3: fix log output to remove the EXTRA messages
As shown in

https://github.com/rclone/gofakes3/blob/81e56a30c86f942861f105439339812439b53415/log.go#L74

it seems like the wanted behaviour for merging arguments is the one of PrintLn,
which is "put a space between each arg"
2025-10-06 15:17:21 +01:00
albertony 2bc155a96a docs/jottacloud: update description of invalid_grant error according to changes 2025-10-05 11:22:27 +02:00
albertony adc8ea3427 jottacloud: add support for MediaMarkt Cloud as a whitelabel service
This was requested in issue #8852, after authentication was already fixed for existing
whitelabels.
2025-10-05 00:48:01 +02:00
kingston125 068eea025c s3: add FileLu S5 provider 2025-10-04 15:48:01 +01:00
29 changed files with 1401 additions and 256 deletions

No files matched your search

+1 -1
View File
@@ -628,7 +628,7 @@ You'll need to modify the following files
- `backend/s3/s3.go`
- Add the provider to `providerOption` at the top of the file
- Add endpoints and other config for your provider gated on the provider in `fs.RegInfo`.
- Exclude your provider from generic config questions (eg `region` and `endpoint).
- Exclude your provider from generic config questions (eg `region` and `endpoint`).
- Add the provider to the `setQuirks` function - see the documentation there.
- `docs/content/s3.md`
- Add the provider at the top of the page.
+4
View File
@@ -34,6 +34,7 @@ directories to and from different cloud storage providers.
- China Mobile Ecloud Elastic Object Storage (EOS) [:page_facing_up:](https://rclone.org/s3/#china-mobile-ecloud-eos)
- Cloudflare R2 [:page_facing_up:](https://rclone.org/s3/#cloudflare-r2)
- Citrix ShareFile [:page_facing_up:](https://rclone.org/sharefile/)
- Cubbit DS3 [:page_facing_up:](https://rclone.org/s3/#Cubbit)
- DigitalOcean Spaces [:page_facing_up:](https://rclone.org/s3/#digitalocean-spaces)
- Digi Storage [:page_facing_up:](https://rclone.org/koofr/#digi-storage)
- Dreamhost [:page_facing_up:](https://rclone.org/s3/#dreamhost)
@@ -50,6 +51,7 @@ directories to and from different cloud storage providers.
- Google Drive [:page_facing_up:](https://rclone.org/drive/)
- Google Photos [:page_facing_up:](https://rclone.org/googlephotos/)
- HDFS (Hadoop Distributed Filesystem) [:page_facing_up:](https://rclone.org/hdfs/)
- Hetzner Object Storage [:page_facing_up:](https://rclone.org/s3/#hetzner)
- Hetzner Storage Box [:page_facing_up:](https://rclone.org/sftp/#hetzner-storage-box)
- HiDrive [:page_facing_up:](https://rclone.org/hidrive/)
- HTTP [:page_facing_up:](https://rclone.org/http/)
@@ -95,6 +97,7 @@ directories to and from different cloud storage providers.
- Proton Drive [:page_facing_up:](https://rclone.org/protondrive/)
- QingStor [:page_facing_up:](https://rclone.org/qingstor/)
- Qiniu Cloud Object Storage (Kodo) [:page_facing_up:](https://rclone.org/s3/#qiniu)
- Rabata Cloud Storage [:page_facing_up:](https://rclone.org/s3/#Rabata)
- Quatrix [:page_facing_up:](https://rclone.org/quatrix/)
- Rackspace Cloud Files [:page_facing_up:](https://rclone.org/swift/)
- RackCorp Object Storage [:page_facing_up:](https://rclone.org/s3/#RackCorp)
@@ -104,6 +107,7 @@ directories to and from different cloud storage providers.
- Seagate Lyve Cloud [:page_facing_up:](https://rclone.org/s3/#lyve)
- SeaweedFS [:page_facing_up:](https://rclone.org/s3/#seaweedfs)
- Selectel Object Storage [:page_facing_up:](https://rclone.org/s3/#selectel)
- Servercore Object Storage [:page_facing_up:](https://rclone.org/s3/#servercore)
- SFTP [:page_facing_up:](https://rclone.org/sftp/)
- SMB / CIFS [:page_facing_up:](https://rclone.org/smb/)
- Spectra Logic [:page_facing_up:](https://rclone.org/s3/#spectralogic)
@@ -252,6 +252,9 @@ Docs: https://cloud.google.com/storage/docs/bucket-policy-only
}, {
Value: "us-east4",
Help: "Northern Virginia",
}, {
Value: "us-east5",
Help: "Ohio",
}, {
Value: "us-west1",
Help: "Oregon",
+70 -53
View File
@@ -17,7 +17,7 @@ import (
"net/url"
"os"
"path"
"sort"
"slices"
"strconv"
"strings"
"time"
@@ -60,7 +60,7 @@ const (
configVersion = 1
defaultTokenURL = "https://id.jottacloud.com/auth/realms/jottacloud/protocol/openid-connect/token"
defaultClientID = "jottacli"
defaultClientID = "jottacli" // Identified as "Jottacloud CLI" in "My logged in devices"
legacyTokenURL = "https://api.jottacloud.com/auth/v1/token"
legacyRegisterURL = "https://api.jottacloud.com/auth/v1/register"
@@ -69,27 +69,31 @@ const (
legacyConfigVersion = 0
)
func getWhitelabelServices() map[string]struct {
name, domain, realm, clientID string
scopes []string
} {
return map[string]struct {
name string
domain string
realm string
clientID string
scopes []string
}{
"telia_se": {"Telia Cloud (Sweden)", "cloud-auth.telia.se", "telia_se", "desktop", []string{"openid", "jotta-default", "offline_access"}},
"telia_no": {"Telia Sky (Norway)", "sky-auth.telia.no", "get", "desktop", []string{"openid", "jotta-default", "offline_access"}},
"tele2": {"Tele2 Cloud (Sweden)", "mittcloud-auth.tele2.se", "comhem", "desktop", []string{"openid", "jotta-default", "offline_access"}},
"onlime": {"Onlime (Denmark)", "cloud-auth.onlime.dk", "onlime_wl", "desktop", []string{"openid", "jotta-default", "offline_access"}},
"elkjop": {"Elkjøp Cloud (Norway)", "cloud.elkjop.no", "elkjop", "desktop", []string{"openid", "jotta-default", "offline_access"}},
"elgiganten_se": {"Elgiganten Cloud (Sweden)", "cloud.elgiganten.se", "elgiganten", "desktop", []string{"openid", "jotta-default", "offline_access"}},
"elgiganten_dk": {"Elgiganten Cloud (Denmark)", "cloud.elgiganten.dk", "elgiganten", "desktop", []string{"openid", "jotta-default", "offline_access"}},
"gigantti": {"Gigantti Cloud (Finland)", "cloud.gigantti.fi", "gigantti", "desktop", []string{"openid", "jotta-default", "offline_access"}},
"elko": {"ELKO Cloud (Iceland)", "cloud.elko.is", "elko", "desktop", []string{"openid", "jotta-default", "offline_access"}},
"letsgo": {"Let's Go Cloud (Germany)", "letsgo.jotta.cloud", "letsgo", "desktop-win", []string{"openid", "offline_access"}},
type service struct {
key string
name string
domain string
realm string
clientID string
scopes []string
}
// The list of services and their settings for supporting traditional OAuth.
// Please keep these in alphabetical order, but with jottacloud first.
func getServices() []service {
return []service{
{"jottacloud", "Jottacloud", "id.jottacloud.com", "jottacloud", "desktop", []string{"openid", "jotta-default", "offline_access"}}, // Chose client id "desktop" here, will be identified as "Jottacloud for Desktop" in "My logged in devices", but could have used "jottacli" here as well.
{"elgiganten_dk", "Elgiganten Cloud (Denmark)", "cloud.elgiganten.dk", "elgiganten", "desktop", []string{"openid", "jotta-default", "offline_access"}},
{"elgiganten_se", "Elgiganten Cloud (Sweden)", "cloud.elgiganten.se", "elgiganten", "desktop", []string{"openid", "jotta-default", "offline_access"}},
{"elkjop", "Elkjøp Cloud (Norway)", "cloud.elkjop.no", "elkjop", "desktop", []string{"openid", "jotta-default", "offline_access"}},
{"elko", "ELKO Cloud (Iceland)", "cloud.elko.is", "elko", "desktop", []string{"openid", "jotta-default", "offline_access"}},
{"gigantti", "Gigantti Cloud (Finland)", "cloud.gigantti.fi", "gigantti", "desktop", []string{"openid", "jotta-default", "offline_access"}},
{"letsgo", "Let's Go Cloud (Germany)", "letsgo.jotta.cloud", "letsgo", "desktop-win", []string{"openid", "offline_access"}},
{"mediamarkt", "MediaMarkt Cloud (Multiregional)", "mediamarkt.jottacloud.com", "mediamarkt", "desktop", []string{"openid", "jotta-default", "offline_access"}},
{"onlime", "Onlime (Denmark)", "cloud-auth.onlime.dk", "onlime_wl", "desktop", []string{"openid", "jotta-default", "offline_access"}},
{"tele2", "Tele2 Cloud (Sweden)", "mittcloud-auth.tele2.se", "comhem", "desktop", []string{"openid", "jotta-default", "offline_access"}},
{"telia_no", "Telia Sky (Norway)", "sky-auth.telia.no", "get", "desktop", []string{"openid", "jotta-default", "offline_access"}},
{"telia_se", "Telia Cloud (Sweden)", "cloud-auth.telia.se", "telia_se", "desktop", []string{"openid", "jotta-default", "offline_access"}},
}
}
@@ -176,20 +180,34 @@ func Config(ctx context.Context, name string, m configmap.Mapper, conf fs.Config
}
return fs.ConfigChooseExclusiveFixed("auth_type_done", "config_type", `Type of authentication.`, []fs.OptionExample{{
Value: "standard",
Help: "Standard authentication.\nUse this if you're a normal Jottacloud user.",
Help: `Standard authentication.
This is primarily supported by the official service, but may also be
supported by some white-label services. It is designed for command-line
applications, and you will be asked to enter a single-use personal login
token which you must manually generate from the account security settings
in the web interface of your service.`,
}, {
Value: "whitelabel",
Help: "Whitelabel authentication.\nUse this if you are using the service offered by a third party such as Telia, Tele2, Onlime, Elkjøp, etc.",
Value: "traditional",
Help: `Traditional authentication.
This is supported by the official service and all white-label services
that rclone knows about. You will be asked which service to connect to.
It has a limitation of only a single active authentication at a time. You
need to be on, or have access to, a machine with an internet-connected
web browser.`,
}, {
Value: "legacy",
Help: "Legacy authentication.\nThis is no longer supported by any known services and not recommended for normal users.",
Help: `Legacy authentication.
This is no longer supported by any known services and not recommended
used. You will be asked for your account's username and password.`,
}})
case "auth_type_done":
// Jump to next state according to config chosen
return fs.ConfigGoto(conf.Result)
case "standard": // configure a jottacloud backend using the modern JottaCli token based authentication
m.Set("configVersion", fmt.Sprint(configVersion))
return fs.ConfigInput("standard_token", "config_login_token", "Personal login token.\nGenerate here: https://www.jottacloud.com/web/secure")
return fs.ConfigInput("standard_token", "config_login_token", `Personal login token.
Generate it from the account security settings in the web interface of your
service, for the official service on https://www.jottacloud.com/web/secure.`)
case "standard_token":
loginToken := conf.Result
m.Set(configClientID, defaultClientID)
@@ -206,29 +224,28 @@ func Config(ctx context.Context, name string, m configmap.Mapper, conf fs.Config
return nil, fmt.Errorf("error while saving token: %w", err)
}
return fs.ConfigGoto("choose_device")
case "whitelabel":
whitelabels := getWhitelabelServices()
options := make([]fs.OptionExample, 0, len(whitelabels))
for key, val := range whitelabels {
case "traditional":
services := getServices()
options := make([]fs.OptionExample, 0, len(services))
for _, service := range services {
options = append(options, fs.OptionExample{
Value: key,
Help: val.name,
Value: service.key,
Help: service.name,
})
}
sort.Slice(options, func(i, j int) bool {
return options[i].Help < options[j].Help
})
return fs.ConfigChooseExclusiveFixed("whitelabel_type", "config_whitelabel",
return fs.ConfigChooseExclusiveFixed("traditional_type", "config_traditional",
"White-label service. This decides the domain name to connect to and\nthe authentication configuration to use.",
options)
case "whitelabel_type":
whitelabel, ok := getWhitelabelServices()[conf.Result]
if !ok {
return nil, fmt.Errorf("unexpected whitelabel %q", conf.Result)
case "traditional_type":
services := getServices()
i := slices.IndexFunc(services, func(s service) bool { return s.key == conf.Result })
if i == -1 {
return nil, fmt.Errorf("unexpected service %q", conf.Result)
}
service := services[i]
opts := rest.Opts{
Method: "GET",
RootURL: "https://" + whitelabel.domain + "/auth/realms/" + whitelabel.realm + "/.well-known/openid-configuration",
RootURL: "https://" + service.domain + "/auth/realms/" + service.realm + "/.well-known/openid-configuration",
}
var wellKnown api.WellKnown
srv := rest.NewClient(fshttp.NewClient(ctx))
@@ -237,14 +254,14 @@ func Config(ctx context.Context, name string, m configmap.Mapper, conf fs.Config
return nil, fmt.Errorf("failed to get authentication provider configuration: %w", err)
}
m.Set("configVersion", fmt.Sprint(configVersion))
m.Set(configClientID, whitelabel.clientID)
m.Set(configClientID, service.clientID)
m.Set(configTokenURL, wellKnown.TokenEndpoint)
return oauthutil.ConfigOut("choose_device", &oauthutil.Options{
OAuth2Config: &oauthutil.Config{
AuthURL: wellKnown.AuthorizationEndpoint,
TokenURL: wellKnown.TokenEndpoint,
ClientID: whitelabel.clientID,
Scopes: whitelabel.scopes,
ClientID: service.clientID,
Scopes: service.scopes,
RedirectURL: oauthutil.RedirectLocalhostURL,
},
})
@@ -992,6 +1009,13 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
f.features.ListR = nil
}
cust, err := getCustomerInfo(ctx, f.apiSrv)
if err != nil {
return nil, err
}
f.user = cust.Username
f.setEndpoints()
// Renew the token in the background
f.tokenRenewer = oauthutil.NewRenew(f.String(), ts, func() error {
_, err := f.readMetaDataForPath(ctx, "")
@@ -1001,13 +1025,6 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
return err
})
cust, err := getCustomerInfo(ctx, f.apiSrv)
if err != nil {
return nil, err
}
f.user = cust.Username
f.setEndpoints()
if root != "" && !rootIsDir {
// Check to see if the root actually an existing file
remote := path.Base(root)
+51 -3
View File
@@ -13,12 +13,15 @@ import (
protonDriveAPI "github.com/henrybear327/Proton-API-Bridge"
"github.com/henrybear327/go-proton-api"
"github.com/pquerna/otp/totp"
"github.com/rclone/rclone/fs"
"github.com/rclone/rclone/fs/config"
"github.com/rclone/rclone/fs/config/configmap"
"github.com/rclone/rclone/fs/config/configstruct"
"github.com/rclone/rclone/fs/config/obscure"
"github.com/rclone/rclone/fs/hash"
"github.com/rclone/rclone/fs/log"
"github.com/rclone/rclone/lib/dircache"
"github.com/rclone/rclone/lib/encoder"
"github.com/rclone/rclone/lib/pacer"
@@ -87,6 +90,17 @@ The value can also be provided with --protondrive-2fa=000000
The 2FA code of your proton drive account if the account is set up with
two-factor authentication`,
Required: false,
}, {
Name: "otp_secret_key",
Help: `The OTP secret key
The value can also be provided with --protondrive-otp-secret-key=ABCDEFGHIJKLMNOPQRSTUVWXYZ234567
The OTP secret key of your proton drive account if the account is set up with
two-factor authentication`,
Required: false,
Sensitive: true,
IsPassword: true,
}, {
Name: clientUIDKey,
Help: "Client uid key (internal use only)",
@@ -191,6 +205,7 @@ type Options struct {
Password string `config:"password"`
MailboxPassword string `config:"mailbox_password"`
TwoFA string `config:"2fa"`
OtpSecretKey string `config:"otp_secret_key"`
// advanced
Enc encoder.MultiEncoder `config:"encoding"`
@@ -356,7 +371,15 @@ func newProtonDrive(ctx context.Context, f *Fs, opt *Options, m configmap.Mapper
config.FirstLoginCredential.Username = opt.Username
config.FirstLoginCredential.Password = opt.Password
config.FirstLoginCredential.MailboxPassword = opt.MailboxPassword
// if 2FA code is provided, use it; otherwise, generate one using the OTP secret key if provided
config.FirstLoginCredential.TwoFA = opt.TwoFA
if opt.TwoFA == "" && opt.OtpSecretKey != "" {
code, err := totp.GenerateCode(opt.OtpSecretKey, time.Now())
if err != nil {
return nil, fmt.Errorf("couldn't generate 2FA code: %w", err)
}
config.FirstLoginCredential.TwoFA = code
}
protonDrive, auth, err := protonDriveAPI.NewProtonDrive(ctx, config, authHandler, deAuthHandler)
if err != nil {
return nil, fmt.Errorf("couldn't initialize a new proton drive instance: %w", err)
@@ -395,6 +418,14 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
}
}
if opt.OtpSecretKey != "" {
var err error
opt.OtpSecretKey, err = obscure.Reveal(opt.OtpSecretKey)
if err != nil {
return nil, fmt.Errorf("couldn't decrypt OtpSecretKey: %w", err)
}
}
ci := fs.GetConfig(ctx)
root = strings.Trim(root, "/")
@@ -475,6 +506,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
// CleanUp deletes all files currently in trash
func (f *Fs) CleanUp(ctx context.Context) error {
return f.pacer.Call(func() (bool, error) {
fs.Debugf(f, "Calling EmptyTrash")
err := f.protonDrive.EmptyTrash(ctx)
return shouldRetry(ctx, err)
})
@@ -486,7 +518,8 @@ func (f *Fs) CleanUp(ctx context.Context) error {
// If remote points to a directory then it should return
// ErrorIsDir if possible without doing any extra work,
// otherwise ErrorObjectNotFound.
func (f *Fs) NewObject(ctx context.Context, remote string) (fs.Object, error) {
func (f *Fs) NewObject(ctx context.Context, remote string) (obj fs.Object, err error) {
defer log.Trace(f, "remote=%q", remote)("obj=%#v err=%v", &obj, &err)
return f.newObject(ctx, remote)
}
@@ -504,6 +537,7 @@ func (f *Fs) getObjectLink(ctx context.Context, remote string) (*proton.Link, er
var link *proton.Link
if err = f.pacer.Call(func() (bool, error) {
fs.Debugf(f, "Calling SearchByNameInActiveFolderByID")
link, err = f.protonDrive.SearchByNameInActiveFolderByID(ctx, folderLinkID, leaf, true, false, proton.LinkStateActive)
return shouldRetry(ctx, err)
}); err != nil {
@@ -521,6 +555,7 @@ func (f *Fs) readMetaDataForLink(ctx context.Context, link *proton.Link) (*proto
var fileSystemAttrs *protonDriveAPI.FileSystemAttrs
var err error
if err = f.pacer.Call(func() (bool, error) {
fs.Debugf(f, "Calling GetActiveRevisionAttrs")
fileSystemAttrs, err = f.protonDrive.GetActiveRevisionAttrs(ctx, link)
return shouldRetry(ctx, err)
}); err != nil {
@@ -582,7 +617,9 @@ func (f *Fs) newObject(ctx context.Context, remote string) (fs.Object, error) {
// found.
// Notice that this function is expensive since everything on proton is encrypted
// So having a remote with 10k files, during operations like sync, might take a while and lots of bandwidth!
func (f *Fs) List(ctx context.Context, dir string) (fs.DirEntries, error) {
func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err error) {
var numberOfEntries = -1
defer log.Trace(f, "dir=%q", dir)("entries=%d err=%v", &numberOfEntries, &err)
folderLinkID, err := f.dirCache.FindDir(ctx, f.sanitizePath(dir), false) // will handle ErrDirNotFound here
if err != nil {
return nil, err
@@ -590,13 +627,14 @@ func (f *Fs) List(ctx context.Context, dir string) (fs.DirEntries, error) {
var foldersAndFiles []*protonDriveAPI.ProtonDirectoryData
if err = f.pacer.Call(func() (bool, error) {
fs.Debugf(f, "Calling ListDirectory")
foldersAndFiles, err = f.protonDrive.ListDirectory(ctx, folderLinkID)
return shouldRetry(ctx, err)
}); err != nil {
return nil, err
}
entries := make(fs.DirEntries, 0)
entries = make(fs.DirEntries, 0)
for i := range foldersAndFiles {
remote := path.Join(dir, f.opt.Enc.ToStandardName(foldersAndFiles[i].Name))
@@ -613,6 +651,7 @@ func (f *Fs) List(ctx context.Context, dir string) (fs.DirEntries, error) {
}
}
numberOfEntries = len(entries)
return entries, nil
}
@@ -626,6 +665,7 @@ func (f *Fs) FindLeaf(ctx context.Context, pathID, leaf string) (string, bool, e
var link *proton.Link
var err error
if err = f.pacer.Call(func() (bool, error) {
fs.Debugf(f, "Calling SearchByNameInActiveFolderByID")
link, err = f.protonDrive.SearchByNameInActiveFolderByID(ctx, pathID, leaf, false, true, proton.LinkStateActive)
return shouldRetry(ctx, err)
}); err != nil {
@@ -648,6 +688,7 @@ func (f *Fs) CreateDir(ctx context.Context, pathID, leaf string) (string, error)
var newID string
var err error
if err = f.pacer.Call(func() (bool, error) {
fs.Debugf(f, "Calling CreateNewFolderByID")
newID, err = f.protonDrive.CreateNewFolderByID(ctx, pathID, leaf)
return shouldRetry(ctx, err)
}); err != nil {
@@ -745,6 +786,7 @@ func (f *Fs) Rmdir(ctx context.Context, dir string) error {
}
if err = f.pacer.Call(func() (bool, error) {
fs.Debugf(f, "Calling MoveFolderToTrashByID")
err = f.protonDrive.MoveFolderToTrashByID(ctx, folderLinkID, true)
return shouldRetry(ctx, err)
}); err != nil {
@@ -765,6 +807,7 @@ func (f *Fs) Precision() time.Duration {
// as an optional interface
func (f *Fs) DirCacheFlush() {
f.dirCache.ResetRoot()
fs.Debugf(f, "Calling ClearCache")
f.protonDrive.ClearCache()
}
@@ -778,6 +821,7 @@ func (f *Fs) About(ctx context.Context) (*fs.Usage, error) {
var user *proton.User
var err error
if err = f.pacer.Call(func() (bool, error) {
fs.Debugf(f, "Calling About")
user, err = f.protonDrive.About(ctx)
return shouldRetry(ctx, err)
}); err != nil {
@@ -995,6 +1039,7 @@ func (f *Fs) Purge(ctx context.Context, dir string) error {
}
if err = f.pacer.Call(func() (bool, error) {
fs.Debugf(f, "Calling MoveFolderToTrashByID")
err = f.protonDrive.MoveFolderToTrashByID(ctx, folderLinkID, false)
return shouldRetry(ctx, err)
}); err != nil {
@@ -1013,6 +1058,7 @@ func (o *Object) MimeType(ctx context.Context) string {
// Disconnect the current user
func (f *Fs) Disconnect(ctx context.Context) error {
return f.pacer.Call(func() (bool, error) {
fs.Debugf(f, "Calling Logout")
err := f.protonDrive.Logout(ctx)
return shouldRetry(ctx, err)
})
@@ -1052,6 +1098,7 @@ func (f *Fs) Move(ctx context.Context, src fs.Object, remote string) (fs.Object,
return nil, err
}
if err = f.pacer.Call(func() (bool, error) {
fs.Debugf(f, "Calling MoveFileByID")
err = f.protonDrive.MoveFileByID(ctx, srcObj.id, dstDirectoryID, dstLeaf)
return shouldRetry(ctx, err)
}); err != nil {
@@ -1084,6 +1131,7 @@ func (f *Fs) DirMove(ctx context.Context, src fs.Fs, srcRemote, dstRemote string
}
if err = f.pacer.Call(func() (bool, error) {
fs.Debugf(f, "Calling MoveFolderByID")
err = f.protonDrive.MoveFolderByID(ctx, srcID, dstDirectoryID, dstLeaf)
return shouldRetry(ctx, err)
}); err != nil {
+234 -41
View File
@@ -95,6 +95,9 @@ var providerOption = fs.Option{
}, {
Value: "Cloudflare",
Help: "Cloudflare R2 Storage",
}, {
Value: "Cubbit",
Help: "Cubbit DS3 Object Storage",
}, {
Value: "DigitalOcean",
Help: "DigitalOcean Spaces",
@@ -104,12 +107,18 @@ var providerOption = fs.Option{
}, {
Value: "Exaba",
Help: "Exaba Object Storage",
}, {
Value: "FileLu",
Help: "FileLu S5 (S3-Compatible Object Storage)",
}, {
Value: "FlashBlade",
Help: "Pure Storage FlashBlade Object Storage",
}, {
Value: "GCS",
Help: "Google Cloud Storage",
}, {
Value: "Hetzner",
Help: "Hetzner Object Storage",
}, {
Value: "HuaweiOBS",
Help: "Huawei Object Storage Service",
@@ -158,6 +167,9 @@ var providerOption = fs.Option{
}, {
Value: "Petabox",
Help: "Petabox Object Storage",
}, {
Value: "Rabata",
Help: "Rabata Cloud Storage",
}, {
Value: "RackCorp",
Help: "RackCorp Object Storage",
@@ -173,6 +185,9 @@ var providerOption = fs.Option{
}, {
Value: "Selectel",
Help: "Selectel Object Storage",
}, {
Value: "Servercore",
Help: "Servercore Object Storage",
}, {
Value: "SpectraLogic",
Help: "Spectra Logic Black Pearl",
@@ -350,7 +365,49 @@ func init() {
}},
}, {
Name: "region",
Help: "Region to connect to. - the location where your bucket will be created and your data stored. Need bo be same with your endpoint.\n",
Help: "Region to connect to.",
Provider: "Cubbit",
Examples: []fs.OptionExample{{
Value: "eu-west-1",
Help: "Europe West",
}},
}, {
Name: "region",
Help: "Region to connect to for FileLu S5.",
Provider: "FileLu",
Examples: []fs.OptionExample{{
Value: "global",
Help: "Global",
}, {
Value: "us-east",
Help: "North America (US-East)",
}, {
Value: "eu-central",
Help: "Europe (EU-Central)",
}, {
Value: "ap-southeast",
Help: "Asia Pacific (AP-Southeast)",
}, {
Value: "me-central",
Help: "Middle East (ME-Central)",
}},
}, {
Name: "region",
Help: "Region to connect to.",
Provider: "Hetzner",
Examples: []fs.OptionExample{{
Value: "hel1",
Help: "Helsinki",
}, {
Value: "fsn1",
Help: "Falkenstein",
}, {
Value: "nbg1",
Help: "Nuremberg",
}},
}, {
Name: "region",
Help: "Region to connect to. - the location where your bucket will be created and your data stored. Need to be same with your endpoint.\n",
Provider: "HuaweiOBS",
Examples: []fs.OptionExample{{
Value: "af-south-1",
@@ -541,6 +598,20 @@ func init() {
Value: "ap-northeast-1",
Help: "Northeast Asia Region 1.\nNeeds location constraint ap-northeast-1.",
}},
}, {
Name: "region",
Help: "Region where your bucket will be created and your data stored.\n",
Provider: "Rabata",
Examples: []fs.OptionExample{{
Value: "us-east-1",
Help: "US East (N. Virginia)",
}, {
Value: "eu-west-1",
Help: "EU (Ireland)",
}, {
Value: "eu-west-2",
Help: "EU (London)",
}},
}, {
Name: "region",
Help: "region - the location where your bucket will be created and your data stored.\n",
@@ -626,6 +697,26 @@ func init() {
Value: "ru-1",
Help: "St. Petersburg",
}},
}, {
Name: "region",
Help: "Region where your is data stored.\n",
Provider: "Servercore",
Examples: []fs.OptionExample{{
Value: "ru-1",
Help: "St. Petersburg",
}, {
Value: "gis-1",
Help: "Moscow",
}, {
Value: "ru-7",
Help: "Moscow",
}, {
Value: "uz-2",
Help: "Tashkent, Uzbekistan",
}, {
Value: "kz-1",
Help: "Almaty, Kazakhstan",
}},
}, {
Name: "region",
Help: "Region where your data stored.\n",
@@ -657,7 +748,7 @@ func init() {
}, {
Name: "region",
Help: "Region to connect to.\n\nLeave blank if you are using an S3 clone and you don't have a region.",
Provider: "!AWS,Alibaba,ArvanCloud,ChinaMobile,Cloudflare,FlashBlade,HuaweiOBS,IDrive,Intercolo,IONOS,Liara,Linode,Magalu,Mega,OVHcloud,Petabox,Qiniu,RackCorp,Scaleway,Selectel,SpectraLogic,Storj,Synology,TencentCOS,Zata",
Provider: "!AWS,Alibaba,ArvanCloud,ChinaMobile,Cloudflare,Cubbit,FlashBlade,FileLu,Hetzner,HuaweiOBS,IDrive,Intercolo,IONOS,Liara,Linode,Magalu,Mega,OVHcloud,Petabox,Qiniu,Rabata,RackCorp,Scaleway,Selectel,Servercore,SpectraLogic,Storj,Synology,TencentCOS,Zata",
Examples: []fs.OptionExample{{
Value: "",
Help: "Use this if unsure.\nWill use v4 signatures and an empty region.",
@@ -858,6 +949,22 @@ func init() {
Value: "eos-anhui-1.cmecloud.cn",
Help: "Anhui China (Huainan)",
}},
}, {
Name: "endpoint",
Help: "Endpoint for Cubbit DS3 Object Storage.",
Provider: "Cubbit",
Examples: []fs.OptionExample{{
Value: "s3.cubbit.eu",
Help: "Cubbit DS3 Object Storage endpoint",
}},
}, {
Name: "endpoint",
Help: "Endpoint for FileLu S5 Object Storage.\nRequired when using FileLu S5.",
Provider: "FileLu",
Examples: []fs.OptionExample{{
Value: "s5lu.com",
Help: "Global FileLu S5 endpoint",
}},
}, {
Name: "endpoint",
Help: "Endpoint for Google Cloud Storage.",
@@ -866,6 +973,20 @@ func init() {
Value: "https://storage.googleapis.com",
Help: "Google Cloud Storage endpoint",
}},
}, {
Name: "endpoint",
Help: "Endpoint for Hetzner Object Storage",
Provider: "Hetzner",
Examples: []fs.OptionExample{{
Value: "hel1.your-objectstorage.com",
Help: "Helsinki",
}, {
Value: "fsn1.your-objectstorage.com",
Help: "Falkenstein",
}, {
Value: "nbg1.your-objectstorage.com",
Help: "Nuremberg",
}},
}, {
// obs endpoints: https://developer.huaweicloud.com/intl/en-us/endpoint?OBS
Name: "endpoint",
@@ -1001,7 +1122,7 @@ func init() {
Help: "APAC Cross Regional Tokyo Endpoint",
}, {
Value: "s3.hkg.ap.cloud-object-storage.appdomain.cloud",
Help: "APAC Cross Regional HongKong Endpoint",
Help: "APAC Cross Regional Hong Kong Endpoint",
}, {
Value: "s3.seo.ap.cloud-object-storage.appdomain.cloud",
Help: "APAC Cross Regional Seoul Endpoint",
@@ -1013,7 +1134,7 @@ func init() {
Help: "APAC Cross Regional Tokyo Private Endpoint",
}, {
Value: "s3.private.hkg.ap.cloud-object-storage.appdomain.cloud",
Help: "APAC Cross Regional HongKong Private Endpoint",
Help: "APAC Cross Regional Hong Kong Private Endpoint",
}, {
Value: "s3.private.seo.ap.cloud-object-storage.appdomain.cloud",
Help: "APAC Cross Regional Seoul Private Endpoint",
@@ -1354,11 +1475,17 @@ func init() {
}},
}, {
Name: "endpoint",
Help: "Endpoint for Zata Object Storage.",
Provider: "Zata",
Help: "Endpoint for Rabata Object Storage.",
Provider: "Rabata",
Examples: []fs.OptionExample{{
Value: "idr01.zata.ai",
Help: "South Asia Endpoint",
Value: "s3.us-east-1.rabata.io",
Help: "US East (N. Virginia)",
}, {
Value: "s3.eu-west-1.rabata.io",
Help: "EU West (Ireland)",
}, {
Value: "s3.eu-west-2.rabata.io",
Help: "EU West (London)",
}},
}, {
// RackCorp endpoints: https://www.rackcorp.com/storage/s3storage
@@ -1432,6 +1559,26 @@ func init() {
Value: "s3.ru-1.storage.selcloud.ru",
Help: "Saint Petersburg",
}},
}, {
Name: "endpoint",
Help: "Endpoint for Servercore Object Storage.",
Provider: "Servercore",
Examples: []fs.OptionExample{{
Value: "s3.ru-1.storage.selcloud.ru",
Help: "Saint Petersburg",
}, {
Value: "s3.gis-1.storage.selcloud.ru",
Help: "Moscow",
}, {
Value: "s3.ru-7.storage.selcloud.ru",
Help: "Moscow",
}, {
Value: "s3.uz-2.srvstorage.uz",
Help: "Tashkent, Uzbekistan",
}, {
Value: "s3.kz-1.srvstorage.kz",
Help: "Almaty, Kazakhstan",
}},
}, {
Name: "endpoint",
Help: "Endpoint for Scaleway Object Storage.",
@@ -1551,10 +1698,18 @@ func init() {
Value: "cos.accelerate.myqcloud.com",
Help: "Use Tencent COS Accelerate Endpoint",
}},
}, {
Name: "endpoint",
Help: "Endpoint for Zata Object Storage.",
Provider: "Zata",
Examples: []fs.OptionExample{{
Value: "idr01.zata.ai",
Help: "South Asia Endpoint",
}},
}, {
Name: "endpoint",
Help: "Endpoint for S3 API.\n\nRequired when using an S3 clone.",
Provider: "!AWS,Alibaba,ArvanCloud,ChinaMobile,GCS,HuaweiOBS,IBMCOS,IDrive,Intercolo,IONOS,Liara,Linode,LyveCloud,Magalu,OVHcloud,Petabox,Qiniu,RackCorp,Scaleway,Selectel,StackPath,Storj,Synology,TencentCOS,Zata",
Provider: "!AWS,Alibaba,ArvanCloud,ChinaMobile,Cubbit,GCS,Hetzner,HuaweiOBS,IBMCOS,IDrive,Intercolo,IONOS,Liara,Linode,LyveCloud,Magalu,OVHcloud,Petabox,Qiniu,Rabata,RackCorp,Scaleway,Selectel,Servercore,StackPath,Storj,Synology,TencentCOS,Zata",
Examples: []fs.OptionExample{{
Value: "objects-us-east-1.dream.io",
Help: "Dream Objects endpoint",
@@ -1856,7 +2011,7 @@ func init() {
Help: "Southwest China (Guiyang)",
}, {
Value: "xian1",
Help: "Nouthwest China (Xian)",
Help: "Northwest China (Xian)",
}, {
Value: "yunnan",
Help: "Yunnan China (Kunming)",
@@ -2024,6 +2179,20 @@ func init() {
Value: "ap-northeast-1",
Help: "Northeast Asia Region 1",
}},
}, {
Name: "location_constraint",
Help: "location where your bucket will be created and your data stored.\n",
Provider: "Rabata",
Examples: []fs.OptionExample{{
Value: "us-east-1",
Help: "US East (N. Virginia)",
}, {
Value: "eu-west-1",
Help: "EU (Ireland)",
}, {
Value: "eu-west-2",
Help: "EU (London)",
}},
}, {
Name: "location_constraint",
Help: "Location constraint - the location where your bucket will be located and your data stored.\n",
@@ -2081,7 +2250,7 @@ func init() {
Help: "New York (USA) Region",
}, {
Value: "us-west-1",
Help: "Freemont (USA) Region",
Help: "Fremont (USA) Region",
}, {
Value: "nz",
Help: "Auckland (New Zealand) Region",
@@ -2089,7 +2258,7 @@ func init() {
}, {
Name: "location_constraint",
Help: "Location constraint - must be set to match the Region.\n\nLeave blank if not sure. Used when creating buckets only.",
Provider: "!AWS,Alibaba,ArvanCloud,ChinaMobile,Cloudflare,FlashBlade,HuaweiOBS,IBMCOS,IDrive,Intercolo,IONOS,Leviia,Liara,Linode,Magalu,Mega,Outscale,OVHcloud,Petabox,Qiniu,RackCorp,Scaleway,Selectel,SpectraLogic,StackPath,Storj,TencentCOS",
Provider: "!AWS,Alibaba,ArvanCloud,ChinaMobile,Cloudflare,Cubbit,FlashBlade,FileLu,HuaweiOBS,IBMCOS,IDrive,Intercolo,IONOS,Leviia,Liara,Linode,Magalu,Mega,Outscale,OVHcloud,Petabox,Qiniu,Rabata,RackCorp,Scaleway,Selectel,Servercore,SpectraLogic,StackPath,Storj,TencentCOS",
}, {
Name: "acl",
Help: `Canned ACL used when creating buckets and storing or copying objects.
@@ -2104,7 +2273,7 @@ doesn't copy the ACL from the source but rather writes a fresh one.
If the acl is an empty string then no X-Amz-Acl: header is added and
the default (private) will be used.
`,
Provider: "!Cloudflare,FlashBlade,Mega,Selectel,SpectraLogic,Storj,Synology",
Provider: "!Cloudflare,FlashBlade,Mega,Rabata,Selectel,Servercore,SpectraLogic,Storj,Synology",
Examples: []fs.OptionExample{{
Value: "default",
Help: "Owner gets Full_CONTROL.\nNo one else has access rights (default).",
@@ -2162,7 +2331,7 @@ isn't set then "acl" is used instead.
If the "acl" and "bucket_acl" are empty strings then no X-Amz-Acl:
header is added and the default (private) will be used.
`,
Provider: "!Cloudflare,FlashBlade,Selectel,SpectraLogic,Storj,Synology",
Provider: "!Cloudflare,FlashBlade,Rabata,Selectel,SpectraLogic,Storj,Synology",
Advanced: true,
Examples: []fs.OptionExample{{
Value: "private",
@@ -2291,6 +2460,15 @@ If you leave it blank, this is calculated automatically from the sse_customer_ke
Value: "GLACIER_IR",
Help: "Glacier Instant Retrieval storage class",
}},
}, {
// Mapping from here: https://www.arvancloud.ir/en/products/cloud-storage
Name: "storage_class",
Help: "The storage class to use when storing new objects in ArvanCloud.",
Provider: "ArvanCloud",
Examples: []fs.OptionExample{{
Value: "STANDARD",
Help: "Standard storage class",
}},
}, {
// Mapping from here: https://www.alibabacloud.com/help/doc-detail/64919.htm
Name: "storage_class",
@@ -2336,15 +2514,6 @@ If you leave it blank, this is calculated automatically from the sse_customer_ke
Value: "STANDARD",
Help: "Standard storage class",
}},
}, {
// Mapping from here: https://www.arvancloud.ir/en/products/cloud-storage
Name: "storage_class",
Help: "The storage class to use when storing new objects in ArvanCloud.",
Provider: "ArvanCloud",
Examples: []fs.OptionExample{{
Value: "STANDARD",
Help: "Standard storage class",
}},
}, {
// Mapping from here: https://docs.magalu.cloud/docs/storage/object-storage/Classes-de-Armazenamento/standard
Name: "storage_class",
@@ -2358,22 +2527,22 @@ If you leave it blank, this is calculated automatically from the sse_customer_ke
Help: "Glacier Instant Retrieval storage class",
}},
}, {
// Mapping from here: https://intl.cloud.tencent.com/document/product/436/30925
// Mapping from here: https://developer.qiniu.com/kodo/5906/storage-type
Name: "storage_class",
Help: "The storage class to use when storing new objects in Tencent COS.",
Provider: "TencentCOS",
Help: "The storage class to use when storing new objects in Qiniu.",
Provider: "Qiniu",
Examples: []fs.OptionExample{{
Value: "",
Help: "Default",
}, {
Value: "STANDARD",
Help: "Standard storage class",
}, {
Value: "ARCHIVE",
Value: "LINE",
Help: "Infrequent access storage mode",
}, {
Value: "GLACIER",
Help: "Archive storage mode",
}, {
Value: "STANDARD_IA",
Help: "Infrequent access storage mode",
Value: "DEEP_ARCHIVE",
Help: "Deep archive storage mode",
}},
}, {
// Mapping from here: https://www.scaleway.com/en/docs/storage/object/quickstart/
@@ -2394,22 +2563,22 @@ If you leave it blank, this is calculated automatically from the sse_customer_ke
Help: "One Zone - Infrequent Access.\nA good choice for storing secondary backup copies or easily re-creatable data.\nAvailable in the FR-PAR region only.",
}},
}, {
// Mapping from here: https://developer.qiniu.com/kodo/5906/storage-type
// Mapping from here: https://intl.cloud.tencent.com/document/product/436/30925
Name: "storage_class",
Help: "The storage class to use when storing new objects in Qiniu.",
Provider: "Qiniu",
Help: "The storage class to use when storing new objects in Tencent COS.",
Provider: "TencentCOS",
Examples: []fs.OptionExample{{
Value: "",
Help: "Default",
}, {
Value: "STANDARD",
Help: "Standard storage class",
}, {
Value: "LINE",
Help: "Infrequent access storage mode",
}, {
Value: "GLACIER",
Value: "ARCHIVE",
Help: "Archive storage mode",
}, {
Value: "DEEP_ARCHIVE",
Help: "Deep archive storage mode",
Value: "STANDARD_IA",
Help: "Infrequent access storage mode",
}},
}, {
Name: "upload_cutoff",
@@ -3658,6 +3827,8 @@ func setQuirks(opt *Options) {
case "Alibaba":
useMultipartEtag = false // Alibaba seems to calculate multipart Etags differently from AWS
useAlreadyExists = true // returns 200 OK
case "Hetzner":
useAlreadyExists = false
case "HuaweiOBS":
// Huawei OBS PFS is not support listObjectV2, and if turn on the urlEncodeListing, marker will not work and keep list same page forever.
urlEncodeListings = false
@@ -3676,6 +3847,9 @@ func setQuirks(opt *Options) {
case "Cloudflare":
virtualHostStyle = false
useMultipartEtag = false // currently multipart Etags are random
case "Cubbit":
// no quirks
useMultipartEtag = false // Cubbit calculates multipart Etags differently from AWS
case "ArvanCloud":
listObjectsV2 = false
virtualHostStyle = false
@@ -3690,6 +3864,11 @@ func setQuirks(opt *Options) {
case "FlashBlade":
mightGzip = false // Never auto gzips objects
virtualHostStyle = false // supports vhost but defaults to paths
case "FileLu":
listObjectsV2 = false
virtualHostStyle = false
urlEncodeListings = false
useMultipartEtag = false
case "IBMCOS":
listObjectsV2 = false // untested
virtualHostStyle = false
@@ -3744,6 +3923,8 @@ func setQuirks(opt *Options) {
virtualHostStyle = false
case "OVHcloud":
// No quirks
case "Rabata":
// server side copy not supported
case "RackCorp":
// No quirks
useMultipartEtag = false // untested
@@ -3768,6 +3949,8 @@ func setQuirks(opt *Options) {
useAlreadyExists = true
case "Selectel":
urlEncodeListings = false
case "Servercore":
urlEncodeListings = false
case "SeaweedFS":
listObjectsV2 = false // untested
virtualHostStyle = false
@@ -4024,6 +4207,12 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
if opt.Provider == "AWS" {
f.features.DoubleSlash = true
}
if opt.Provider == "Rabata" {
f.features.Copy = nil
}
if opt.Provider == "Hetzner" {
f.features.SetTier = false
}
if opt.DirectoryMarkers {
f.features.CanHaveEmptyDirectories = true
}
@@ -6159,6 +6348,10 @@ func (o *Object) ModTime(ctx context.Context) time.Time {
// SetModTime sets the modification time of the local fs object
func (o *Object) SetModTime(ctx context.Context, modTime time.Time) error {
if o.fs.opt.Provider == "Rabata" {
// Rabata does not support copying objects
return fs.ErrorCantSetModTime
}
err := o.readMetaData(ctx)
if err != nil {
return err
+23
View File
@@ -561,6 +561,21 @@ func (f *Fs) setRoot(root string) {
f.rootContainer, f.rootDirectory = bucket.Split(f.root)
}
// Fetch the base container's policy to be used if/when we need to create a
// segments container to ensure we use the same policy.
func (f *Fs) fetchStoragePolicy(ctx context.Context, container string) (fs.Fs, error) {
err := f.pacer.Call(func() (bool, error) {
var rxHeaders swift.Headers
_, rxHeaders, err := f.c.Container(ctx, container)
f.opt.StoragePolicy = rxHeaders["X-Storage-Policy"]
fs.Debugf(f, "Auto set StoragePolicy to %s", f.opt.StoragePolicy)
return shouldRetryHeaders(ctx, rxHeaders, err)
})
return nil, err
}
// NewFsWithConnection constructs an Fs from the path, container:path
// and authenticated connection.
//
@@ -590,6 +605,7 @@ func NewFsWithConnection(ctx context.Context, opt *Options, name, root string, c
f.opt.UseSegmentsContainer.Valid = true
fs.Debugf(f, "Auto set use_segments_container to %v", f.opt.UseSegmentsContainer.Value)
}
if f.rootContainer != "" && f.rootDirectory != "" {
// Check to see if the object exists - ignoring directory markers
var info swift.Object
@@ -1132,6 +1148,13 @@ func (f *Fs) newSegmentedUpload(ctx context.Context, dstContainer string, dstPat
container: dstContainer,
}
if f.opt.UseSegmentsContainer.Value {
if f.opt.StoragePolicy == "" {
_, err = f.fetchStoragePolicy(ctx, dstContainer)
if err != nil {
return nil, err
}
}
su.container += segmentsContainerSuffix
err = f.makeContainer(ctx, su.container)
if err != nil {
+47
View File
@@ -76,6 +76,7 @@ func (f *Fs) testNoChunk(t *testing.T) {
// Additional tests that aren't in the framework
func (f *Fs) InternalTest(t *testing.T) {
t.Run("PolicyDiscovery", f.testPolicyDiscovery)
t.Run("NoChunk", f.testNoChunk)
t.Run("WithChunk", f.testWithChunk)
t.Run("WithChunkFail", f.testWithChunkFail)
@@ -195,4 +196,50 @@ func (f *Fs) testCopyLargeObject(t *testing.T) {
require.Equal(t, obj.Size(), objTarget.Size())
}
func (f *Fs) testPolicyDiscovery(t *testing.T) {
ctx := context.TODO()
container := "testPolicyDiscovery-1"
// Reset the policy so we can test if it is populated.
f.opt.StoragePolicy = ""
err := f.makeContainer(ctx, container)
require.NoError(t, err)
_, err = f.fetchStoragePolicy(ctx, container)
require.NoError(t, err)
// Default policy for SAIO image is 1replica.
assert.Equal(t, "1replica", f.opt.StoragePolicy)
// Create a container using a non-default policy, and check to ensure
// that the created segments container uses the same non-default policy.
policy := "Policy-1"
container = "testPolicyDiscovery-2"
f.opt.StoragePolicy = policy
err = f.makeContainer(ctx, container)
require.NoError(t, err)
// Reset the policy so we can test if it is populated, and set to the
// non-default policy.
f.opt.StoragePolicy = ""
_, err = f.fetchStoragePolicy(ctx, container)
require.NoError(t, err)
assert.Equal(t, policy, f.opt.StoragePolicy)
// Test that when a segmented upload container is made, the newly
// created container inherits the non-default policy of the base
// container.
f.opt.StoragePolicy = ""
f.opt.UseSegmentsContainer.Value = true
su, err := f.newSegmentedUpload(ctx, container, "")
require.NoError(t, err)
// The container name we expected?
segmentsContainer := container + segmentsContainerSuffix
assert.Equal(t, segmentsContainer, su.container)
// The policy we expected?
f.opt.StoragePolicy = ""
_, err = f.fetchStoragePolicy(ctx, su.container)
require.NoError(t, err)
assert.Equal(t, policy, f.opt.StoragePolicy)
}
var _ fstests.InternalTester = (*Fs)(nil)
+1 -1
View File
@@ -14,4 +14,4 @@ if [ -z "$globs" ]; then
exit 1
fi
docker run -v $PWD:/workdir --user $(id -u):$(id -g) davidanson/markdownlint-cli2 $globs
docker run --rm -v $PWD:/workdir --user $(id -u):$(id -g) davidanson/markdownlint-cli2 $globs
+11 -12
View File
@@ -2,6 +2,7 @@ package s3
import (
"fmt"
"strings"
"github.com/rclone/gofakes3"
"github.com/rclone/rclone/fs"
@@ -12,25 +13,23 @@ type logger struct{}
// print log message
func (l logger) Print(level gofakes3.LogLevel, v ...any) {
var s string
if len(v) == 0 {
s = ""
} else {
var ok bool
s, ok = v[0].(string)
if !ok {
s = fmt.Sprint(v[0])
var b strings.Builder
for i := range v {
if i > 0 {
fmt.Fprintf(&b, " ")
}
v = v[1:]
fmt.Fprint(&b, v[i])
}
s := b.String()
switch level {
default:
fallthrough
case gofakes3.LogErr:
fs.Errorf("serve s3", s, v...)
fs.Errorf("serve s3", s)
case gofakes3.LogWarn:
fs.Infof("serve s3", s, v...)
fs.Infof("serve s3", s)
case gofakes3.LogInfo:
fs.Debugf("serve s3", s, v...)
fs.Debugf("serve s3", s)
}
}
+8
View File
@@ -117,6 +117,7 @@ WebDAV or S3, that work out of the box.)
{{< provider name="Citrix ShareFile" home="http://sharefile.com/" config="/sharefile/" >}}
{{< provider name="Cloudflare R2" home="https://blog.cloudflare.com/r2-open-beta/" config="/s3/#cloudflare-r2" >}}
{{< provider name="Cloudinary" home="https://cloudinary.com/" config="/cloudinary/" >}}
{{< provider name="Cubbit DS3" home="https://cubbit.io/ds3-cloud" config="/s3/#Cubbit" >}}
{{< provider name="DigitalOcean Spaces" home="https://www.digitalocean.com/products/object-storage/" config="/s3/#digitalocean-spaces" >}}
{{< provider name="Digi Storage" home="https://storage.rcs-rds.ro/" config="/koofr/#digi-storage" >}}
{{< provider name="Dreamhost" home="https://www.dreamhost.com/cloud/storage/" config="/s3/#dreamhost" >}}
@@ -125,6 +126,7 @@ WebDAV or S3, that work out of the box.)
{{< provider name="Exaba" home="https://exaba.com/" config="/s3/#exaba" >}}
{{< provider name="Fastmail Files" home="https://www.fastmail.com/" config="/webdav/#fastmail-files" >}}
{{< provider name="FileLu Cloud Storage" home="https://filelu.com/" config="/filelu/" >}}
{{< provider name="FileLu S5 (S3-Compatible Object Storage)" home="https://s5lu.com/" config="/s3/#filelu-s5" >}}
{{< provider name="Files.com" home="https://www.files.com/" config="/filescom/" >}}
{{< provider name="FlashBlade" home="https://www.purestorage.com/products/unstructured-data-storage.html" config="/s3/#pure-storage-flashblade" >}}
{{< provider name="FTP" home="https://en.wikipedia.org/wiki/File_Transfer_Protocol" config="/ftp/" >}}
@@ -133,9 +135,11 @@ WebDAV or S3, that work out of the box.)
{{< provider name="Google Drive" home="https://www.google.com/drive/" config="/drive/" >}}
{{< provider name="Google Photos" home="https://www.google.com/photos/about/" config="/googlephotos/" >}}
{{< provider name="HDFS" home="https://hadoop.apache.org/" config="/hdfs/" >}}
{{< provider name="Hetzner Object Storage" home="https://www.hetzner.com/storage/object-storage/" config="/s3/#hetzner" >}}
{{< provider name="Hetzner Storage Box" home="https://www.hetzner.com/storage/storage-box" config="/sftp/#hetzner-storage-box" >}}
{{< provider name="HiDrive" home="https://www.strato.de/cloud-speicher/" config="/hidrive/" >}}
{{< provider name="HTTP" home="https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol" config="/http/" >}}
{{< provider name="Huawei OBS" home="https://www.huaweicloud.com/intl/en-us/product/obs.html" config="/s3/#huawei-obs" >}}
{{< provider name="iCloud Drive" home="https://icloud.com/" config="/iclouddrive/" >}}
{{< provider name="ImageKit" home="https://imagekit.io" config="/imagekit/" >}}
{{< provider name="Internet Archive" home="https://archive.org/" config="/internetarchive/" >}}
@@ -179,13 +183,17 @@ WebDAV or S3, that work out of the box.)
{{< provider name="QingStor" home="https://www.qingcloud.com/products/storage" config="/qingstor/" >}}
{{< provider name="Qiniu Cloud Object Storage (Kodo)" home="https://www.qiniu.com/en/products/kodo" config="/s3/#qiniu" >}}
{{< provider name="Quatrix by Maytech" home="https://www.maytech.net/products/quatrix-business" config="/quatrix/" >}}
{{< provider name="Rabata Cloud Storage" home="https://rabata.io" config="/s3/#Rabata" >}}
{{< provider name="RackCorp Object Storage" home="https://www.rackcorp.com/" config="/s3/#RackCorp" >}}
{{< provider name="Rackspace Cloud Files" home="https://www.rackspace.com/cloud/files" config="/swift/" >}}
{{< provider name="Rclone Serve S3" home="/commands/rclone_serve_s3/" config="/s3/#rclone" >}}
{{< provider name="rsync.net" home="https://rsync.net/products/rclone.html" config="/sftp/#rsync-net" >}}
{{< provider name="Scaleway" home="https://www.scaleway.com/object-storage/" config="/s3/#scaleway" >}}
{{< provider name="Seafile" home="https://www.seafile.com/" config="/seafile/" >}}
{{< provider name="Seagate Lyve Cloud" home="https://www.seagate.com/gb/en/services/cloud/storage/" config="/s3/#lyve" >}}
{{< provider name="SeaweedFS" home="https://github.com/chrislusf/seaweedfs/" config="/s3/#seaweedfs" >}}
{{< provider name="Selectel" home="https://selectel.ru/services/cloud/storage/" config="/s3/#selectel" >}}
{{< provider name="Servercore Object Storage" home="https://servercore.com/services/object-storage/" config="/s3/#servercore" >}}
{{< provider name="SFTP" home="https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol" config="/sftp/" >}}
{{< provider name="Sia" home="https://sia.tech/" config="/sia/" >}}
{{< provider name="SMB / CIFS" home="https://en.wikipedia.org/wiki/Server_Message_Block" config="/smb/" >}}
+6
View File
@@ -1016,3 +1016,9 @@ put them back in again.` >}}
- Matt LaPaglia <mlapaglia@gmail.com>
- Youfu Zhang <1315097+zhangyoufu@users.noreply.github.com>
- juejinyuxitu <juejinyuxitu@outlook.com>
- iTrooz <hey@itrooz.fr>
- Microscotch <github.com@microscotch.net>
- Andrew Ruthven <andrew@etc.gen.nz>
- spiffytech <git@spiffy.tech>
- Dulani Woods <Dulani@gmail.com>
- Marco Ferretti <mferretti93@gmail.com>
+23
View File
@@ -6,6 +6,29 @@ description: "Rclone Changelog"
# Changelog
## v1.71.2 - 2025-10-20
[See commits](https://github.com/rclone/rclone/compare/v1.71.1...v1.71.2)
- Bug Fixes
- build
- update Go to 1.25.3
- Update Docker image Alpine version to fix CVE-2025-9230
- bisync: Fix race when CaptureOutput is used concurrently (Nick Craig-Wood)
- doc fixes (albertony, dougal, iTrooz, Matt LaPaglia, Nick Craig-Wood)
- index: Add missing providers (dougal)
- serve http: Fix: logging URL on start (dougal)
- Azurefiles
- Fix server side copy not waiting for completion (Vikas Bhansali)
- B2
- Fix 1TB+ uploads (dougal)
- Google Cloud Storage
- Add region us-east5 (Dulani Woods)
- Mega
- Fix 402 payment required errors (Nick Craig-Wood)
- Pikpak
- Fix unnecessary retries by using URL expire parameter (Youfu Zhang)
## v1.71.1 - 2025-09-24
[See commits](https://github.com/rclone/rclone/compare/v1.71.0...v1.71.1)
+3 -1
View File
@@ -100,7 +100,9 @@ Choose a number from below, or type in your own value
\ "us-east1"
13 / Northern Virginia.
\ "us-east4"
14 / Oregon.
14 / Ohio.
\ "us-east5"
15 / Oregon.
\ "us-west1"
location> 12
The storage class to use when storing objects in Google Cloud Storage.
+140 -56
View File
@@ -28,76 +28,150 @@ as described [below](#whitelabel-authentication):
- Onlime
- Onlime (onlime.dk)
- MediaMarkt
- MediaMarkt Cloud (mediamarkt.jottacloud.com)
- Let's Go Cloud (letsgo.jotta.cloud)
Paths are specified as `remote:path`
Paths may be as deep as required, e.g. `remote:directory/subdirectory`.
## Authentication types
## Authentication
Some of the white-label versions uses a different authentication method than the
official service, and you have to choose the correct one when setting up the remote.
Authentication in Jottacloud is in general based on OAuth and OpenID Connect
(OIDC). There are different variants to choose from, depending on which service
you are using, e.g. a white-label service may only support one of them. Note
that there is no documentation to rely on, so the descriptions provided here
are based on observations and may not be accurate.
### Standard authentication
Jottacloud uses two optional OAuth security mechanisms, referred to as "Refresh
Token Rotation" and "Automatic Reuse Detection", which has some implications.
Access tokens normally have one hour expiry, after which they need to be
refreshed (rotated), an operation that requires the refresh token to be
supplied. Rclone does this automatically. This is standard OAuth. But in
Jottacloud, such a refresh operation not only creates a new access token, but
also refresh token, and invalidates the existing refresh token, the one that
was supplied. It keeps track of the history of refresh tokens, sometimes
referred to as a token family, descending from the original refresh token that
was issued after the initial authentication. This is used to detect any
attempts at reusing old refresh tokens, and trigger an immedate invalidation of
the current refresh token, and effectively the entire refresh token family.
The standard authentication method used by the official service (jottacloud.com),
as well as some of the white-label services, is based on OAuth 2.0 and OpenID
Connect (OIDC), and requires you to generate a single-use personal login token
from the account security settings in the service's web interface. Log in to your
account, go to "Settings" and then "Security", or use the direct link presented
to you by rclone when configuring the remote:
<https://www.jottacloud.com/web/secure>. Scroll down to the section "Personal login
token", and click the "Generate" button. Note that if you are using a white-label
service you probably can't use the direct link, you need to find the same page in
their dedicated web interface, and also it may be in a different location than
described above.
To access your account from multiple instances of rclone, you need to configure
each of them with a separate personal login token. E.g. you create a Jottacloud
remote with rclone in one location, and copy the configuration file to a second
location where you also want to run rclone and access the same remote. Then you
need to replace the token for one of them, using the [config reconnect](https://rclone.org/commands/rclone_config_reconnect/)
command, which requires you to generate a new personal login token and supply
as input. If you do not do this, the token may easily end up being invalidated,
resulting in both instances failing with an error message something along the
When the current refresh token has been invalidated, next time rclone tries to
perform a token refresh, it will fail with an error message something along the
lines of:
```text
oauth2: cannot fetch token: 400 Bad Request
Response: {"error":"invalid_grant","error_description":"Stale token"}
CRITICAL: Failed to create file system for "remote:": (...): couldn't fetch token: invalid_grant: maybe token expired? - try refreshing with "rclone config reconnect remote:"
```
When this happens, you need to replace the token as described above to be able
to use your remote again.
If you run rclone with verbosity level 2 (`-vv`), you will see a debug message
with an additional error description from the OAuth response:
All personal login tokens you have taken into use will be listed in the web
interface under "My logged in devices", and from the right side of that list
you can click the "X" button to revoke individual tokens.
```text
DEBUG : remote: got fatal oauth error: oauth2: "invalid_grant" "Session doesn't have required client"
```
### Whitelabel authentication
(The error description used to be "Stale token" instead of "Session doesn't
have required client", so you may see references to that in older descriptions
of this situation.)
Most of the white-label versions uses a slightly different authentication flow,
where it doesn't offer the option of creating a CLI token, and the username
is generated internally. To setup rclone to use one of these, choose white-label
authentication in the setup process, and then select the specific service
in the next step.
When this happens, you need to re-authenticate to be able to use your remote
again, e.g. using the [config reconnect](/commands/rclone_config_reconnect/)
command as suggested in the error message. This will create an entirely new
refresh token (family).
Note that when setting this up, you need to be on a machine with an
internet-connected web browser. If you need it on a machine where this is not
the case, then you will have to create the configuration on a different machine
and copy it from there. The jottacloud backend does not support the
`rclone authorize` command. See the [remote setup docs](/remote_setup) for
details.
A typical example of how you may end up in this situation, is if you create
a Jottacloud remote with rclone in one location, and then copy the
configuration file to a second location where you start using rclone to access
the same remote. Eventually there will now be a token refresh attempt with an
invalidated token, i.e. refresh token reuse, resulting in both instances
starting to fail with the "invalid_grant" error. It is possible to copy remote
configurations, but you must then replace the token for one of them using the
[config reconnect](https://rclone.org/commands/rclone_config_reconnect/)
command.
### Legacy authentication
You can get some overview of your active tokens in your service's web user
interface, if you navigate to "Settings" and then "Security" (in which case
you end up at <https://www.jottacloud.com/web/secure> or similar). Down on
that page you have a section "My logged in devices". This contains a list
of entries which seemingly represents currently valid refresh tokens, or
refresh token families. From the right side of that list you can click a
button ("X") to revoke (invalidate) it, which means you will still have access
using an existing access token until that expires, but you will not be able to
perform a token refresh. Note that this entire "My logged in devices" feature
seem to behave a bit differently with different authentication variants and
with use of the different (white-label) services.
Originally Jottacloud used an older authentication method, not based on OpenID
Connect, which required the username and password to be specified. Since
Jottacloud migrated to the newer method, handled by the standard authentication,
some white-label versions (those from Elkjøp) still used the legacy method for
a long time. Currently there are no known uses of this, it is still supported
by rclone, but the support will be removed in a future version.
### Standard
This is an OAuth variant designed for command-line applications. It is
primarily supported by the official service (jottacloud.com), but may also be
supported by some of the white-label services. The information necessary to be
able to perform authentication, like domain name and endpoint to connect to,
are found automatically (it is encoded into the supplied login token, described
next), so you do not need to specify which service to configure.
When configuring a remote, you are asked to enter a single-use personal login
token, which you must manually generate from the account security settings in
the service's web interface. You do not need a web browser on the same machine
like with traditional OAuth, but need to use a web browser somewhere, and be
able to be copy the generated string into your rclone configuration session.
Log in to your service's web user interface, navigate to "Settings" and then
"Security", or, for the official service, use the direct link presented to you
by rclone when configuring the remote: <https://www.jottacloud.com/web/secure>.
Scroll down to the section "Personal login token", and click the "Generate"
button. Copy the presented string and paste it where rclone asks for it. Rclone
will then use this to perform an initial token request, and receive a regular
OAuth token which it stores in your remote configuration. There will then also
be a new entry in the "My logged in devices" list in the web interface, with
device name and application name "Jottacloud CLI".
Each time a new token is created this way, i.e. a new personal login token is
generated and traded in for an OAuth token, you get an entirely new refresh
token family, with a new entry in the "My logged in devices". You can create as
many remotes as you want, and use multiple instances of rclone on same or
different machine, as long as you configure them separately like this, and not
get your self into the refresh token reuse issue described above.
### Traditional
Jottacloud also supports a more traditional OAuth variant. Most of the
white-label services support this, and for many of them this is the only
alternative because they do not support personal login tokens. This method
relies on pre-defined service-specific domain names and endpoints, and rclone
need you to specify which service to configure. This also means that any
changes to existing or additions of new white-label services needs an update
in the rclone backend implementation.
When configuring a remote, you must interactively login to an OAuth
authorization web site, and a one-time authorization code is sent back to
rclone behind the scene, which it uses to request an OAuth token. This means
that you need to be on a machine with an internet-connected web browser. If you
need it on a machine where this is not the case, then you will have to create
the configuration on a different machine and copy it from there. The Jottacloud
backend does not support the `rclone authorize` command. See the
[remote setup docs](/remote_setup) for details.
Jottacloud exerts some form of strict session management when authenticating
using this method. This leads to some unexpected cases of the "invalid_grant"
error described above, and effectively limits you to only use of a single
active authentication on the same machine. I.e. you can only create a single
rclone remote, and you can't even log in with the service's official desktop
client while having a rclone remote configured, or else you will eventually get
all sessions invalidated and are forced to re-authenticate.
When you have successfully authenticated, there will be an entry in the
"My logged in devices" list in the web interface representing your session. It
will typically be listed with application name "Jottacloud for Desktop" or
similar (it depends on the white-label service configuration).
### Legacy
Originally Jottacloud used an OAuth variant which required your account's
username and password to be specified. When Jottacloud migrated to the newer
methods, some white-label versions (those from Elkjøp) still used this legacy
method for a long time. Currently there are no known uses of this, it is still
supported by rclone, but the support will be removed in a future version.
## Configuration
@@ -151,19 +225,29 @@ Type of authentication.
Choose a number from below, or type in an existing value of type string.
Press Enter for the default (standard).
/ Standard authentication.
1 | Use this if you're a normal Jottacloud user.
| This is primarily supported by the official service, but may also be
| supported by some white-label services. It is designed for command-line
1 | applications, and you will be asked to enter a single-use personal login
| token which you must manually generate from the account security settings
| in the web interface of your service.
\ (standard)
/ Whitelabel authentication.
2 | Use this if you are using the service offered by a third party such as Telia, Tele2, Onlime, Elkjøp, etc.
\ (whitelabel)
/ Traditional authentication.
| This is supported by the official service and all white-label services
| that rclone knows about. You will be asked which service to connect to.
2 | It has a limitation of only a single active authentication at a time. You
| need to be on, or have access to, a machine with an internet-connected
| web browser.
\ (traditional)
/ Legacy authentication.
3 | This is no longer supported by any known services and not recommended for normal users.
3 | This is no longer supported by any known services and not recommended
| used. You will be asked for your account's username and password.
\ (legacy)
config_type> 1
Option config_login_token.
Personal login token.
Generate here: https://www.jottacloud.com/web/secure
Generate it from the account security settings in the web interface of your
service, for the official service on https://www.jottacloud.com/web/secure.
Enter a value.
config_login_token> <your token here>
+103
View File
@@ -131,6 +131,109 @@ section and followed by the privacy policy of Rclone.
local configuration file.
- Rclone does not share any user data with third parties.
## User Data Collection and Storage
This section outlines how rclone accesses, uses, stores, and shares
user data obtained from service provider APIs. Our use of information
received from provider APIs will adhere to the provider API Services
User Data Policy, including the Limited Use requirements.
Rclone is a client-side command-line program that users run on their
own computers to manage their files on cloud storage services. The
rclone project does not operate any servers that store or process your
personal data. All data access and processing occurs directly on the
user's machine and between the user's machine and the provider API
servers.
### Data Accessed
When you authorize rclone to access your files on your provider, it
may access the following types of data, depending on the permissions
you grant:
- Files: Rclone accesses the metadata (filenames, sizes, modification
times, etc.) and content of your files and folders on your provider.
This is necessary for rclone to perform file management tasks like
copying, syncing, moving, and listing files.
- Authentication Tokens: Rclone requests OAuth 2.0 access tokens from
the provider. These tokens are used to authenticate your requests to
the provider's APIs and prove that you have granted rclone
permission to access your data.
- Basic Profile Information: As part of the authentication process,
rclone may receive your email address to identify the connected
account within the rclone configuration.
### Data Usage
Rclone uses the user data it accesses solely to provide its core
functionality, which is initiated and controlled entirely by you, the
user. Specifically:
- The data is used to perform file transfer and management operations
(such as `copy`, `sync`, `move`, `list`, `delete`) between your
local machine and your provider account as per your direct commands.
- Authentication tokens are used exclusively to make authorized API
calls to the provider's services on your behalf.
- Your email address is used locally to help you identify which
provider account is configured.
Rclone does not use your data for any other purpose, such as
advertising, marketing, or analysis by the rclone project developers.
### Data Sharing
Rclone does not share your user data with any third parties.
All data transfers initiated by the user occur directly between the
machine where rclone is running and the provider's servers. The rclone
project and its developers **never** have access to your
authentication tokens or your file data.
### Data Storage & Protection
- Configuration Data: Rclone stores its configuration, including the
OAuth 2.0 tokens required to access your provider account, in a
configuration file (`rclone.conf`) located on your local machine.
- Security: You are responsible for securing this configuration
file on your own computer. Rclone provides a built-in option to
encrypt the configuration file with a password for an added layer of
security. We strongly recommend using this feature.
- File Data: Your file data is only held in your computer's memory
(RAM) temporarily during transfer operations. Rclone does not
permanently store your file content on your local disk unless you
explicitly command it to do so (e.g., by running a `copy` command
from the provider to a local directory).
### Data Retention & Deletion
Rclone gives you full control over your data.
- Data Retention: Rclone retains the configuration data, including
authentication tokens, on your local machine for as long as you keep
the configuration file. This allows you to use rclone without having
to re-authenticate for every session.
- Data Deletion: You can delete your data and revoke rclone's
access at any time through one of the following methods:
1. Local Deletion: You can delete the specific provider
configuration from your `rclone.conf` file or delete the entire
file itself. This will permanently remove the authentication
tokens from your machine.
2. Revoking Access via the provider: You can revoke rclone's
access to your provider directly from your the providers's
security settings page. This will invalidate the authentication
tokens, and rclone will no longer be able to access your data.
For example, if you are using Google you can manage your permissions
[on the Google permissions page](https://myaccount.google.com/permissions).
## Resources & Further Information
- [Data Protection Act 1998](http://www.legislation.gov.uk/ukpga/1998/29/contents)
+539
View File
@@ -18,10 +18,13 @@ The S3 backend can be used with a number of different providers:
{{< provider name="China Mobile Ecloud Elastic Object Storage (EOS)" home="https://ecloud.10086.cn/home/product-introduction/eos/" config="/s3/#china-mobile-ecloud-eos" >}}
{{< provider name="Cloudflare R2" home="https://blog.cloudflare.com/r2-open-beta/" config="/s3/#cloudflare-r2" >}}
{{< provider name="Arvan Cloud Object Storage (AOS)" home="https://www.arvancloud.com/en/products/cloud-storage" config="/s3/#arvan-cloud" >}}
{{< provider name="Cubbit DS3" home="https://cubbit.io/ds3-cloud" config="/s3/#Cubbit" >}}
{{< provider name="DigitalOcean Spaces" home="https://www.digitalocean.com/products/object-storage/" config="/s3/#digitalocean-spaces" >}}
{{< provider name="Dreamhost" home="https://www.dreamhost.com/cloud/storage/" config="/s3/#dreamhost" >}}
{{< provider name="Exaba" home="https://exaba.com/" config="/s3/#exaba" >}}
{{< provider name="FileLu S5 (S3-Compatible Object Storage)" home="https://s5lu.com/" config="/s3/#filelu-s5" >}}
{{< provider name="GCS" home="https://cloud.google.com/storage/docs" config="/s3/#google-cloud-storage" >}}
{{< provider name="Hetzner" home="https://www.hetzner.com/storage/object-storage/" config="/s3/#hetzner" >}}
{{< provider name="Huawei OBS" home="https://www.huaweicloud.com/intl/en-us/product/obs.html" config="/s3/#huawei-obs" >}}
{{< provider name="IBM COS S3" home="http://www.ibm.com/cloud/object-storage" config="/s3/#ibm-cos-s3" >}}
{{< provider name="IDrive e2" home="https://www.idrive.com/e2/?refer=rclone" config="/s3/#idrive-e2" >}}
@@ -38,12 +41,14 @@ The S3 backend can be used with a number of different providers:
{{< provider name="Petabox" home="https://petabox.io/" config="/s3/#petabox" >}}
{{< provider name="Pure Storage FlashBlade" home="https://www.purestorage.com/products/unstructured-data-storage.html" config="/s3/#pure-storage-flashblade" >}}
{{< provider name="Qiniu Cloud Object Storage (Kodo)" home="https://www.qiniu.com/en/products/kodo" config="/s3/#qiniu" >}}
{{< provider name="Rabata Cloud Storage" home="https://rabata.io" config="/s3/#Rabata" >}}
{{< provider name="RackCorp Object Storage" home="https://www.rackcorp.com/" config="/s3/#RackCorp" >}}
{{< provider name="Rclone Serve S3" home="/commands/rclone_serve_s3/" config="/s3/#rclone" >}}
{{< provider name="Scaleway" home="https://www.scaleway.com/en/object-storage/" config="/s3/#scaleway" >}}
{{< provider name="Seagate Lyve Cloud" home="https://www.seagate.com/gb/en/services/cloud/storage/" config="/s3/#lyve" >}}
{{< provider name="SeaweedFS" home="https://github.com/chrislusf/seaweedfs/" config="/s3/#seaweedfs" >}}
{{< provider name="Selectel" home="https://selectel.ru/services/cloud/storage/" config="/s3/#selectel" >}}
{{< provider name="Servercore Object Storage" home="https://servercore.com/services/object-storage/" config="/s3/#servercore" >}}
{{< provider name="Spectra Logic" home="https://spectralogic.com/blackpearl-nearline-object-gateway" config="/s3/#spectralogic" >}}
{{< provider name="StackPath" home="https://www.stackpath.com/products/object-storage/" config="/s3/#stackpath" >}}
{{< provider name="Storj" home="https://storj.io/" config="/s3/#storj" >}}
@@ -3231,6 +3236,47 @@ does. If this is causing a problem then upload the files with
A consequence of this is that `Content-Encoding: gzip` will never
appear in the metadata on Cloudflare.
### Cubbit DS3 {#Cubbit}
[Cubbit Object Storage](https://www.cubbit.io/ds3-cloud) is a geo-distributed cloud object storage platform.
To connect to Cubbit DS3 you will need an access key and secret key pair. You can follow this [guide](https://docs.cubbit.io/getting-started/quickstart#api-keys) to retrieve these keys. They will be needed when prompted by `rclone config`.
Default region will correspond to `eu-west-1` and the endpoint has to be specified as `s3.cubbit.eu`.
Going through the whole process of creating a new remote by running `rclone config`, each prompt should be answered as shown below:
```
name> cubbit-ds3 (or any name you like)
Storage> s3
provider> Cubbit
env_auth> false
access_key_id> YOUR_ACCESS_KEY
secret_access_key> YOUR_SECRET_KEY
region> eu-west-1 (or leave empty)
endpoint> s3.cubbit.eu
acl>
```
The resulting configuration file should look like:
```
[cubbit-ds3]
type = s3
provider = Cubbit
access_key_id = ACCESS_KEY
secret_access_key = SECRET_KEY
region = eu-west-1
endpoint = s3.cubbit.eu
```
You can then start using Cubbit DS3 with rclone. For example, to create a new bucket and copy files into it, you can run:
```
rclone mkdir cubbit-ds3:my-bucket
rclone copy /path/to/files cubbit-ds3:my-bucket
```
### DigitalOcean Spaces
[Spaces](https://www.digitalocean.com/products/object-storage/) is an [S3-interoperable](https://developers.digitalocean.com/documentation/spaces/) object storage service from cloud provider DigitalOcean.
@@ -3400,6 +3446,150 @@ endpoint = https://storage.googleapis.com
This is Google bug [#312292516](https://issuetracker.google.com/u/0/issues/312292516).
### Hetzner Object Storage {#hetzner}
Here is an example of making a [Hetzner Object Storage](https://www.hetzner.com/storage/object-storage/)
configuration. First run:
rclone config
This will guide you through an interactive setup process.
```
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
Enter name for new remote.
name> my-hetzner
Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
[snip]
XX / Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, Hetzner, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Magalu, Minio, Netease, Outscale, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, Selectel, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others
\ (s3)
[snip]
Storage> s3
Option provider.
Choose your S3 provider.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
[snip]
XX / Hetzner Object Storage
\ (Hetzner)
[snip]
provider> Hetzner
Option env_auth.
Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars).
Only applies if access_key_id and secret_access_key is blank.
Choose a number from below, or type in your own boolean value (true or false).
Press Enter for the default (false).
1 / Enter AWS credentials in the next step.
\ (false)
2 / Get AWS credentials from the environment (env vars or IAM).
\ (true)
env_auth>
Option access_key_id.
AWS Access Key ID.
Leave blank for anonymous access or runtime credentials.
Enter a value. Press Enter to leave empty.
access_key_id> ACCESS_KEY
Option secret_access_key.
AWS Secret Access Key (password).
Leave blank for anonymous access or runtime credentials.
Enter a value. Press Enter to leave empty.
secret_access_key> SECRET_KEY
Option region.
Region to connect to.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
1 / Helsinki
\ (hel1)
2 / Falkenstein
\ (fsn1)
3 / Nuremberg
\ (nbg1)
region>
Option endpoint.
Endpoint for Hetzner Object Storage
Choose a number from below, or type in your own value.
Press Enter to leave empty.
1 / Helsinki
\ (hel1.your-objectstorage.com)
2 / Falkenstein
\ (fsn1.your-objectstorage.com)
3 / Nuremberg
\ (nbg1.your-objectstorage.com)
endpoint>
Option location_constraint.
Location constraint - must be set to match the Region.
Leave blank if not sure. Used when creating buckets only.
Enter a value. Press Enter to leave empty.
location_constraint>
Option acl.
Canned ACL used when creating buckets and storing or copying objects.
This ACL is used for creating objects and if bucket_acl isn't set, for creating buckets too.
For more info visit https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl
Note that this ACL is applied when server-side copying objects as S3
doesn't copy the ACL from the source but rather writes a fresh one.
If the acl is an empty string then no X-Amz-Acl: header is added and
the default (private) will be used.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
/ Owner gets FULL_CONTROL.
1 | No one else has access rights (default).
\ (private)
/ Owner gets FULL_CONTROL.
2 | The AllUsers group gets READ access.
\ (public-read)
acl>
Edit advanced config?
y) Yes
n) No (default)
y/n>
Configuration complete.
Options:
- type: s3
- provider: Hetzner
- access_key_id: ACCESS_KEY
- secret_access_key: SECRET_KEY
Keep this "my-hetzner" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>
Current remotes:
Name Type
==== ====
my-hetzner s3
e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q>
```
This will leave the config file looking like this.
```
[my-hetzner]
type = s3
provider = Hetzner
access_key_id = ACCESS_KEY
secret_access_key = SECRET_KEY
region = hel1
endpoint = hel1.your-objectstorage.com
acl = private
```
### Huawei OBS {#huawei-obs}
Object Storage Service (OBS) provides stable, secure, efficient, and easy-to-use cloud storage that lets you store virtually any volume of unstructured data in any format and access it from anywhere.
@@ -5635,6 +5825,244 @@ Name Type
qiniu s3
```
### FileLu S5 {#filelu-s5}
[FileLu S5 Object Storage](https://s5lu.com) is an S3-compatible object storage system.
It provides multiple region options (Global, US-East, EU-Central, AP-Southeast, and ME-Central) while using a single endpoint (`s5lu.com`).
FileLu S5 is designed for scalability, security, and simplicity, with predictable pricing and no hidden charges for data transfers or API requests.
Here is an example of making a configuration. First run:
```sh
rclone config
```
This will guide you through an interactive setup process.
```text
No remotes found, make a new one\?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
Enter name for new remote.
name> s5lu
Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
[snip]
XX / Amazon S3 Compliant Storage Providers including AWS,... FileLu, ...
\ (s3)
[snip]
Storage> s3
Option provider.
Choose your S3 provider.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
[snip]
XX / FileLu S5 Object Storage
\ (FileLu)
[snip]
provider> FileLu
Option env_auth.
Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars).
Only applies if access_key_id and secret_access_key is blank.
Choose a number from below, or type in your own boolean value (true or false).
Press Enter for the default (false).
1 / Enter AWS credentials in the next step.
\ (false)
2 / Get AWS credentials from the environment (env vars or IAM).
\ (true)
env_auth>
Option access_key_id.
AWS Access Key ID.
Leave blank for anonymous access or runtime credentials.
Enter a value. Press Enter to leave empty.
access_key_id> XXX
Option secret_access_key.
AWS Secret Access Key (password).
Leave blank for anonymous access or runtime credentials.
Enter a value. Press Enter to leave empty.
secret_access_key> XXX
Option endpoint.
Endpoint for S3 API.
Required when using an S3 clone.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
1 / Global
\ (global)
2 / North America (US-East)
\ (us-east)
3 / Europe (EU-Central)
\ (eu-central)
4 / Asia Pacific (AP-Southeast)
\ (ap-southeast)
5 / Middle East (ME-Central)
\ (me-central)
region> 1
Edit advanced config?
y) Yes
n) No (default)
y/n> n
Configuration complete.
Options:
- type: s3
- provider: FileLu
- access_key_id: XXX
- secret_access_key: XXX
- endpoint: s5lu.com
Keep this "s5lu" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y
```
This will leave the config file looking like this.
```
[s5lu]
type = s3
provider = FileLu
access_key_id = XXX
secret_access_key = XXX
endpoint = s5lu.com
```
### Rabata {#Rabata}
[Rabata](https://rabata.io) is an S3-compatible secure cloud storage service that offers flat, transparent pricing (no API request fees)
while supporting standard S3 APIs. It is suitable for backup, application storage,media workflows, and archive use cases.
Server side copy is not implemented with Rabata, also meaning modification time of objects cannot be updated.
Rclone config:
```
rclone config
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
Enter name for new remote.
name> Rabata
Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
[snip]
XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
[snip]
Storage> s3
Option provider.
Choose your S3 provider.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
[snip]
XX / Rabata Cloud Storage
\ (Rabata)
[snip]
provider> Rabata
Option env_auth.
Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars).
Only applies if access_key_id and secret_access_key is blank.
Choose a number from below, or type in your own boolean value (true or false).
Press Enter for the default (false).
1 / Enter AWS credentials in the next step.
\ (false)
2 / Get AWS credentials from the environment (env vars or IAM).
\ (true)
env_auth>
Option access_key_id.
AWS Access Key ID.
Leave blank for anonymous access or runtime credentials.
Enter a value. Press Enter to leave empty.
access_key_id> ACCESS_KEY_ID
Option secret_access_key.
AWS Secret Access Key (password).
Leave blank for anonymous access or runtime credentials.
Enter a value. Press Enter to leave empty.
secret_access_key> SECRET_ACCESS_KEY
Option region.
Region where your bucket will be created and your data stored.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
1 / US East (N. Virginia)
\ (us-east-1)
2 / EU (Ireland)
\ (eu-west-1)
3 / EU (London)
\ (eu-west-2)
region> 3
Option endpoint.
Endpoint for Rabata Object Storage.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
1 / US East (N. Virginia)
\ (s3.us-east-1.rabata.io)
2 / EU West (Ireland)
\ (s3.eu-west-1.rabata.io)
3 / EU West (London)
\ (s3.eu-west-2.rabata.io)
endpoint> 3
Option location_constraint.
location where your bucket will be created and your data stored.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
1 / US East (N. Virginia)
\ (us-east-1)
2 / EU (Ireland)
\ (eu-west-1)
3 / EU (London)
\ (eu-west-2)
location_constraint> 3
Edit advanced config?
y) Yes
n) No (default)
y/n> n
Configuration complete.
Options:
- type: s3
- provider: Rabata
- access_key_id: ACCESS_KEY_ID
- secret_access_key: SECRET_ACCESS_KEY
- region: eu-west-2
- endpoint: s3.eu-west-2.rabata.io
- location_constraint: eu-west-2
Keep this "rabata" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y
Current remotes:
Name Type
==== ====
rabata s3
```
### RackCorp {#RackCorp}
[RackCorp Object Storage](https://www.rackcorp.com/storage/s3storage) is an S3 compatible object storage platform from your friendly cloud provider RackCorp.
@@ -6019,6 +6447,117 @@ region = ru-1
endpoint = s3.ru-1.storage.selcloud.ru
```
### Servercore {#servercore}
[Servercore Object Storage](https://servercore.io/object-storage/) is an S3
compatible object storage system that provides scalable and secure storage
solutions for businesses of all sizes.
rclone config example:
```
No remotes found, make a new one\?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
Enter name for new remote.
name> servercore
Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
[snip]
XX / Amazon S3 Compliant Storage Providers including ..., Servercore, ...
\ (s3)
[snip]
Storage> s3
Option provider.
Choose your S3 provider.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
[snip]
XX / Servercore Object Storage
\ (Servercore)
[snip]
provider> Servercore
Option env_auth.
Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars).
Only applies if access_key_id and secret_access_key is blank.
Choose a number from below, or type in your own boolean value (true or false).
Press Enter for the default (false).
1 / Enter AWS credentials in the next step.
\ (false)
2 / Get AWS credentials from the environment (env vars or IAM).
\ (true)
env_auth> 1
Option access_key_id.
AWS Access Key ID.
Leave blank for anonymous access or runtime credentials.
Enter a value. Press Enter to leave empty.
access_key_id> ACCESS_KEY
Option secret_access_key.
AWS Secret Access Key (password).
Leave blank for anonymous access or runtime credentials.
Enter a value. Press Enter to leave empty.
secret_access_key> SECRET_ACCESS_KEY
Option region.
Region where your is data stored.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
1 / St. Petersburg
\ (ru-1)
2 / Moscow
\ (gis-1)
3 / Moscow
\ (ru-7)
4 / Tashkent, Uzbekistan
\ (uz-2)
5 / Almaty, Kazakhstan
\ (kz-1)
region> 1
Option endpoint.
Endpoint for Servercore Object Storage.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
1 / Saint Petersburg
\ (s3.ru-1.storage.selcloud.ru)
2 / Moscow
\ (s3.gis-1.storage.selcloud.ru)
3 / Moscow
\ (s3.ru-7.storage.selcloud.ru)
4 / Tashkent, Uzbekistan
\ (s3.uz-2.srvstorage.uz)
5 / Almaty, Kazakhstan
\ (s3.kz-1.srvstorage.kz)
endpoint> 1
Edit advanced config?
y) Yes
n) No (default)
y/n> n
Configuration complete.
Options:
- type: s3
- provider: Servercore
- access_key_id: ACCESS_KEY
- secret_access_key: SECRET_ACCESS_KEY
- region: ru-1
- endpoint: s3.ru-1.storage.selcloud.ru
Keep this "servercore" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y
```
### Spectra Logic {#spectralogic}
[Spectra Logic](https://www.spectralogic.com/blackpearl-nearline-object-gateway)
+2 -2
View File
@@ -59,14 +59,14 @@ Thank you very much to our sponsors:
<!-- markdownlint-capture -->
<!-- markdownlint-disable line-length no-bare-urls -->
{{< sponsor src="/img/logos/backblaze.svg" width="300" height="200" title="Visit our sponsor Backblaze" link="https://www.backblaze.com/cloud-storage-rclonead?utm_source=rclone&utm_medium=paid&utm_campaign=rclone-website-20250715">}}
{{< sponsor src="/img/logos/idrive_e2.svg" width="300" height="200" title="Visit our sponsor IDrive e2" link="https://www.idrive.com/e2/?refer=rclone">}}
{{< sponsor src="/img/logos/filescom-enterprise-grade-workflows.png" width="300" height="200" title="Start Your Free Trial Today" link="https://files.com/?utm_source=rclone&utm_medium=referral&utm_campaign=banner&utm_term=rclone">}}
{{< sponsor src="/img/logos/mega-s4.svg" width="300" height="200" title="MEGA S4: New S3 compatible object storage. High scale. Low cost. Free egress." link="https://mega.io/objectstorage?utm_source=rclone&utm_medium=referral&utm_campaign=rclone-mega-s4&mct=rclonepromo">}}
{{< sponsor src="/img/logos/sia.svg" width="200" height="200" title="Visit our sponsor sia" link="https://sia.tech">}}
{{< sponsor src="/img/logos/route4me.svg" width="400" height="200" title="Visit our sponsor Route4Me" link="https://route4me.com/">}}
{{< sponsor src="/img/logos/rcloneview.svg" width="300" height="200" title="Visit our sponsor RcloneView" link="https://rcloneview.com/">}}
{{< sponsor src="/img/logos/rcloneui.svg" width="300" height="200" title="Visit our sponsor RcloneUI" link="https://github.com/rclone-ui/rclone-ui">}}
{{< sponsor src="/img/logos/filelu-rclone.svg" width="330" height="200" title="Visit our sponsor FileLu" link="https://filelu.com/">}}
{{< sponsor src="/img/logos/filelu-rclone.svg" width="300" height="200" title="Visit our sponsor FileLu" link="https://filelu.com/">}}
{{< sponsor src="/img/logos/torbox.png" width="200" height="200" title="Visit our sponsor TORBOX" link="https://www.torbox.app/">}}
<!-- markdownlint-restore -->
-9
View File
@@ -9,15 +9,6 @@
</div>
{{end}}
<div class="card">
<div class="card-header">
Platinum Sponsor
</div>
<div class="card-body">
<a href="https://www.backblaze.com/cloud-storage-rclonead?utm_source=rclone&utm_medium=paid&utm_campaign=rclone-website-20250715" target="_blank" rel="noopener" title="Visit rclone's sponsor Backblaze"><img src="/img/logos/backblaze.svg"></a><br />
</div>
</div>
<div class="card">
<div class="card-header">
Gold Sponsor
+4 -2
View File
@@ -8,10 +8,12 @@ PORT=28628
. $(dirname "$0")/docker.bash
start() {
# We need to replace the remakerings in the container to create Policy-1.
docker run --rm -d --name ${NAME} \
-p 127.0.0.1:${PORT}:8080 \
bouncestorage/swift-aio
-v $(dirname "$0")/TestSwiftAIO.d/remakerings:/etc/swift/remakerings:ro \
openstackswift/saio
echo type=swift
echo env_auth=false
echo user=test:tester
+46
View File
@@ -0,0 +1,46 @@
#!/bin/sh
if ! grep -q "^\[storage-policy:1\]" swift.conf; then
cat <<EOF >> swift.conf
[storage-policy:1]
name = Policy-1
EOF
fi
rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz
swift-ring-builder object.builder create 10 1 1
swift-ring-builder object.builder add r1z1-127.0.0.1:6200/swift-d0 1
swift-ring-builder object.builder add r1z1-127.0.0.1:6200/swift-d1 1
swift-ring-builder object.builder add r1z1-127.0.0.1:6200/swift-d2 1
swift-ring-builder object.builder add r1z1-127.0.0.1:6200/swift-d3 1
swift-ring-builder object.builder add r1z1-127.0.0.1:6200/swift-d4 1
swift-ring-builder object.builder add r1z1-127.0.0.1:6200/swift-d5 1
swift-ring-builder object.builder rebalance
swift-ring-builder container.builder create 10 1 1
swift-ring-builder container.builder add r1z1-127.0.0.1:6201/swift-d0 1
swift-ring-builder container.builder add r1z1-127.0.0.1:6201/swift-d1 1
swift-ring-builder container.builder add r1z1-127.0.0.1:6201/swift-d2 1
swift-ring-builder container.builder add r1z1-127.0.0.1:6201/swift-d3 1
swift-ring-builder container.builder add r1z1-127.0.0.1:6201/swift-d4 1
swift-ring-builder container.builder add r1z1-127.0.0.1:6201/swift-d5 1
swift-ring-builder container.builder rebalance
swift-ring-builder account.builder create 10 1 1
swift-ring-builder account.builder add r1z1-127.0.0.1:6202/swift-d0 1
swift-ring-builder account.builder add r1z1-127.0.0.1:6202/swift-d1 1
swift-ring-builder account.builder add r1z1-127.0.0.1:6202/swift-d2 1
swift-ring-builder account.builder add r1z1-127.0.0.1:6202/swift-d3 1
swift-ring-builder account.builder add r1z1-127.0.0.1:6202/swift-d4 1
swift-ring-builder account.builder add r1z1-127.0.0.1:6202/swift-d5 1
swift-ring-builder account.builder rebalance
# For Policy-1:
swift-ring-builder object-1.builder create 10 1 1
swift-ring-builder object-1.builder add r1z1-127.0.0.1:6200/swift-d0 1
swift-ring-builder object-1.builder add r1z1-127.0.0.1:6200/swift-d1 1
swift-ring-builder object-1.builder add r1z1-127.0.0.1:6200/swift-d2 1
swift-ring-builder object-1.builder add r1z1-127.0.0.1:6200/swift-d3 1
swift-ring-builder object-1.builder add r1z1-127.0.0.1:6200/swift-d4 1
swift-ring-builder object-1.builder add r1z1-127.0.0.1:6200/swift-d5 1
swift-ring-builder object-1.builder rebalance
@@ -8,9 +8,11 @@ PORT=28632
. $(dirname "$0")/docker.bash
start() {
# We need to replace the remakerings in the container to create Policy-1.
docker run --rm -d --name ${NAME} \
-p 127.0.0.1:${PORT}:8080 \
bouncestorage/swift-aio
-v $(dirname "$0")/TestSwiftAIO.d/remakerings:/etc/swift/remakerings:ro \
openstackswift/saio
echo type=swift
echo env_auth=false
+12 -3
View File
@@ -110,7 +110,7 @@ func start(name string) error {
return nil
}
// If we got a _connect value then try to connect to it
const maxTries = 30
const maxTries = 100
var rdBuf = make([]byte, 1)
for i := 1; i <= maxTries; i++ {
if i != 0 {
@@ -175,7 +175,16 @@ func Start(remoteName string) (fn func(), err error) {
if running[name] <= 0 {
// if server isn't running check to see if this server has
// been started already but not by us and stop it if so
if os.Getenv(envKey(name, "type")) == "" && isRunning(name) {
const maxTries = 10
for i := 1; i <= maxTries; i++ {
if os.Getenv(envKey(name, "type")) == "" && !isRunning(name) {
fs.Logf(name, "Stopped server")
break
}
if i != 1 {
time.Sleep(time.Second)
fs.Logf(name, "Attempting to stop %s try %d/%d", name, i, maxTries)
}
stop(name)
}
if !isRunning(name) {
@@ -211,6 +220,6 @@ func stop(name string) {
fs.Errorf(name, "Failed to stop server: %v", err)
}
running[name] = 0
fs.Logf(name, "Stopped server")
fs.Logf(name, "Stopping server")
}
}
+3 -1
View File
@@ -71,7 +71,7 @@ require (
github.com/spf13/cobra v1.10.1
github.com/spf13/pflag v1.0.10
github.com/stretchr/testify v1.11.1
github.com/t3rm1n4l/go-mega v0.0.0-20241213151442-a19cff0ec7b5
github.com/t3rm1n4l/go-mega v0.0.0-20250926104142-ccb8d3498e6c
github.com/unknwon/goconfig v1.0.0
github.com/willscott/go-nfs v0.0.3
github.com/winfsp/cgofuse v1.6.1-0.20250813110601-7d90b0992471
@@ -127,6 +127,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.38.5 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect
github.com/bradenaw/juniper v0.15.3 // indirect
github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect
github.com/calebcase/tmpfile v1.0.3 // indirect
@@ -246,6 +247,7 @@ require (
github.com/ProtonMail/go-crypto v1.3.0
github.com/golang-jwt/jwt/v4 v4.5.2
github.com/pkg/xattr v0.4.12
github.com/pquerna/otp v1.5.0
golang.org/x/mobile v0.0.0-20250911085028-6912353760cf
golang.org/x/term v0.35.0
)
+6
View File
@@ -150,6 +150,8 @@ github.com/aws/smithy-go v1.23.0 h1:8n6I3gXzWJB2DxBDnfxgBaSX6oe0d/t10qGz7OKqMCE=
github.com/aws/smithy-go v1.23.0/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI=
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/bradenaw/juniper v0.15.3 h1:RHIAMEDTpvmzV1wg1jMAHGOoI2oJUSPx3lxRldXnFGo=
github.com/bradenaw/juniper v0.15.3/go.mod h1:UX4FX57kVSaDp4TPqvSjkAAewmRFAfXf27BOs5z9dq8=
github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 h1:GKTyiRCL6zVf5wWaqKnf+7Qs6GbEPfd4iMOitWzXJx8=
@@ -512,6 +514,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU=
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/pquerna/otp v1.5.0 h1:NMMR+WrmaqXU4EzdGJEE1aUUI0AMRzsp96fFFWNPwxs=
github.com/pquerna/otp v1.5.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg=
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
@@ -596,6 +600,8 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/t3rm1n4l/go-mega v0.0.0-20241213151442-a19cff0ec7b5 h1:Sa+sR8aaAMFwxhXWENEnE6ZpqhZ9d7u1RT2722Rw6hc=
github.com/t3rm1n4l/go-mega v0.0.0-20241213151442-a19cff0ec7b5/go.mod h1:UdZiFUFu6e2WjjtjxivwXWcwc1N/8zgbkBR9QNucUOY=
github.com/t3rm1n4l/go-mega v0.0.0-20250926104142-ccb8d3498e6c h1:BLopNCyqewbE8+BtlIp/Juzu8AJGxz0gHdGADnsblVc=
github.com/t3rm1n4l/go-mega v0.0.0-20250926104142-ccb8d3498e6c/go.mod h1:ykucQyiE9Q2qx1wLlEtZkkNn1IURib/2O+Mvd25i1Fo=
github.com/tailscale/depaware v0.0.0-20210622194025-720c4b409502/go.mod h1:p9lPsd+cx33L3H9nNoecRRxPssFKUwwI50I3pZ0yT+8=
github.com/tinylib/msgp v1.4.0 h1:SYOeDRiydzOw9kSiwdYp9UcBgPFtLU2WDHaJXyHruf8=
github.com/tinylib/msgp v1.4.0/go.mod h1:cvjFkb4RiC8qSBOPMGPSzSAx47nAsfhLVTCZZNuHv5o=
+16 -18
View File
@@ -23,24 +23,22 @@ func TemplateHelp(prefix string) string {
and WebDAV serve functions. The server exports the following markup
to be used within the template to server pages:
| Parameter | Description |
| :---------- | :---------- |
| .Name | The full path of a file/directory. |
| .Title | Directory listing of .Name |
| .Sort | The current sort used. This is changeable via ?sort= parameter |
| | Sort Options: namedirfirst,name,size,time (default namedirfirst) |
| .Order | The current ordering used. This is changeable via ?order= parameter |
| | Order Options: asc,desc (default asc) |
| .Query | Currently unused. |
| .Breadcrumb | Allows for creating a relative navigation |
|-- .Link | The relative to the root link of the Text. |
|-- .Text | The Name of the directory. |
| .Entries | Information about a specific file/directory. |
|-- .URL | The 'url' of an entry. |
|-- .Leaf | Currently same as 'URL' but intended to be 'just' the name. |
|-- .IsDir | Boolean for if an entry is a directory or not. |
|-- .Size | Size in Bytes of the entry. |
|-- .ModTime | The UTC timestamp of an entry. |
| Parameter | Subparameter | Description |
| :---------- | :----------- | :---------- |
| .Name | | The full path of a file/directory. |
| .Title | | Directory listing of '.Name'. |
| .Sort | | The current sort used. This is changeable via '?sort=' parameter. Possible values: namedirfirst, name, size, time (default namedirfirst). |
| .Order | | The current ordering used. This is changeable via '?order=' parameter. Possible values: asc, desc (default asc). |
| .Query | | Currently unused. |
| .Breadcrumb | | Allows for creating a relative navigation. |
| | .Link | The link of the Text relative to the root. |
| | .Text | The Name of the directory. |
| .Entries | | Information about a specific file/directory. |
| | .URL | The url of an entry. |
| | .Leaf | Currently same as '.URL' but intended to be just the name. |
| | .IsDir | Boolean for if an entry is a directory or not. |
| | .Size | Size in bytes of the entry. |
| | .ModTime | The UTC timestamp of an entry. |
The server also makes the following functions available so that they can be used
within the template. These functions help extend the options for dynamic
+32 -43
View File
@@ -1,4 +1,4 @@
<!--
<!--
// Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,7 +11,7 @@
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// limitations under the License.
Modifications: Adapted to rclone markup -->
<!DOCTYPE html>
@@ -188,17 +188,17 @@ footer {
}
}
td .zip {
opacity: 0;
margin-left: 6px;
transition: opacity 0.15s ease-in-out;
opacity: 0;
margin-left: 6px;
transition: opacity 0.15s ease-in-out;
}
tr.file:hover td .zip {
opacity: 1;
opacity: 1;
}
.zip-root {
margin-left: 8px;
vertical-align: middle;
opacity: 1;
margin-left: 8px;
vertical-align: middle;
opacity: 1;
}
</style>
</head>
@@ -219,9 +219,9 @@ tr.file:hover td .zip {
<path d="M126.154134,250.559184 C126.850974,251.883673 127.300549,253.006122 127.772602,254.106122 C128.469442,255.206122 128.919016,256.104082 129.638335,257.002041 C130.559962,258.326531 131.728855,259 133.100057,259 C134.493737,259 135.415364,258.55102 136.112204,257.67551 C136.809044,257.002041 137.258619,255.902041 137.258619,254.577551 C137.258619,253.904082 137.258619,252.804082 137.033832,251.457143 C136.786566,249.908163 136.561779,249.032653 136.561779,248.583673 C136.089726,242.814286 135.864939,237.920408 135.864939,233.273469 C135.864939,225.057143 136.786566,217.514286 138.180246,210.846939 C139.798713,204.202041 141.889234,198.634694 144.429328,193.763265 C147.216689,188.869388 150.678411,184.873469 154.836973,181.326531 C158.995535,177.779592 163.626149,174.883673 168.481552,172.661224 C173.336954,170.438776 179.113983,168.665306 185.587852,167.340816 C192.061722,166.218367 198.760378,165.342857 205.481514,164.669388 C212.18017,164.220408 219.598146,163.995918 228.162535,163.995918 L246.055591,163.995918 L246.055591,195.514286 C246.055591,197.736735 246.752431,199.510204 248.370899,201.059184 C250.214153,202.608163 252.079886,203.506122 254.372715,203.506122 C256.463236,203.506122 258.531277,202.608163 260.172223,201.059184 L326.102289,137.797959 C327.720757,136.24898 328.642384,134.47551 328.642384,132.253061 C328.642384,130.030612 327.720757,128.257143 326.102289,126.708163 L260.172223,63.4469388 C258.553756,61.8979592 256.463236,61 254.395194,61 C252.079886,61 250.236632,61.8979592 248.393377,63.4469388 C246.77491,64.9959184 246.07807,66.7693878 246.07807,68.9918367 L246.07807,100.510204 L228.162535,100.510204 C166.863084,100.510204 129.166282,117.167347 115.274437,150.459184 C110.666301,161.54898 108.350993,175.310204 108.350993,191.742857 C108.350993,205.279592 113.903236,223.912245 124.760454,247.438776 C125.00772,248.112245 125.457294,249.010204 126.154134,250.559184 Z" id="Shape" fill="#FFFFFF" transform="translate(218.496689, 160.000000) scale(-1, 1) translate(-218.496689, -160.000000) "></path>
</g>
</g>
<g id="zip-folder">
<path d="M640-480v-80h80v80h-80Zm0 80h-80v-80h80v80Zm0 80v-80h80v80h-80ZM447-640l-80-80H160v480h400v-80h80v80h160v-400H640v80h-80v-80H447ZM160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h240l80 80h320q33 0 56.5 23.5T880-640v400q0 33-23.5 56.5T800-160H160Zm0-80v-480 480Z"/>
</g>
<g id="zip-folder">
<path d="M640-480v-80h80v80h-80Zm0 80h-80v-80h80v80Zm0 80v-80h80v80h-80ZM447-640l-80-80H160v480h400v-80h80v80h160v-400H640v80h-80v-80H447ZM160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h240l80 80h320q33 0 56.5 23.5T880-640v400q0 33-23.5 56.5T800-160H160Zm0-80v-480 480Z"/>
</g>
<!-- File -->
<g id="file" stroke="#000" stroke-width="25" fill="#FFF" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
<path d="M13 24.12v274.76c0 6.16 5.87 11.12 13.17 11.12H239c7.3 0 13.17-4.96 13.17-11.12V136.15S132.6 13 128.37 13H26.17C18.87 13 13 17.96 13 24.12z"/>
@@ -249,15 +249,13 @@ tr.file:hover td .zip {
<header>
<h1>
{{range $i, $crumb := .Breadcrumb}}<a href="{{html $crumb.Link}}">{{html $crumb.Text}}</a>{{if ne $i 0}}/{{end}}{{end}}
{{- if not .DisableZip}}
<a class="zip-root" href="{{html .ZipURL}}" title="Download root as .zip">
<svg width="1.5em" height="1.5em" viewBox="0 -960 960 960">
<use xlink:href="#zip-folder"></use>
</svg>
</a>
{{- end}}
{{- if not .DisableZip}}
<a class="zip-root" href="{{html .ZipURL}}" title="Download root as .zip">
<svg width="1.5em" height="1.5em" viewBox="0 -960 960 960">
<use xlink:href="#zip-folder"></use>
</svg>
</a>
{{- end}}
</h1>
</header>
<main>
@@ -273,7 +271,6 @@ tr.file:hover td .zip {
<th></th>
<th>
<a href="?sort=namedirfirst&order=asc" class="icon sort order"><svg class="top" width="1em" height=".5em" version="1.1" viewBox="0 0 12.922194 6.0358899"><use xlink:href="#up-arrow"></use></svg><svg class="bottom" width="1em" height=".5em" version="1.1" viewBox="0 0 12.922194 6.0358899"><use xlink:href="#down-arrow"></use></svg></a>
<a href="?sort=name&order=asc" class="order">Name</a>
</th>
<th>
@@ -308,13 +305,13 @@ tr.file:hover td .zip {
<svg width="1.5em" height="1em" version="1.1" viewBox="0 0 265 323"><use xlink:href="#file"></use></svg>
{{- end}}
<span class="name"><a href="{{html .URL}}">{{html .Leaf}}</a></span>
{{- if and .IsDir (not $.DisableZip)}}
<a class="zip" href="{{html .ZipURL}}" title="Download folder as .zip">
<svg width="1.5em" height="1.5em" viewBox="0 -960 960 960">
<use xlink:href="#zip-folder"></use>
</svg>
</a>
{{- end}}
{{- if and .IsDir (not $.DisableZip)}}
<a class="zip" href="{{html .ZipURL}}" title="Download folder as .zip">
<svg width="1.5em" height="1.5em" viewBox="0 -960 960 960">
<use xlink:href="#zip-folder"></use>
</svg>
</a>
{{- end}}
</td>
{{- if .IsDir}}
<td data-order="-1">&mdash;</td>
@@ -368,31 +365,25 @@ tr.file:hover td .zip {
}
var timeList = Array.prototype.slice.call(document.getElementsByTagName("time"));
timeList.forEach(localizeDatetime);
var getUrlParameter = function getUrlParameter(sParam) {
var sPageURL = window.location.search.substring(1),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split('=');
var sPageURL = window.location.search.substring(1), sURLVariables = sPageURL.split('&')
for (var i = 0; i < sURLVariables.length; i++) {
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam) {
return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);
}
}
};
function toggle(className){
function toggle(className) {
var order = getUrlParameter('order');
var elements = document.getElementsByClassName(className);
for(var i = 0, length = elements.length; i < length; i++) {
var currHref = elements[i].href;
if(order=='desc'){
if(order=='desc') {
var chg = currHref.replace('desc', 'asc');
elements[i].href = chg;
}
if(order=='asc'){
if(order=='asc') {
var chg = currHref.replace('asc', 'desc');
elements[i].href = chg;
}
@@ -407,10 +398,8 @@ tr.file:hover td .zip {
}
return parseFloat(size).toFixed(2) + ' ' + units[i];
}
function changeSize() {
var sizes = document.getElementsByTagName("size");
for (var i = 0; i < sizes.length; i++) {
humanSize = readableFileSize(sizes[i].innerHTML);
sizes[i].innerHTML = humanSize
+6 -3
View File
@@ -250,9 +250,7 @@ func (ts *TokenSource) reReadToken() (changed bool) {
return false
}
if !newToken.Valid() {
fs.Debugf(ts.name, "Loaded invalid token from config file - ignoring")
} else {
if newToken.Valid() {
fs.Debugf(ts.name, "Loaded fresh token from config file")
changed = true
}
@@ -264,6 +262,8 @@ func (ts *TokenSource) reReadToken() (changed bool) {
if changed {
ts.token = newToken
ts.tokenSource = nil // invalidate since we changed the token
} else {
fs.Debugf(ts.name, "No updated token found in the config file")
}
return changed
}
@@ -319,6 +319,8 @@ func (ts *TokenSource) Token() (*oauth2.Token, error) {
return ts.token, nil
}
fs.Debug(ts.name, "Token expired")
// Try getting the token a few times
for i := 1; i <= maxTries; i++ {
// Try reading the token from the config file in case it has
@@ -344,6 +346,7 @@ func (ts *TokenSource) Token() (*oauth2.Token, error) {
token, err = ts.tokenSource.Token()
if err == nil {
fs.Debug(ts.name, "Token refresh successful")
break
}
if newErr := maybeWrapOAuthError(err, ts.name); newErr != err {
+4 -6
View File
@@ -47,16 +47,14 @@ func (r *Renew) renewOnExpiry() {
}
uploads := r.uploads.Load()
if uploads != 0 {
fs.Debugf(r.name, "Token expired - %d uploads in progress - refreshing", uploads)
fs.Debugf(r.name, "Background refresher detected expired token - %d uploads in progress - refreshing", uploads)
// Do a transaction
err := r.run()
if err == nil {
fs.Debugf(r.name, "Token refresh successful")
} else {
fs.Errorf(r.name, "Token refresh failed: %v", err)
if err != nil {
fs.Errorf(r.name, "Background token refresher failed: %v", err)
}
} else {
fs.Debugf(r.name, "Token expired but no uploads in progress - doing nothing")
fs.Debugf(r.name, "Background refresher detected expired token but no uploads in progress - doing nothing")
}
}
}