Skip to content

Commit 030ca82

Browse files
authored
Merge branch 'master' into feat/backend-doi
2 parents 0da4f13 + e57b94c commit 030ca82

13 files changed

Lines changed: 178 additions & 46 deletions

File tree

README.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
1-
<div align="center">
2-
<sup>Special thanks to our sponsor:</sup>
3-
<br>
4-
<br>
5-
<a href="https://www.warp.dev/?utm_source=github&utm_medium=referral&utm_campaign=rclone_20231103">
6-
<div>
7-
<img src="https://rclone.org/img/logos/warp-github.svg" width="300" alt="Warp">
8-
</div>
9-
<b>Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.</b>
10-
<div>
11-
<sup>Visit warp.dev to learn more.</sup>
12-
</div>
13-
</a>
14-
<br>
15-
<hr>
16-
</div>
17-
<br>
1+
182

193
[<img src="https://rclone.org/img/logo_on_light__horizontal_color.svg" width="50%" alt="rclone logo">](https://rclone.org/#gh-light-mode-only)
204
[<img src="https://rclone.org/img/logo_on_dark__horizontal_color.svg" width="50%" alt="rclone logo">](https://rclone.org/#gh-dark-mode-only)

backend/drive/drive.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,7 +1745,7 @@ func (f *Fs) createDir(ctx context.Context, pathID, leaf string, metadata fs.Met
17451745
}
17461746
var updateMetadata updateMetadataFn
17471747
if len(metadata) > 0 {
1748-
updateMetadata, err = f.updateMetadata(ctx, createInfo, metadata, true)
1748+
updateMetadata, err = f.updateMetadata(ctx, createInfo, metadata, true, true)
17491749
if err != nil {
17501750
return nil, fmt.Errorf("create dir: failed to update metadata: %w", err)
17511751
}
@@ -1776,7 +1776,7 @@ func (f *Fs) updateDir(ctx context.Context, dirID string, metadata fs.Metadata)
17761776
}
17771777
dirID = actualID(dirID)
17781778
updateInfo := &drive.File{}
1779-
updateMetadata, err := f.updateMetadata(ctx, updateInfo, metadata, true)
1779+
updateMetadata, err := f.updateMetadata(ctx, updateInfo, metadata, true, true)
17801780
if err != nil {
17811781
return nil, fmt.Errorf("update dir: failed to update metadata from source object: %w", err)
17821782
}

backend/drive/metadata.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ type updateMetadataFn func(context.Context, *drive.File) error
507507
//
508508
// It returns a callback which should be called to finish the updates
509509
// after the data is uploaded.
510-
func (f *Fs) updateMetadata(ctx context.Context, updateInfo *drive.File, meta fs.Metadata, update bool) (callback updateMetadataFn, err error) {
510+
func (f *Fs) updateMetadata(ctx context.Context, updateInfo *drive.File, meta fs.Metadata, update, isFolder bool) (callback updateMetadataFn, err error) {
511511
callbackFns := []updateMetadataFn{}
512512
callback = func(ctx context.Context, info *drive.File) error {
513513
for _, fn := range callbackFns {
@@ -532,7 +532,9 @@ func (f *Fs) updateMetadata(ctx context.Context, updateInfo *drive.File, meta fs
532532
}
533533
switch k {
534534
case "copy-requires-writer-permission":
535-
if err := parseBool(&updateInfo.CopyRequiresWriterPermission); err != nil {
535+
if isFolder {
536+
fs.Debugf(f, "Ignoring %s=%s as can't set on folders", k, v)
537+
} else if err := parseBool(&updateInfo.CopyRequiresWriterPermission); err != nil {
536538
return nil, err
537539
}
538540
case "writers-can-share":
@@ -629,7 +631,7 @@ func (f *Fs) fetchAndUpdateMetadata(ctx context.Context, src fs.ObjectInfo, opti
629631
if err != nil {
630632
return nil, fmt.Errorf("failed to read metadata from source object: %w", err)
631633
}
632-
callback, err = f.updateMetadata(ctx, updateInfo, meta, update)
634+
callback, err = f.updateMetadata(ctx, updateInfo, meta, update, false)
633635
if err != nil {
634636
return nil, fmt.Errorf("failed to update metadata from source object: %w", err)
635637
}

backend/sftp/sftp.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"fmt"
1111
"io"
1212
iofs "io/fs"
13+
"net/url"
1314
"os"
1415
"path"
1516
"regexp"
@@ -482,6 +483,14 @@ Example:
482483
myUser:myPass@localhost:9005
483484
`,
484485
Advanced: true,
486+
}, {
487+
Name: "http_proxy",
488+
Default: "",
489+
Help: `URL for HTTP CONNECT proxy
490+
491+
Set this to a URL for an HTTP proxy which supports the HTTP CONNECT verb.
492+
`,
493+
Advanced: true,
485494
}, {
486495
Name: "copy_is_hardlink",
487496
Default: false,
@@ -545,6 +554,7 @@ type Options struct {
545554
HostKeyAlgorithms fs.SpaceSepList `config:"host_key_algorithms"`
546555
SSH fs.SpaceSepList `config:"ssh"`
547556
SocksProxy string `config:"socks_proxy"`
557+
HTTPProxy string `config:"http_proxy"`
548558
CopyIsHardlink bool `config:"copy_is_hardlink"`
549559
}
550560

@@ -570,6 +580,7 @@ type Fs struct {
570580
savedpswd string
571581
sessions atomic.Int32 // count in use sessions
572582
tokens *pacer.TokenDispenser
583+
proxyURL *url.URL // address of HTTP proxy read from environment
573584
}
574585

575586
// Object is a remote SFTP file that has been stat'd (so it exists, but is not necessarily open for reading)
@@ -867,6 +878,15 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
867878
opt.Port = "22"
868879
}
869880

881+
// get proxy URL if set
882+
if opt.HTTPProxy != "" {
883+
proxyURL, err := url.Parse(opt.HTTPProxy)
884+
if err != nil {
885+
return nil, fmt.Errorf("failed to parse HTTP Proxy URL: %w", err)
886+
}
887+
f.proxyURL = proxyURL
888+
}
889+
870890
sshConfig := &ssh.ClientConfig{
871891
User: opt.User,
872892
Auth: []ssh.AuthMethod{},

backend/sftp/ssh_internal.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ func (f *Fs) newSSHClientInternal(ctx context.Context, network, addr string, ssh
3131
)
3232
if f.opt.SocksProxy != "" {
3333
conn, err = proxy.SOCKS5Dial(network, addr, f.opt.SocksProxy, baseDialer)
34+
} else if f.proxyURL != nil {
35+
conn, err = proxy.HTTPConnectDial(network, addr, f.proxyURL, baseDialer)
3436
} else {
3537
conn, err = baseDialer.Dial(network, addr)
3638
}

cmd/serve/s3/serve_s3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ docs](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)).
1414
access.
1515

1616
Please note that some clients may require HTTPS endpoints. See [the
17-
SSL docs](#ssl-tls) for more information.
17+
SSL docs](#tls-ssl) for more information.
1818

1919
This command uses the [VFS directory cache](#vfs-virtual-file-system).
2020
All the functionality will work with `--vfs-cache-mode off`. Using

cmd/serve/s3/server.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ func newServer(ctx context.Context, f fs.Fs, opt *Options, vfsOpt *vfscommon.Opt
8181
gofakes3.WithIntegrityCheck(true), // Check Content-MD5 if supplied
8282
)
8383

84-
w.handler = http.NewServeMux()
8584
w.handler = w.faker.Server()
8685

8786
if proxy.Opt.AuthProxy != "" {

docs/content/authors.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,3 +961,9 @@ put them back in again.` >}}
961961
* Markus Gerstel <markus.gerstel@osirium.com>
962962
* simwai <16225108+simwai@users.noreply.github.com>
963963
* Ben Alex <ben.alex@acegi.com.au>
964+
* Klaas Freitag <opensource@freisturz.de> <klaas.freitag@kiteworks.com>
965+
* Andrew Kreimer <algonell@gmail.com>
966+
* Ed Craig-Wood <138211970+edc-w@users.noreply.github.com>
967+
* Christian Richter <crichter@owncloud.com> <1058116+dragonchaser@users.noreply.github.com>
968+
* Ralf Haferkamp <r.haferkamp@opencloud.eu>
969+
* Jugal Kishore <me@devjugal.com>

docs/content/changelog.md

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,50 @@ description: "Rclone Changelog"
55

66
# Changelog
77

8+
## v1.69.2 - 2025-05-01
9+
10+
[See commits](https://github.com/rclone/rclone/compare/v1.69.1...v1.69.2)
11+
12+
* Bug fixes
13+
* accounting: Fix percentDiff calculation -- (Anagh Kumar Baranwal)
14+
* build
15+
* Update github.com/golang-jwt/jwt/v4 from 4.5.1 to 4.5.2 to fix CVE-2025-30204 (dependabot[bot])
16+
* Update github.com/golang-jwt/jwt/v5 from 5.2.1 to 5.2.2 to fix CVE-2025-30204 (dependabot[bot])
17+
* Update golang.org/x/crypto to v0.35.0 to fix CVE-2025-22869 (Nick Craig-Wood)
18+
* Update golang.org/x/net from 0.36.0 to 0.38.0 to fix CVE-2025-22870 (dependabot[bot])
19+
* Update golang.org/x/net to 0.36.0. to fix CVE-2025-22869 (dependabot[bot])
20+
* Stop building with go < go1.23 as security updates forbade it (Nick Craig-Wood)
21+
* Fix docker plugin build (Anagh Kumar Baranwal)
22+
* cmd: Fix crash if rclone is invoked without any arguments (Janne Hellsten)
23+
* config: Read configuration passwords from stdin even when terminated with EOF (Samantha Bowen)
24+
* doc fixes (Andrew Kreimer, Danny Garside, eccoisle, Ed Craig-Wood, emyarod, jack, Jugal Kishore, Markus Gerstel, Michael Kebe, Nick Craig-Wood, simonmcnair, simwai, Zachary Vorhies)
25+
* fs: Fix corruption of SizeSuffix with "B" suffix in config (eg --min-size) (Nick Craig-Wood)
26+
* lib/http: Fix race between Serve() and Shutdown() (Nick Craig-Wood)
27+
* object: Fix memory object out of bounds Seek (Nick Craig-Wood)
28+
* operations: Fix call fmt.Errorf with wrong err (alingse)
29+
* rc
30+
* Disable the metrics server when running `rclone rc` (hiddenmarten)
31+
* Fix debug/* commands not being available over unix sockets (Nick Craig-Wood)
32+
* serve nfs: Fix unlikely crash (Nick Craig-Wood)
33+
* stats: Fix the speed not getting updated after a pause in the processing (Anagh Kumar Baranwal)
34+
* sync
35+
* Fix cpu spinning when empty directory finding with leading slashes (Nick Craig-Wood)
36+
* Copy dir modtimes even when copyEmptySrcDirs is false (ll3006)
37+
* VFS
38+
* Fix directory cache serving stale data (Lorenz Brun)
39+
* Fix inefficient directory caching when directory reads are slow (huanghaojun)
40+
* Fix integration test failures (Nick Craig-Wood)
41+
* Drive
42+
* Metadata: fix error when setting copy-requires-writer-permission on a folder (Nick Craig-Wood)
43+
* Dropbox
44+
* Retry link without expiry (Dave Vasilevsky)
45+
* HTTP
46+
* Correct root if definitely pointing to a file (nielash)
47+
* Iclouddrive
48+
* Fix so created files are writable (Ben Alex)
49+
* Onedrive
50+
* Fix metadata ordering in permissions (Nick Craig-Wood)
51+
852
## v1.69.1 - 2025-02-14
953

1054
[See commits](https://github.com/rclone/rclone/compare/v1.69.0...v1.69.1)
@@ -60,7 +104,7 @@ description: "Rclone Changelog"
60104
* fs: Make `--links` flag global and add new `--local-links` and `--vfs-links` flags (Nick Craig-Wood)
61105
* http servers: Disable automatic authentication skipping for unix sockets in http servers (Moises Lima)
62106
* This was making it impossible to use unix sockets with an proxy
63-
* This might now cause rclone to need authenticaton where it didn't before
107+
* This might now cause rclone to need authentication where it didn't before
64108
* oauthutil: add support for OAuth client credential flow (Martin Hassack, Nick Craig-Wood)
65109
* operations: make log messages consistent for mkdir/rmdir at INFO level (Nick Craig-Wood)
66110
* rc: Add `relative` to [vfs/queue-set-expiry](/rc/#vfs-queue-set-expiry) (Nick Craig-Wood)
@@ -738,7 +782,7 @@ instead of of `--size-only`, when `check` is not available.
738782
* Update all dependencies (Nick Craig-Wood)
739783
* Refactor version info and icon resource handling on windows (albertony)
740784
* doc updates (albertony, alfish2000, asdffdsazqqq, Dimitri Papadopoulos, Herby Gillot, Joda Stößer, Manoj Ghosh, Nick Craig-Wood)
741-
* Implement `--metadata-mapper` to transform metatadata with a user supplied program (Nick Craig-Wood)
785+
* Implement `--metadata-mapper` to transform metadata with a user supplied program (Nick Craig-Wood)
742786
* Add `ChunkWriterDoesntSeek` feature flag and set it for b2 (Nick Craig-Wood)
743787
* lib/http: Export basic go string functions for use in `--template` (Gabriel Espinoza)
744788
* makefile: Use POSIX compatible install arguments (Mina Galić)
@@ -853,7 +897,7 @@ instead of of `--size-only`, when `check` is not available.
853897
* Fix "fatal error: concurrent map writes" (Nick Craig-Wood)
854898
* B2
855899
* Fix multipart upload: corrupted on transfer: sizes differ XXX vs 0 (Nick Craig-Wood)
856-
* Fix locking window when getting mutipart upload URL (Nick Craig-Wood)
900+
* Fix locking window when getting multipart upload URL (Nick Craig-Wood)
857901
* Fix server side copies greater than 4GB (Nick Craig-Wood)
858902
* Fix chunked streaming uploads (Nick Craig-Wood)
859903
* Reduce default `--b2-upload-concurrency` to 4 to reduce memory usage (Nick Craig-Wood)

docs/content/s3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5551,7 +5551,7 @@ source).
55515551

55525552
This has the following consequences:
55535553

5554-
- Using `rclone rcat` will fail as the medatada doesn't match after upload
5554+
- Using `rclone rcat` will fail as the metadata doesn't match after upload
55555555
- Uploading files with `rclone mount` will fail for the same reason
55565556
- This can worked around by using `--vfs-cache-mode writes` or `--vfs-cache-mode full` or setting `--s3-upload-cutoff` large
55575557
- Files uploaded via a multipart upload won't have their modtimes

0 commit comments

Comments
 (0)