1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-27 14:53:20 +00:00

Compare commits

..

5 Commits

Author SHA1 Message Date
hyusap
2a5e0b28c9 docs: fix googlephotos custom client_id instructions
The Google Photos custom client_id documentation was incomplete - it
only mentioned changing the scopes but did not mention that you need
to enable the "Photos Library API" instead of the "Google Drive API"
in step 3 of the referenced Google Drive instructions.

This fixes the documentation to clearly state both differences from
the Google Drive setup:
- Enable "Photos Library API" instead of "Google Drive API"
- Use the Google Photos specific scopes

Co-authored-by: hyusap <paulayush@gmail.com>
2026-01-27 13:48:12 +00:00
Nick Owens
264e75d892 cmount: fix OpenBSD mount support.
this pulls in https://github.com/winfsp/cgofuse/pull/100 to fix OpenBSD
mount support.

part of #1727
2026-01-27 13:47:00 +00:00
Mikel Olasagasti Uranga
4553c3de7b fs: fix bwlimit: correctly report minutes
Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
2026-01-27 11:44:47 +00:00
Mikel Olasagasti Uranga
2e9e4a47a2 fs: fix bwlimit: use %d instead of %q for ints
Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
2026-01-27 11:44:47 +00:00
necaran
e44829a448 mega: reverts TLS workaround
The workaround to include the obsolete cipher suite is no longer needed because storage endpoints now support TLS1.3.
2026-01-24 12:35:02 +00:00
6 changed files with 15 additions and 27 deletions

View File

@@ -17,12 +17,10 @@ Improvements:
import (
"context"
"crypto/tls"
"encoding/base64"
"errors"
"fmt"
"io"
"net/http"
"path"
"slices"
"strings"
@@ -256,25 +254,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
defer megaCacheMu.Unlock()
srv := megaCache[opt.User]
if srv == nil {
// srv = mega.New().SetClient(fshttp.NewClient(ctx))
// Workaround for Mega's use of insecure cipher suites which are no longer supported by default since Go 1.22.
// Relevant issues:
// https://github.com/rclone/rclone/issues/8565
// https://github.com/meganz/webclient/issues/103
clt := fshttp.NewClient(ctx)
clt.Transport = fshttp.NewTransportCustom(ctx, func(t *http.Transport) {
var ids []uint16
// Read default ciphers
for _, cs := range tls.CipherSuites() {
ids = append(ids, cs.ID)
}
// Insecure but Mega uses TLS_RSA_WITH_AES_128_GCM_SHA256 for storage endpoints
// (e.g. https://gfs302n114.userstorage.mega.co.nz) as of June 18, 2025.
t.TLSClientConfig.CipherSuites = append(ids, tls.TLS_RSA_WITH_AES_128_GCM_SHA256)
})
srv = mega.New().SetClient(clt)
srv = mega.New().SetClient(fshttp.NewClient(ctx))
srv.SetRetries(ci.LowLevelRetries) // let mega do the low level retries
srv.SetHTTPS(opt.UseHTTPS)
srv.SetLogger(func(format string, v ...any) {

View File

@@ -904,7 +904,7 @@ func (o *Object) Storable() bool {
// Open opens the file for read. Call Close() on the returned io.ReadCloser
func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (io.ReadCloser, error) {
fs.FixRangeOption(options, o.Size())
fs.FixRangeOption(options, *o.originalSize)
var offset, limit int64 = 0, -1
for _, option := range options { // if the caller passes in nil for options, it will become array of nil
switch x := option.(type) {

View File

@@ -659,8 +659,14 @@ second that each client_id can do set by Google.
If there is a problem with this client_id (eg quota too low or the
client_id stops working) then you can make your own.
Please follow the steps in [the google drive docs](https://rclone.org/drive/#making-your-own-client-id).
You will need these scopes instead of the drive ones detailed:
Please follow the steps in [the google drive docs](https://rclone.org/drive/#making-your-own-client-id)
with the following differences:
- At step 3, instead of enabling the "Google Drive API", search for and
enable the "Photos Library API".
- At step 5, you will need to add different scopes. Use these scopes
instead of the drive ones:
```text
https://www.googleapis.com/auth/photoslibrary.appendonly

View File

@@ -90,14 +90,14 @@ func validateHour(HHMM string) error {
return fmt.Errorf("invalid hour in time specification %q: %v", HHMM, err)
}
if hh < 0 || hh > 23 {
return fmt.Errorf("invalid hour (must be between 00 and 23): %q", hh)
return fmt.Errorf("invalid hour (must be between 00 and 23): %d", hh)
}
mm, err := strconv.Atoi(HHMM[3:])
if err != nil {
return fmt.Errorf("invalid minute in time specification: %q: %v", HHMM, err)
}
if mm < 0 || mm > 59 {
return fmt.Errorf("invalid minute (must be between 00 and 59): %q", hh)
return fmt.Errorf("invalid minute (must be between 00 and 59): %d", mm)
}
return nil
}

2
go.mod
View File

@@ -81,7 +81,7 @@ require (
github.com/t3rm1n4l/go-mega v0.0.0-20251031123324-a804aaa87491
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
github.com/winfsp/cgofuse v1.6.1-0.20260126094232-f2c4fccdb286
github.com/wk8/go-ordered-map/v2 v2.1.8
github.com/xanzy/ssh-agent v0.3.3
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78

2
go.sum
View File

@@ -683,6 +683,8 @@ github.com/willscott/go-nfs-client v0.0.0-20251022144359-801f10d98886 h1:DtrBtkg
github.com/willscott/go-nfs-client v0.0.0-20251022144359-801f10d98886/go.mod h1:Tq++Lr/FgiS3X48q5FETemXiSLGuYMQT2sPjYNPJSwA=
github.com/winfsp/cgofuse v1.6.1-0.20250813110601-7d90b0992471 h1:aSOo0k+aLWdhUQiUxzv4cZ7cUp3OLP+Qx7cjs6OUxME=
github.com/winfsp/cgofuse v1.6.1-0.20250813110601-7d90b0992471/go.mod h1:uxjoF2jEYT3+x+vC2KJddEGdk/LU8pRowXmyVMHSV5I=
github.com/winfsp/cgofuse v1.6.1-0.20260126094232-f2c4fccdb286 h1:tw5GqRXqExB/xghPoPLtVujBe9w9Pg1G78tvXCJNJAA=
github.com/winfsp/cgofuse v1.6.1-0.20260126094232-f2c4fccdb286/go.mod h1:uxjoF2jEYT3+x+vC2KJddEGdk/LU8pRowXmyVMHSV5I=
github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc=
github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw=
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=