1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-04 01:23:24 +00:00

Compare commits

..

1 Commits

Author SHA1 Message Date
Nick Craig-Wood
b141a553be fshttp: add --dump curl for dumping HTTP requests as curl commands 2025-12-18 17:53:24 +00:00
13 changed files with 281 additions and 222 deletions

View File

@@ -283,7 +283,7 @@ jobs:
run: govulncheck ./... run: govulncheck ./...
- name: Check Markdown format - name: Check Markdown format
uses: DavidAnson/markdownlint-cli2-action@v22 uses: DavidAnson/markdownlint-cli2-action@v20
with: with:
globs: | globs: |
CONTRIBUTING.md CONTRIBUTING.md

View File

@@ -412,8 +412,8 @@ the source file in the `Help:` field:
- The `backenddocs` make target runs the Python script `bin/make_backend_docs.py`, - The `backenddocs` make target runs the Python script `bin/make_backend_docs.py`,
and you can also run this directly, optionally with the name of a backend and you can also run this directly, optionally with the name of a backend
as argument to only update the docs for a specific backend. as argument to only update the docs for a specific backend.
- **Do not** commit the updated Markdown files. This operation is run as part - **Do not** commit the updated Markdown files. This operation is run as part of
of the release process. Since any manual changes in the autogenerated sections the release process. Since any manual changes in the autogenerated sections
of the Markdown files will then be lost, we have a pull request check that of the Markdown files will then be lost, we have a pull request check that
reports error for any changes within the autogenerated sections. Should you reports error for any changes within the autogenerated sections. Should you
have done manual changes outside of the autogenerated sections they must be have done manual changes outside of the autogenerated sections they must be
@@ -580,8 +580,7 @@ remote or an fs.
make sure we can encode any path name and `rclone info` to help determine the make sure we can encode any path name and `rclone info` to help determine the
encodings needed encodings needed
- `rclone purge -v TestRemote:rclone-info` - `rclone purge -v TestRemote:rclone-info`
- `rclone test info --all --remote-encoding None -vv --write-json remote.json - `rclone test info --all --remote-encoding None -vv --write-json remote.json TestRemote:rclone-info`
TestRemote:rclone-info`
- `go run cmd/test/info/internal/build_csv/main.go -o remote.csv remote.json` - `go run cmd/test/info/internal/build_csv/main.go -o remote.csv remote.json`
- open `remote.csv` in a spreadsheet and examine - open `remote.csv` in a spreadsheet and examine

View File

@@ -2,27 +2,27 @@
Current active maintainers of rclone are: Current active maintainers of rclone are:
| Name | GitHub ID | Specific Responsibilities | | Name | GitHub ID | Specific Responsibilities |
| :--------------- | :---------------- | :------------------------------------- | | :--------------- | :---------------- | :-------------------------- |
| Nick Craig-Wood | @ncw | overall project health | | Nick Craig-Wood | @ncw | overall project health |
| Stefan Breunig | @breunigs | | | Stefan Breunig | @breunigs | |
| Ishuah Kariuki | @ishuah | | | Ishuah Kariuki | @ishuah | |
| Remus Bunduc | @remusb | cache backend | | Remus Bunduc | @remusb | cache backend |
| Fabian Möller | @B4dM4n | | | Fabian Möller | @B4dM4n | |
| Alex Chen | @Cnly | onedrive backend | | Alex Chen | @Cnly | onedrive backend |
| Sandeep Ummadi | @sandeepkru | azureblob backend | | Sandeep Ummadi | @sandeepkru | azureblob backend |
| Sebastian Bünger | @buengese | jottacloud, yandex & compress backends | | Sebastian Bünger | @buengese | jottacloud, yandex & compress backends |
| Ivan Andreev | @ivandeex | chunker & mailru backends | | Ivan Andreev | @ivandeex | chunker & mailru backends |
| Max Sum | @Max-Sum | union backend | | Max Sum | @Max-Sum | union backend |
| Fred | @creativeprojects | seafile backend | | Fred | @creativeprojects | seafile backend |
| Caleb Case | @calebcase | storj backend | | Caleb Case | @calebcase | storj backend |
| wiserain | @wiserain | pikpak backend | | wiserain | @wiserain | pikpak backend |
| albertony | @albertony | | | albertony | @albertony | |
| Chun-Hung Tseng | @henrybear327 | Proton Drive Backend | | Chun-Hung Tseng | @henrybear327 | Proton Drive Backend |
| Hideo Aoyama | @boukendesho | snap packaging | | Hideo Aoyama | @boukendesho | snap packaging |
| nielash | @nielash | bisync | | nielash | @nielash | bisync |
| Dan McArdle | @dmcardle | gitannex | | Dan McArdle | @dmcardle | gitannex |
| Sam Harrison | @childish-sambino | filescom | | Sam Harrison | @childish-sambino | filescom |
## This is a work in progress draft ## This is a work in progress draft

View File

@@ -2928,9 +2928,7 @@ func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object,
req := s3.CopyObjectInput{ req := s3.CopyObjectInput{
MetadataDirective: types.MetadataDirectiveCopy, MetadataDirective: types.MetadataDirectiveCopy,
} }
if srcObj.storageClass != nil {
req.StorageClass = types.StorageClass(*srcObj.storageClass)
}
// Build upload options including headers and metadata // Build upload options including headers and metadata
ci := fs.GetConfig(ctx) ci := fs.GetConfig(ctx)
uploadOptions := fs.MetadataAsOpenOptions(ctx) uploadOptions := fs.MetadataAsOpenOptions(ctx)
@@ -4503,12 +4501,7 @@ func (o *Object) prepareUpload(ctx context.Context, src fs.ObjectInfo, options [
ACL: types.ObjectCannedACL(o.fs.opt.ACL), ACL: types.ObjectCannedACL(o.fs.opt.ACL),
Key: &bucketPath, Key: &bucketPath,
} }
if tierObj, ok := src.(fs.GetTierer); ok {
tier := tierObj.GetTier()
if tier != "" {
ui.req.StorageClass = types.StorageClass(strings.ToUpper(tier))
}
}
// Fetch metadata if --metadata is in use // Fetch metadata if --metadata is in use
meta, err := fs.GetMetadataOptions(ctx, o.fs, src, options) meta, err := fs.GetMetadataOptions(ctx, o.fs, src, options)
if err != nil { if err != nil {

View File

@@ -336,7 +336,7 @@ full new copy of the file.
When mounting with `--read-only`, attempts to write to files will fail *silently* When mounting with `--read-only`, attempts to write to files will fail *silently*
as opposed to with a clear warning as in macFUSE. as opposed to with a clear warning as in macFUSE.
## Mounting on Linux # Mounting on Linux
On newer versions of Ubuntu, you may encounter the following error when running On newer versions of Ubuntu, you may encounter the following error when running
`rclone mount`: `rclone mount`:

View File

@@ -751,21 +751,21 @@ object also.
Here is a table of standard system metadata which, if appropriate, a Here is a table of standard system metadata which, if appropriate, a
backend may implement. backend may implement.
| key | description | example | | key | description | example |
| --- | ----------- | ------- | |---------------------|-------------|---------|
| mode | File type and mode: octal, unix style | 0100664 | | mode | File type and mode: octal, unix style | 0100664 |
| uid | User ID of owner: decimal number | 500 | | uid | User ID of owner: decimal number | 500 |
| gid | Group ID of owner: decimal number | 500 | | gid | Group ID of owner: decimal number | 500 |
| rdev | Device ID (if special file) => hexadecimal | 0 | | rdev | Device ID (if special file) => hexadecimal | 0 |
| atime | Time of last access: RFC 3339 | 2006-01-02T15:04:05.999999999Z07:00 | | atime | Time of last access: RFC 3339 | 2006-01-02T15:04:05.999999999Z07:00 |
| mtime | Time of last modification: RFC 3339 | 2006-01-02T15:04:05.999999999Z07:00 | | mtime | Time of last modification: RFC 3339 | 2006-01-02T15:04:05.999999999Z07:00 |
| btime | Time of file creation (birth): RFC 3339 | 2006-01-02T15:04:05.999999999Z07:00 | | btime | Time of file creation (birth): RFC 3339 | 2006-01-02T15:04:05.999999999Z07:00 |
| utime | Time of file upload: RFC 3339 | 2006-01-02T15:04:05.999999999Z07:00 | | utime | Time of file upload: RFC 3339 | 2006-01-02T15:04:05.999999999Z07:00 |
| cache-control | Cache-Control header | no-cache | | cache-control | Cache-Control header | no-cache |
| content-disposition | Content-Disposition header | inline | | content-disposition | Content-Disposition header | inline |
| content-encoding | Content-Encoding header | gzip | | content-encoding | Content-Encoding header | gzip |
| content-language | Content-Language header | en-US | | content-language | Content-Language header | en-US |
| content-type | Content-Type header | text/plain | | content-type | Content-Type header | text/plain |
The metadata keys `mtime` and `content-type` will take precedence if The metadata keys `mtime` and `content-type` will take precedence if
supplied in the metadata over reading the `Content-Type` or supplied in the metadata over reading the `Content-Type` or
@@ -1191,8 +1191,7 @@ on any OS, and the value is defined as following:
- On Windows: `%HOME%` if defined, else `%USERPROFILE%`, or else `%HOMEDRIVE%\%HOMEPATH%`. - On Windows: `%HOME%` if defined, else `%USERPROFILE%`, or else `%HOMEDRIVE%\%HOMEPATH%`.
- On Unix: `$HOME` if defined, else by looking up current user in OS-specific user - On Unix: `$HOME` if defined, else by looking up current user in OS-specific user
database (e.g. passwd file), or else use the result from shell command database (e.g. passwd file), or else use the result from shell command `cd && pwd`.
`cd && pwd`.
If you run `rclone config file` you will see where the default location is for If you run `rclone config file` you will see where the default location is for
you. Running `rclone config touch` will ensure a configuration file exists, you. Running `rclone config touch` will ensure a configuration file exists,
@@ -3279,6 +3278,10 @@ The available flags are:
- `mapper` dumps the JSON blobs being sent to the program supplied with - `mapper` dumps the JSON blobs being sent to the program supplied with
`--metadata-mapper` and received from it. It can be useful for debugging `--metadata-mapper` and received from it. It can be useful for debugging
the metadata mapper interface. the metadata mapper interface.
- `curl` dumps the HTTP request as a `curl` command. Can be used with
the other HTTP debugging flags (e.g. `requests`, `bodies`). By
default the auth will be masked - use with `auth` to have the curl
commands with authentication too.
## Filtering ## Filtering
@@ -3439,7 +3442,7 @@ many items, the input is treated as a [CSV encoded](https://godoc.org/encoding/c
string. For example string. For example
| Environment variable | Equivalent options | | Environment variable | Equivalent options |
| -------------------- | ------------------ | |----------------------|--------------------|
| `RCLONE_EXCLUDE="*.jpg"` | `--exclude "*.jpg"` | | `RCLONE_EXCLUDE="*.jpg"` | `--exclude "*.jpg"` |
| `RCLONE_EXCLUDE="*.jpg,*.png"` | `--exclude "*.jpg"` `--exclude "*.png"` | | `RCLONE_EXCLUDE="*.jpg,*.png"` | `--exclude "*.jpg"` `--exclude "*.png"` |
| `RCLONE_EXCLUDE='"*.jpg","*.png"'` | `--exclude "*.jpg"` `--exclude "*.png"` | | `RCLONE_EXCLUDE='"*.jpg","*.png"'` | `--exclude "*.jpg"` `--exclude "*.png"` |

View File

@@ -16,7 +16,7 @@ image](https://securebuild.com/images/rclone) through our partner
## Release {{% version %}} OS requirements {#osrequirements} ## Release {{% version %}} OS requirements {#osrequirements}
| OS | Minimum Version | | OS | Minimum Version |
| :---: | :---: | |:-------:|:-------:|
| Linux | Kernel 3.2 | | Linux | Kernel 3.2 |
| macOS | 12 (Monterey) | | macOS | 12 (Monterey) |
| Windows | 10, Server 2016 | | Windows | 10, Server 2016 |
@@ -31,7 +31,7 @@ in the Go Wiki.
## Release {{% version %}} {#release} ## Release {{% version %}} {#release}
| Arch-OS | Windows | macOS | Linux | .deb | .rpm | FreeBSD | NetBSD | OpenBSD | Plan9 | Solaris | | Arch-OS | Windows | macOS | Linux | .deb | .rpm | FreeBSD | NetBSD | OpenBSD | Plan9 | Solaris |
| :-----: | :-----: | :---: | :---: | :--: | :--: | :-----: | :----: | :-----: | :---: | :-----: | |:-------:|:-------:|:-----:|:-----:|:----:|:----:|:-------:|:------:|:-------:|:-----:|:-------:|
| Intel/AMD - 64 Bit | {{< download windows amd64 >}} | {{< download osx amd64 >}} | {{< download linux amd64 >}} | {{< download linux amd64 deb >}} | {{< download linux amd64 rpm >}} | {{< download freebsd amd64 >}} | {{< download netbsd amd64 >}} | {{< download openbsd amd64 >}} | {{< download plan9 amd64 >}} | {{< download solaris amd64 >}} | | Intel/AMD - 64 Bit | {{< download windows amd64 >}} | {{< download osx amd64 >}} | {{< download linux amd64 >}} | {{< download linux amd64 deb >}} | {{< download linux amd64 rpm >}} | {{< download freebsd amd64 >}} | {{< download netbsd amd64 >}} | {{< download openbsd amd64 >}} | {{< download plan9 amd64 >}} | {{< download solaris amd64 >}} |
| Intel/AMD - 32 Bit | {{< download windows 386 >}} | - | {{< download linux 386 >}} | {{< download linux 386 deb >}} | {{< download linux 386 rpm >}} | {{< download freebsd 386 >}} | {{< download netbsd 386 >}} | {{< download openbsd 386 >}} | {{< download plan9 386 >}} | - | | Intel/AMD - 32 Bit | {{< download windows 386 >}} | - | {{< download linux 386 >}} | {{< download linux 386 deb >}} | {{< download linux 386 rpm >}} | {{< download freebsd 386 >}} | {{< download netbsd 386 >}} | {{< download openbsd 386 >}} | {{< download plan9 386 >}} | - |
| ARMv5 - 32 Bit NOHF | - | - | {{< download linux arm >}} | {{< download linux arm deb >}} | {{< download linux arm rpm >}} | {{< download freebsd arm >}} | {{< download netbsd arm >}} | - | - | - | | ARMv5 - 32 Bit NOHF | - | - | {{< download linux arm >}} | {{< download linux arm deb >}} | {{< download linux arm rpm >}} | {{< download freebsd arm >}} | {{< download netbsd arm >}} | - | - | - |
@@ -120,7 +120,7 @@ If you would like to download the current version (maybe from a
script) from a URL which doesn't change then you can use these links. script) from a URL which doesn't change then you can use these links.
| Arch-OS | Windows | macOS | Linux | .deb | .rpm | FreeBSD | NetBSD | OpenBSD | Plan9 | Solaris | | Arch-OS | Windows | macOS | Linux | .deb | .rpm | FreeBSD | NetBSD | OpenBSD | Plan9 | Solaris |
| :-----: | :-----: | :---: | :---: | :--: | :--: | :-----: | :----: | :-----: | :---: | :-----: | |:-------:|:-------:|:-----:|:-----:|:----:|:----:|:-------:|:------:|:-------:|:-----:|:-------:|
| Intel/AMD - 64 Bit | {{< cdownload windows amd64 >}} | {{< cdownload osx amd64 >}} | {{< cdownload linux amd64 >}} | {{< cdownload linux amd64 deb >}} | {{< cdownload linux amd64 rpm >}} | {{< cdownload freebsd amd64 >}} | {{< cdownload netbsd amd64 >}} | {{< cdownload openbsd amd64 >}} | {{< cdownload plan9 amd64 >}} | {{< cdownload solaris amd64 >}} | | Intel/AMD - 64 Bit | {{< cdownload windows amd64 >}} | {{< cdownload osx amd64 >}} | {{< cdownload linux amd64 >}} | {{< cdownload linux amd64 deb >}} | {{< cdownload linux amd64 rpm >}} | {{< cdownload freebsd amd64 >}} | {{< cdownload netbsd amd64 >}} | {{< cdownload openbsd amd64 >}} | {{< cdownload plan9 amd64 >}} | {{< cdownload solaris amd64 >}} |
| Intel/AMD - 32 Bit | {{< cdownload windows 386 >}} | - | {{< cdownload linux 386 >}} | {{< cdownload linux 386 deb >}} | {{< cdownload linux 386 rpm >}} | {{< cdownload freebsd 386 >}} | {{< cdownload netbsd 386 >}} | {{< cdownload openbsd 386 >}} | {{< cdownload plan9 386 >}} | - | | Intel/AMD - 32 Bit | {{< cdownload windows 386 >}} | - | {{< cdownload linux 386 >}} | {{< cdownload linux 386 deb >}} | {{< cdownload linux 386 rpm >}} | {{< cdownload freebsd 386 >}} | {{< cdownload netbsd 386 >}} | {{< cdownload openbsd 386 >}} | {{< cdownload plan9 386 >}} | - |
| ARMv5 - 32 Bit NOHF | - | - | {{< cdownload linux arm >}} | {{< cdownload linux arm deb >}} | {{< cdownload linux arm rpm >}} | {{< cdownload freebsd arm >}} | {{< cdownload netbsd arm >}} | - | - | - | | ARMv5 - 32 Bit NOHF | - | - | {{< cdownload linux arm >}} | {{< cdownload linux arm deb >}} | {{< cdownload linux arm rpm >}} | {{< cdownload freebsd arm >}} | {{< cdownload netbsd arm >}} | - | - | - |
@@ -137,7 +137,7 @@ Older downloads can be found at <https://downloads.rclone.org/>
The latest `rclone` version working for: The latest `rclone` version working for:
| OS | Maximum rclone version | | OS | Maximum rclone version |
| :---: | :---: | |:-------:|:-------:|
| Windows 7 | v1.63.1 | | Windows 7 | v1.63.1 |
| Windows Server 2008 | v1.63.1 | | Windows Server 2008 | v1.63.1 |
| Windows Server 2012 | v1.63.1 | | Windows Server 2012 | v1.63.1 |

View File

@@ -202,28 +202,28 @@ them into regular expressions.
## Filter pattern examples {#examples} ## Filter pattern examples {#examples}
| Description | Pattern | Matches | Does not match | | Description | Pattern | Matches | Does not match |
| ----------- | ---------------- | ------------------------------- | ------------------ | | ----------- |-------- | ------- | -------------- |
| Wildcard | `*.jpg` | `/file.jpg` | `/file.png` | | Wildcard | `*.jpg` | `/file.jpg` | `/file.png` |
| | | `/dir/file.jpg` | `/dir/file.png` | | | | `/dir/file.jpg` | `/dir/file.png` |
| Rooted | `/*.jpg` | `/file.jpg` | `/file.png` | | Rooted | `/*.jpg` | `/file.jpg` | `/file.png` |
| | | `/file2.jpg` | `/dir/file.jpg` | | | | `/file2.jpg` | `/dir/file.jpg` |
| Alternates | `*.{jpg,png}` | `/file.jpg` | `/file.gif` | | Alternates | `*.{jpg,png}` | `/file.jpg` | `/file.gif` |
| | | `/dir/file.png` | `/dir/file.gif` | | | | `/dir/file.png` | `/dir/file.gif` |
| Path Wildcard | `dir/**` | `/dir/anyfile` | `file.png` | | Path Wildcard | `dir/**` | `/dir/anyfile` | `file.png` |
| | | `/subdir/dir/subsubdir/anyfile` | `/subdir/file.png` | | | | `/subdir/dir/subsubdir/anyfile` | `/subdir/file.png` |
| Any Char | `*.t?t` | `/file.txt` | `/file.qxt` | | Any Char | `*.t?t` | `/file.txt` | `/file.qxt` |
| | | `/dir/file.tzt` | `/dir/file.png` | | | | `/dir/file.tzt` | `/dir/file.png` |
| Range | `*.[a-z]` | `/file.a` | `/file.0` | | Range | `*.[a-z]` | `/file.a` | `/file.0` |
| | | `/dir/file.b` | `/dir/file.1` | | | | `/dir/file.b` | `/dir/file.1` |
| Escape | `*.\?\?\?` | `/file.???` | `/file.abc` | | Escape | `*.\?\?\?` | `/file.???` | `/file.abc` |
| | | `/dir/file.???` | `/dir/file.def` | | | | `/dir/file.???` | `/dir/file.def` |
| Class | `*.\d\d\d` | `/file.012` | `/file.abc` | | Class | `*.\d\d\d` | `/file.012` | `/file.abc` |
| | | `/dir/file.345` | `/dir/file.def` | | | | `/dir/file.345` | `/dir/file.def` |
| Regexp | `*.{{jpe?g}}` | `/file.jpeg` | `/file.png` | | Regexp | `*.{{jpe?g}}` | `/file.jpeg` | `/file.png` |
| | | `/dir/file.jpg` | `/dir/file.jpeeg` | | | | `/dir/file.jpg` | `/dir/file.jpeeg` |
| Rooted Regexp | `/{{.*\.jpe?g}}` | `/file.jpeg` | `/file.png` | | Rooted Regexp | `/{{.*\.jpe?g}}` | `/file.jpeg` | `/file.png` |
| | | `/file.jpg` | `/dir/file.jpg` | | | | `/file.jpg` | `/dir/file.jpg` |
## How filter rules are applied to files {#how-filter-rules-work} ## How filter rules are applied to files {#how-filter-rules-work}

View File

@@ -285,8 +285,8 @@ rclone v1.49.1
- go version: go1.12.9 - go version: go1.12.9
``` ```
There are a few command line options to consider when starting an rclone Docker There are a few command line options to consider when starting an rclone Docker container
container from the rclone image. from the rclone image.
- You need to mount the host rclone config dir at `/config/rclone` into the Docker - You need to mount the host rclone config dir at `/config/rclone` into the Docker
container. Due to the fact that rclone updates tokens inside its config file, container. Due to the fact that rclone updates tokens inside its config file,
@@ -300,8 +300,8 @@ container from the rclone image.
data files reside on the host with a non-root UID:GID, you need to pass these data files reside on the host with a non-root UID:GID, you need to pass these
on the container start command line. on the container start command line.
- If you want to access the RC interface (either via the API or the Web UI), it - If you want to access the RC interface (either via the API or the Web UI), it is
is required to set the `--rc-addr` to `:5572` in order to connect to it from outside required to set the `--rc-addr` to `:5572` in order to connect to it from outside
the container. An explanation about why this is necessary can be found in an old the container. An explanation about why this is necessary can be found in an old
[pythonspeed.com](https://web.archive.org/web/20200808071950/https://pythonspeed.com/articles/docker-connection-refused/) [pythonspeed.com](https://web.archive.org/web/20200808071950/https://pythonspeed.com/articles/docker-connection-refused/)
article. article.
@@ -309,9 +309,9 @@ container from the rclone image.
probably set it to listen to localhost only, with `127.0.0.1:5572` as the probably set it to listen to localhost only, with `127.0.0.1:5572` as the
value for `--rc-addr` value for `--rc-addr`
- It is possible to use `rclone mount` inside a userspace Docker container, and - It is possible to use `rclone mount` inside a userspace Docker container, and expose
expose the resulting fuse mount to the host. The exact `docker run` options to the resulting fuse mount to the host. The exact `docker run` options to do that
do that might vary slightly between hosts. See, e.g. the discussion in this might vary slightly between hosts. See, e.g. the discussion in this
[thread](https://github.com/moby/moby/issues/9448). [thread](https://github.com/moby/moby/issues/9448).
You also need to mount the host `/etc/passwd` and `/etc/group` for fuse to work You also need to mount the host `/etc/passwd` and `/etc/group` for fuse to work
@@ -542,8 +542,8 @@ To override them set the corresponding options (as command-line arguments, or as
After installing and configuring rclone, as described above, you are ready to use After installing and configuring rclone, as described above, you are ready to use
rclone as an interactive command line utility. If your goal is to perform *periodic* rclone as an interactive command line utility. If your goal is to perform *periodic*
operations, such as a regular [sync](https://rclone.org/commands/rclone_sync/), operations, such as a regular [sync](https://rclone.org/commands/rclone_sync/), you
you will probably want to configure your rclone command in your operating system's will probably want to configure your rclone command in your operating system's
scheduler. If you need to expose *service*-like features, such as scheduler. If you need to expose *service*-like features, such as
[remote control](https://rclone.org/rc/), [GUI](https://rclone.org/gui/), [remote control](https://rclone.org/rc/), [GUI](https://rclone.org/gui/),
[serve](https://rclone.org/commands/rclone_serve/) or [mount](https://rclone.org/commands/rclone_mount/), [serve](https://rclone.org/commands/rclone_serve/) or [mount](https://rclone.org/commands/rclone_mount/),
@@ -583,9 +583,9 @@ c:\rclone\rclone.exe sync c:\files remote:/files --no-console --log-file c:\rclo
As mentioned in the [mount](https://rclone.org/commands/rclone_mount/) documentation, As mentioned in the [mount](https://rclone.org/commands/rclone_mount/) documentation,
mounted drives created as Administrator are not visible to other accounts, not even mounted drives created as Administrator are not visible to other accounts, not even
the account that was elevated as Administrator. By running the mount command as the account that was elevated as Administrator. By running the mount command as the
the built-in `SYSTEM` user account, it will create drives accessible for everyone built-in `SYSTEM` user account, it will create drives accessible for everyone on
on the system. Both scheduled task and Windows service can be used to achieve this. the system. Both scheduled task and Windows service can be used to achieve this.
NOTE: Remember that when rclone runs as the `SYSTEM` user, the user profile NOTE: Remember that when rclone runs as the `SYSTEM` user, the user profile
that it sees will not be yours. This means that if you normally run rclone with that it sees will not be yours. This means that if you normally run rclone with
@@ -615,8 +615,8 @@ will often give you better results.
#### Start from Task Scheduler #### Start from Task Scheduler
Task Scheduler is an administrative tool built into Windows, and it can be used Task Scheduler is an administrative tool built into Windows, and it can be used to
to configure rclone to be started automatically in a highly configurable way, e.g. configure rclone to be started automatically in a highly configurable way, e.g.
periodically on a schedule, on user log on, or at system startup. It can run periodically on a schedule, on user log on, or at system startup. It can run
be configured to run as the current user, or for a mount command that needs to be configured to run as the current user, or for a mount command that needs to
be available to all users it can run as the `SYSTEM` user. be available to all users it can run as the `SYSTEM` user.
@@ -656,18 +656,18 @@ To Windows service running any rclone command, the excellent third-party utility
[NSSM](http://nssm.cc), the "Non-Sucking Service Manager", can be used. [NSSM](http://nssm.cc), the "Non-Sucking Service Manager", can be used.
It includes some advanced features such as adjusting process priority, defining It includes some advanced features such as adjusting process priority, defining
process environment variables, redirect to file anything written to stdout, and process environment variables, redirect to file anything written to stdout, and
customized response to different exit codes, with a GUI to configure everything customized response to different exit codes, with a GUI to configure everything from
from (although it can also be used from command line ). (although it can also be used from command line ).
There are also several other alternatives. To mention one more, There are also several other alternatives. To mention one more,
[WinSW](https://github.com/winsw/winsw), "Windows Service Wrapper", is worth checking [WinSW](https://github.com/winsw/winsw), "Windows Service Wrapper", is worth checking
out. It requires .NET Framework, but it is preinstalled on newer versions of Windows, out. It requires .NET Framework, but it is preinstalled on newer versions of Windows,
and it also provides alternative standalone distributions which includes necessary and it also provides alternative standalone distributions which includes necessary
runtime (.NET 5). WinSW is a command-line only utility, where you have to manually runtime (.NET 5). WinSW is a command-line only utility, where you have to manually
create an XML file with service configuration. This may be a drawback for some, create an XML file with service configuration. This may be a drawback for some, but
but it can also be an advantage as it is easy to back up and reuse the configuration it can also be an advantage as it is easy to back up and reuse the configuration
settings, without having go through manual steps in a GUI. One thing to note is settings, without having go through manual steps in a GUI. One thing to note is that
that by default it does not restart the service on error, one have to explicit enable by default it does not restart the service on error, one have to explicit enable
this in the configuration file (via the "onfailure" parameter). this in the configuration file (via the "onfailure" parameter).
### Autostart on Linux ### Autostart on Linux
@@ -676,8 +676,8 @@ this in the configuration file (via the "onfailure" parameter).
To always run rclone in background, relevant for mount commands etc, To always run rclone in background, relevant for mount commands etc,
you can use systemd to set up rclone as a system or user service. Running as a you can use systemd to set up rclone as a system or user service. Running as a
system service ensures that it is run at startup even if the user it is running system service ensures that it is run at startup even if the user it is running as
as has no active session. Running rclone as a user service ensures that it only has no active session. Running rclone as a user service ensures that it only
starts after the configured user has logged into the system. starts after the configured user has logged into the system.
#### Run periodically from cron #### Run periodically from cron

View File

@@ -14,62 +14,62 @@ show through.
Here is an overview of the major features of each cloud storage system. Here is an overview of the major features of each cloud storage system.
| Name | Hash | ModTime | Case Insensitive | Duplicate Files | MIME Type | Metadata | | Name | Hash | ModTime | Case Insensitive | Duplicate Files | MIME Type | Metadata |
| ----------------------------- | :---------------: | :-----: | :--------------: | :-------------: | :-------: | :------: | | ---------------------------- |:-----------------:|:-------:|:----------------:|:---------------:|:---------:|:--------:|
| 1Fichier | Whirlpool | - | No | Yes | R | - | | 1Fichier | Whirlpool | - | No | Yes | R | - |
| Akamai Netstorage | MD5, SHA256 | R/W | No | No | R | - | | Akamai Netstorage | MD5, SHA256 | R/W | No | No | R | - |
| Amazon S3 (or S3 compatible) | MD5 | R/W | No | No | R/W | RWU | | Amazon S3 (or S3 compatible) | MD5 | R/W | No | No | R/W | RWU |
| Backblaze B2 | SHA1 | R/W | No | No | R/W | - | | Backblaze B2 | SHA1 | R/W | No | No | R/W | - |
| Box | SHA1 | R/W | Yes | No | - | - | | Box | SHA1 | R/W | Yes | No | - | - |
| Citrix ShareFile | MD5 | R/W | Yes | No | - | - | | Citrix ShareFile | MD5 | R/W | Yes | No | - | - |
| Cloudinary | MD5 | R | No | Yes | - | - | | Cloudinary | MD5 | R | No | Yes | - | - |
| Dropbox | DBHASH ¹ | R | Yes | No | - | - | | Dropbox | DBHASH ¹ | R | Yes | No | - | - |
| Enterprise File Fabric | - | R/W | Yes | No | R/W | - | | Enterprise File Fabric | - | R/W | Yes | No | R/W | - |
| FileLu Cloud Storage | MD5 | R/W | No | Yes | R | - | | FileLu Cloud Storage | MD5 | R/W | No | Yes | R | - |
| Files.com | MD5, CRC32 | DR/W | Yes | No | R | - | | Files.com | MD5, CRC32 | DR/W | Yes | No | R | - |
| FTP | - | R/W ¹⁰ | No | No | - | - | | FTP | - | R/W ¹⁰ | No | No | - | - |
| Gofile | MD5 | DR/W | No | Yes | R | - | | Gofile | MD5 | DR/W | No | Yes | R | - |
| Google Cloud Storage | MD5 | R/W | No | No | R/W | - | | Google Cloud Storage | MD5 | R/W | No | No | R/W | - |
| Google Drive | MD5, SHA1, SHA256 | DR/W | No | Yes | R/W | DRWU | | Google Drive | MD5, SHA1, SHA256 | DR/W | No | Yes | R/W | DRWU |
| Google Photos | - | - | No | Yes | R | - | | Google Photos | - | - | No | Yes | R | - |
| HDFS | - | R/W | No | No | - | - | | HDFS | - | R/W | No | No | - | - |
| HiDrive | HiDrive ¹² | R/W | No | No | - | - | | HiDrive | HiDrive ¹² | R/W | No | No | - | - |
| HTTP | - | R | No | No | R | R | | HTTP | - | R | No | No | R | R |
| iCloud Drive | - | R | No | No | - | - | | iCloud Drive | - | R | No | No | - | - |
| Internet Archive | MD5, SHA1, CRC32 | R/W ¹¹ | No | No | - | RWU | | Internet Archive | MD5, SHA1, CRC32 | R/W ¹¹ | No | No | - | RWU |
| Jottacloud | MD5 | R/W | Yes | No | R | RW | | Jottacloud | MD5 | R/W | Yes | No | R | RW |
| Koofr | MD5 | - | Yes | No | - | - | | Koofr | MD5 | - | Yes | No | - | - |
| Linkbox | - | R | No | No | - | - | | Linkbox | - | R | No | No | - | - |
| Mail.ru Cloud | Mailru ⁶ | R/W | Yes | No | - | - | | Mail.ru Cloud | Mailru ⁶ | R/W | Yes | No | - | - |
| Mega | - | - | No | Yes | - | - | | Mega | - | - | No | Yes | - | - |
| Memory | MD5 | R/W | No | No | - | - | | Memory | MD5 | R/W | No | No | - | - |
| Microsoft Azure Blob Storage | MD5 | R/W | No | No | R/W | - | | Microsoft Azure Blob Storage | MD5 | R/W | No | No | R/W | - |
| Microsoft Azure Files Storage | MD5 | R/W | Yes | No | R/W | - | | Microsoft Azure Files Storage | MD5 | R/W | Yes | No | R/W | - |
| Microsoft OneDrive | QuickXorHash ⁵ | DR/W | Yes | No | R | DRW | | Microsoft OneDrive | QuickXorHash ⁵ | DR/W | Yes | No | R | DRW |
| OpenDrive | MD5 | R/W | Yes | Partial ⁸ | - | - | | OpenDrive | MD5 | R/W | Yes | Partial ⁸ | - | - |
| OpenStack Swift | MD5 | R/W | No | No | R/W | - | | OpenStack Swift | MD5 | R/W | No | No | R/W | - |
| Oracle Object Storage | MD5 | R/W | No | No | R/W | RU | | Oracle Object Storage | MD5 | R/W | No | No | R/W | RU |
| pCloud | MD5, SHA1 ⁷ | R/W | No | No | W | - | | pCloud | MD5, SHA1 ⁷ | R/W | No | No | W | - |
| PikPak | MD5 | R | No | No | R | - | | PikPak | MD5 | R | No | No | R | - |
| Pixeldrain | SHA256 | R/W | No | No | R | RW | | Pixeldrain | SHA256 | R/W | No | No | R | RW |
| premiumize.me | - | - | Yes | No | R | - | | premiumize.me | - | - | Yes | No | R | - |
| put.io | CRC-32 | R/W | No | Yes | R | - | | put.io | CRC-32 | R/W | No | Yes | R | - |
| Proton Drive | SHA1 | R/W | No | No | R | - | | Proton Drive | SHA1 | R/W | No | No | R | - |
| QingStor | MD5 | - ⁹ | No | No | R/W | - | | QingStor | MD5 | - ⁹ | No | No | R/W | - |
| Quatrix by Maytech | - | R/W | No | No | - | - | | Quatrix by Maytech | - | R/W | No | No | - | - |
| Seafile | - | - | No | No | - | - | | Seafile | - | - | No | No | - | - |
| SFTP | MD5, SHA1 ² | DR/W | Depends | No | - | - | | SFTP | MD5, SHA1 ² | DR/W | Depends | No | - | - |
| Shade | - | - | Yes | No | - | - | | Shade | - | - | Yes | No | - | - |
| Sia | - | - | No | No | - | - | | Sia | - | - | No | No | - | - |
| SMB | - | R/W | Yes | No | - | - | | SMB | - | R/W | Yes | No | - | - |
| SugarSync | - | - | No | No | - | - | | SugarSync | - | - | No | No | - | - |
| Storj | - | R | No | No | - | - | | Storj | - | R | No | No | - | - |
| Uloz.to | MD5, SHA256 ¹³ | - | No | Yes | - | - | | Uloz.to | MD5, SHA256 ¹³ | - | No | Yes | - | - |
| Uptobox | - | - | No | Yes | - | - | | Uptobox | - | - | No | Yes | - | - |
| WebDAV | MD5, SHA1 ³ | R ⁴ | Depends | No | - | - | | WebDAV | MD5, SHA1 ³ | R ⁴ | Depends | No | - | - |
| Yandex Disk | MD5 | R/W | No | No | R | - | | Yandex Disk | MD5 | R/W | No | No | R | - |
| Zoho WorkDrive | - | - | No | No | - | - | | Zoho WorkDrive | - | - | No | No | - | - |
| The local filesystem | All | DR/W | Depends | No | - | DRWU | | The local filesystem | All | DR/W | Depends | No | - | DRWU |
¹ Dropbox supports [its own custom ¹ Dropbox supports [its own custom
hash](https://www.dropbox.com/developers/reference/content-hash). hash](https://www.dropbox.com/developers/reference/content-hash).
@@ -136,7 +136,7 @@ size by default, though can be configured to check the file hash
change the timestamp of an existing file without having to re-upload it. change the timestamp of an existing file without having to re-upload it.
| Key | Explanation | | Key | Explanation |
| --- | ----------- | |-----|-------------|
| `-` | ModTimes not supported - times likely the upload time | | `-` | ModTimes not supported - times likely the upload time |
| `R` | ModTimes supported on files but can't be changed without re-upload | | `R` | ModTimes supported on files but can't be changed without re-upload |
| `R/W` | Read and Write ModTimes fully supported on files | | `R/W` | Read and Write ModTimes fully supported on files |
@@ -283,8 +283,8 @@ will be escaped with the `` character to avoid ambiguous file names.
Each cloud storage backend can use a different set of characters, Each cloud storage backend can use a different set of characters,
which will be specified in the documentation for each backend. which will be specified in the documentation for each backend.
| Character | Value | Replacement | | Character | Value | Replacement |
| --------- | :---: | :---------- :| | --------- |:-----:|:-----------:|
| NUL | 0x00 | ␀ | | NUL | 0x00 | ␀ |
| SOH | 0x01 | ␁ | | SOH | 0x01 | ␁ |
| STX | 0x02 | ␂ | | STX | 0x02 | ␂ |
@@ -324,9 +324,9 @@ The default encoding will also encode these file names as they are
problematic with many cloud storage systems. problematic with many cloud storage systems.
| File name | Replacement | | File name | Replacement |
| --------- | :--------- :| | --------- |:-----------:|
| . | | | . | |
| .. | | | .. | |
#### Invalid UTF-8 bytes {#invalid-utf8} #### Invalid UTF-8 bytes {#invalid-utf8}
@@ -366,8 +366,8 @@ list of all possible values by passing an invalid value to this
flag, e.g. `--local-encoding "help"`. The command `rclone help flags encoding` flag, e.g. `--local-encoding "help"`. The command `rclone help flags encoding`
will show you the defaults for the backends. will show you the defaults for the backends.
| Encoding | Characters | Encoded as | | Encoding | Characters | Encoded as |
| -------- | ---------- | ---------- | | --------- | ---------- | ---------- |
| Asterisk | `*` | `` | | Asterisk | `*` | `` |
| BackQuote | `` ` `` | `` | | BackQuote | `` ` `` | `` |
| BackSlash | `\` | `` | | BackSlash | `\` | `` |
@@ -492,12 +492,12 @@ that backend) and/or user metadata (general purpose metadata).
The levels of metadata support are The levels of metadata support are
| Key | Explanation | | Key | Explanation |
| --- | ----------- | |-----|-------------|
| `R` | Read only System Metadata on files only | | `R` | Read only System Metadata on files only|
| `RW` | Read and write System Metadata on files only | | `RW` | Read and write System Metadata on files only|
| `RWU` | Read and write System Metadata and read and write User Metadata on files only | | `RWU` | Read and write System Metadata and read and write User Metadata on files only|
| `DR` | Read only System Metadata on files and directories | | `DR` | Read only System Metadata on files and directories |
| `DRW` | Read and write System Metadata on files and directories | | `DRW` | Read and write System Metadata on files and directories|
| `DRWU` | Read and write System Metadata and read and write User Metadata on files and directories | | `DRWU` | Read and write System Metadata and read and write User Metadata on files and directories |
See [the metadata docs](/docs/#metadata) for more info. See [the metadata docs](/docs/#metadata) for more info.
@@ -507,60 +507,60 @@ See [the metadata docs](/docs/#metadata) for more info.
All rclone remotes support a base command set. Other features depend All rclone remotes support a base command set. Other features depend
upon backend-specific capabilities. upon backend-specific capabilities.
| Name | Purge | Copy | Move | DirMove | CleanUp | ListR | StreamUpload | MultithreadUpload | LinkSharing | About | EmptyDir | | Name | Purge | Copy | Move | DirMove | CleanUp | ListR | StreamUpload | MultithreadUpload | LinkSharing | About | EmptyDir |
| ----------------------------- | :---: | :--: | :--: | :-----: | :-----: | :---: | :----------: | :-----------------| :----------: | :---: | :------: | | ---------------------------- |:-----:|:----:|:----:|:-------:|:-------:|:-----:|:------------:|:------------------|:------------:|:-----:|:--------:|
| 1Fichier | No | Yes | Yes | No | No | No | No | No | Yes | No | Yes | | 1Fichier | No | Yes | Yes | No | No | No | No | No | Yes | No | Yes |
| Akamai Netstorage | Yes | No | No | No | No | Yes | Yes | No | No | No | Yes | | Akamai Netstorage | Yes | No | No | No | No | Yes | Yes | No | No | No | Yes |
| Amazon S3 (or S3 compatible) | No | Yes | No | No | Yes | Yes | Yes | Yes | Yes | No | No | | Amazon S3 (or S3 compatible) | No | Yes | No | No | Yes | Yes | Yes | Yes | Yes | No | No |
| Backblaze B2 | No | Yes | No | No | Yes | Yes | Yes | Yes | Yes | No | No | | Backblaze B2 | No | Yes | No | No | Yes | Yes | Yes | Yes | Yes | No | No |
| Box | Yes | Yes | Yes | Yes | Yes | No | Yes | No | Yes | Yes | Yes | | Box | Yes | Yes | Yes | Yes | Yes | No | Yes | No | Yes | Yes | Yes |
| Citrix ShareFile | Yes | Yes | Yes | Yes | No | No | No | No | No | No | Yes | | Citrix ShareFile | Yes | Yes | Yes | Yes | No | No | No | No | No | No | Yes |
| Dropbox | Yes | Yes | Yes | Yes | No | No | Yes | No | Yes | Yes | Yes | | Dropbox | Yes | Yes | Yes | Yes | No | No | Yes | No | Yes | Yes | Yes |
| Cloudinary | No | No | No | No | No | No | Yes | No | No | No | No | | Cloudinary | No | No | No | No | No | No | Yes | No | No | No | No |
| Enterprise File Fabric | Yes | Yes | Yes | Yes | Yes | No | No | No | No | No | Yes | | Enterprise File Fabric | Yes | Yes | Yes | Yes | Yes | No | No | No | No | No | Yes |
| Files.com | Yes | Yes | Yes | Yes | No | No | Yes | No | Yes | No | Yes | | Files.com | Yes | Yes | Yes | Yes | No | No | Yes | No | Yes | No | Yes |
| FTP | No | No | Yes | Yes | No | No | Yes | No | No | No | Yes | | FTP | No | No | Yes | Yes | No | No | Yes | No | No | No | Yes |
| Gofile | Yes | Yes | Yes | Yes | No | No | Yes | No | Yes | Yes | Yes | | Gofile | Yes | Yes | Yes | Yes | No | No | Yes | No | Yes | Yes | Yes |
| Google Cloud Storage | Yes | Yes | No | No | No | No | Yes | No | No | No | No | | Google Cloud Storage | Yes | Yes | No | No | No | No | Yes | No | No | No | No |
| Google Drive | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | Yes | | Google Drive | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | Yes |
| Google Photos | No | No | No | No | No | No | No | No | No | No | No | | Google Photos | No | No | No | No | No | No | No | No | No | No | No |
| HDFS | Yes | No | Yes | Yes | No | No | Yes | No | No | Yes | Yes | | HDFS | Yes | No | Yes | Yes | No | No | Yes | No | No | Yes | Yes |
| HiDrive | Yes | Yes | Yes | Yes | No | No | Yes | No | No | No | Yes | | HiDrive | Yes | Yes | Yes | Yes | No | No | Yes | No | No | No | Yes |
| HTTP | No | No | No | No | No | No | No | No | No | No | Yes | | HTTP | No | No | No | No | No | No | No | No | No | No | Yes |
| iCloud Drive | Yes | Yes | Yes | Yes | No | No | No | No | No | No | Yes | | iCloud Drive | Yes | Yes | Yes | Yes | No | No | No | No | No | No | Yes |
| ImageKit | Yes | No | Yes | No | No | No | No | No | No | No | Yes | | ImageKit | Yes | No | Yes | No | No | No | No | No | No | No | Yes |
| Internet Archive | No | Yes | No | No | Yes | Yes | No | No | Yes | Yes | No | | Internet Archive | No | Yes | No | No | Yes | Yes | No | No | Yes | Yes | No |
| Jottacloud | Yes | Yes | Yes | Yes | Yes | Yes | No | No | Yes | Yes | Yes | | Jottacloud | Yes | Yes | Yes | Yes | Yes | Yes | No | No | Yes | Yes | Yes |
| Koofr | Yes | Yes | Yes | Yes | No | No | Yes | No | Yes | Yes | Yes | | Koofr | Yes | Yes | Yes | Yes | No | No | Yes | No | Yes | Yes | Yes |
| Mail.ru Cloud | Yes | Yes | Yes | Yes | Yes | No | No | No | Yes | Yes | Yes | | Mail.ru Cloud | Yes | Yes | Yes | Yes | Yes | No | No | No | Yes | Yes | Yes |
| Mega | Yes | No | Yes | Yes | Yes | No | No | No | Yes | Yes | Yes | | Mega | Yes | No | Yes | Yes | Yes | No | No | No | Yes | Yes | Yes |
| Memory | No | Yes | No | No | No | Yes | Yes | No | No | No | No | | Memory | No | Yes | No | No | No | Yes | Yes | No | No | No | No |
| Microsoft Azure Blob Storage | Yes | Yes | No | No | No | Yes | Yes | Yes | No | No | No | | Microsoft Azure Blob Storage | Yes | Yes | No | No | No | Yes | Yes | Yes | No | No | No |
| Microsoft Azure Files Storage | No | Yes | Yes | Yes | No | No | Yes | Yes | No | Yes | Yes | | Microsoft Azure Files Storage | No | Yes | Yes | Yes | No | No | Yes | Yes | No | Yes | Yes |
| Microsoft OneDrive | Yes | Yes | Yes | Yes | Yes | Yes ⁵ | No | No | Yes | Yes | Yes | | Microsoft OneDrive | Yes | Yes | Yes | Yes | Yes | Yes ⁵ | No | No | Yes | Yes | Yes |
| OpenDrive | Yes | Yes | Yes | Yes | No | No | No | No | No | Yes | Yes | | OpenDrive | Yes | Yes | Yes | Yes | No | No | No | No | No | Yes | Yes |
| OpenStack Swift | Yes ¹ | Yes | No | No | No | Yes | Yes | No | No | Yes | No | | OpenStack Swift | Yes ¹ | Yes | No | No | No | Yes | Yes | No | No | Yes | No |
| Oracle Object Storage | No | Yes | No | No | Yes | Yes | Yes | Yes | No | No | No | | Oracle Object Storage | No | Yes | No | No | Yes | Yes | Yes | Yes | No | No | No |
| pCloud | Yes | Yes | Yes | Yes | Yes | Yes | No | No | Yes | Yes | Yes | | pCloud | Yes | Yes | Yes | Yes | Yes | Yes | No | No | Yes | Yes | Yes |
| PikPak | Yes | Yes | Yes | Yes | Yes | No | No | No | Yes | Yes | Yes | | PikPak | Yes | Yes | Yes | Yes | Yes | No | No | No | Yes | Yes | Yes |
| Pixeldrain | Yes | No | Yes | Yes | No | No | Yes | No | Yes | Yes | Yes | | Pixeldrain | Yes | No | Yes | Yes | No | No | Yes | No | Yes | Yes | Yes |
| premiumize.me | Yes | No | Yes | Yes | No | No | No | No | Yes | Yes | Yes | | premiumize.me | Yes | No | Yes | Yes | No | No | No | No | Yes | Yes | Yes |
| put.io | Yes | No | Yes | Yes | Yes | No | Yes | No | No | Yes | Yes | | put.io | Yes | No | Yes | Yes | Yes | No | Yes | No | No | Yes | Yes |
| Proton Drive | Yes | No | Yes | Yes | Yes | No | No | No | No | Yes | Yes | | Proton Drive | Yes | No | Yes | Yes | Yes | No | No | No | No | Yes | Yes |
| QingStor | No | Yes | No | No | Yes | Yes | No | No | No | No | No | | QingStor | No | Yes | No | No | Yes | Yes | No | No | No | No | No |
| Quatrix by Maytech | Yes | Yes | Yes | Yes | No | No | No | No | No | Yes | Yes | | Quatrix by Maytech | Yes | Yes | Yes | Yes | No | No | No | No | No | Yes | Yes |
| Seafile | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | Yes | | Seafile | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | Yes |
| SFTP | No | Yes ⁴| Yes | Yes | No | No | Yes | No | No | Yes | Yes | | SFTP | No | Yes ⁴| Yes | Yes | No | No | Yes | No | No | Yes | Yes |
| Sia | No | No | No | No | No | No | Yes | No | No | No | Yes | | Sia | No | No | No | No | No | No | Yes | No | No | No | Yes |
| SMB | No | No | Yes | Yes | No | No | Yes | Yes | No | No | Yes | | SMB | No | No | Yes | Yes | No | No | Yes | Yes | No | No | Yes |
| SugarSync | Yes | Yes | Yes | Yes | No | No | Yes | No | Yes | No | Yes | | SugarSync | Yes | Yes | Yes | Yes | No | No | Yes | No | Yes | No | Yes |
| Storj | Yes ² | Yes | Yes | No | No | Yes | Yes | No | Yes | No | No | | Storj | Yes ² | Yes | Yes | No | No | Yes | Yes | No | Yes | No | No |
| Uloz.to | No | No | Yes | Yes | No | No | No | No | No | No | Yes | | Uloz.to | No | No | Yes | Yes | No | No | No | No | No | No | Yes |
| Uptobox | No | Yes | Yes | Yes | No | No | No | No | No | No | No | | Uptobox | No | Yes | Yes | Yes | No | No | No | No | No | No | No |
| WebDAV | Yes | Yes | Yes | Yes | No | No | Yes ³ | No | No | Yes | Yes | | WebDAV | Yes | Yes | Yes | Yes | No | No | Yes ³ | No | No | Yes | Yes |
| Yandex Disk | Yes | Yes | Yes | Yes | Yes | No | Yes | No | Yes | Yes | Yes | | Yandex Disk | Yes | Yes | Yes | Yes | Yes | No | Yes | No | Yes | Yes | Yes |
| Zoho WorkDrive | Yes | Yes | Yes | Yes | No | No | No | No | No | Yes | Yes | | Zoho WorkDrive | Yes | Yes | Yes | Yes | No | No | No | No | No | Yes | Yes |
| The local filesystem | No | No | Yes | Yes | No | No | Yes | Yes | No | Yes | Yes | | The local filesystem | No | No | Yes | Yes | No | No | Yes | Yes | No | Yes | Yes |
¹ Note Swift implements this in order to delete directory markers but ¹ Note Swift implements this in order to delete directory markers but
it doesn't actually have a quicker way of deleting files other than it doesn't actually have a quicker way of deleting files other than

View File

@@ -14,6 +14,7 @@ const (
DumpGoRoutines DumpGoRoutines
DumpOpenFiles DumpOpenFiles
DumpMapper DumpMapper
DumpCurl
) )
type dumpChoices struct{} type dumpChoices struct{}
@@ -29,6 +30,7 @@ func (dumpChoices) Choices() []BitsChoicesInfo {
{uint64(DumpGoRoutines), "goroutines"}, {uint64(DumpGoRoutines), "goroutines"},
{uint64(DumpOpenFiles), "openfiles"}, {uint64(DumpOpenFiles), "openfiles"},
{uint64(DumpMapper), "mapper"}, {uint64(DumpMapper), "mapper"},
{uint64(DumpCurl), "curl"},
} }
} }

View File

@@ -15,6 +15,8 @@ import (
"net/http/httputil" "net/http/httputil"
"net/url" "net/url"
"os" "os"
"slices"
"strings"
"sync" "sync"
"time" "time"
@@ -24,6 +26,7 @@ import (
"github.com/rclone/rclone/lib/structs" "github.com/rclone/rclone/lib/structs"
"github.com/youmark/pkcs8" "github.com/youmark/pkcs8"
"golang.org/x/net/publicsuffix" "golang.org/x/net/publicsuffix"
"moul.io/http2curl/v2"
) )
const ( const (
@@ -439,6 +442,18 @@ func cleanAuths(buf []byte) []byte {
return buf return buf
} }
// cleanCurl gets rid of Auth headers in a curl command
func cleanCurl(cmd *http2curl.CurlCommand) {
for _, authBuf := range authBufs {
auth := "'" + string(authBuf)
for i, arg := range *cmd {
if strings.HasPrefix(arg, auth) {
(*cmd)[i] = auth + "XXXX'"
}
}
}
}
var expireWindow = 30 * time.Second var expireWindow = 30 * time.Second
func isCertificateExpired(cc *tls.Config) bool { func isCertificateExpired(cc *tls.Config) bool {
@@ -492,6 +507,26 @@ func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error
fs.Debugf(nil, "%s", separatorReq) fs.Debugf(nil, "%s", separatorReq)
logMutex.Unlock() logMutex.Unlock()
} }
// Dump curl request
if t.dump&(fs.DumpCurl) != 0 {
cmd, err := http2curl.GetCurlCommand(req)
if err != nil {
fs.Debugf(nil, "Failed to create curl command: %v", err)
} else {
// Patch -X HEAD into --head
for i := range len(*cmd) - 1 {
if (*cmd)[i] == "-X" && (*cmd)[i+1] == "'HEAD'" {
(*cmd)[i] = "--head"
*cmd = slices.Delete(*cmd, i+1, i+2)
break
}
}
if t.dump&fs.DumpAuth == 0 {
cleanCurl(cmd)
}
fs.Debugf(nil, "HTTP REQUEST: %v", cmd)
}
}
// Do round trip // Do round trip
resp, err = t.Transport.RoundTrip(req) resp, err = t.Transport.RoundTrip(req)
// Logf response // Logf response

View File

@@ -19,6 +19,7 @@ import (
"github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"moul.io/http2curl/v2"
) )
func TestCleanAuth(t *testing.T) { func TestCleanAuth(t *testing.T) {
@@ -61,6 +62,32 @@ func TestCleanAuths(t *testing.T) {
} }
} }
func TestCleanCurl(t *testing.T) {
for _, test := range []struct {
in []string
want []string
}{{
[]string{""},
[]string{""},
}, {
[]string{"floo"},
[]string{"floo"},
}, {
[]string{"'Authorization: AAAAAAAAA'", "'Potato: Help'", ""},
[]string{"'Authorization: XXXX'", "'Potato: Help'", ""},
}, {
[]string{"'X-Auth-Token: AAAAAAAAA'", "'Potato: Help'", ""},
[]string{"'X-Auth-Token: XXXX'", "'Potato: Help'", ""},
}, {
[]string{"'X-Auth-Token: AAAAAAAAA'", "'Authorization: AAAAAAAAA'", "'Potato: Help'", ""},
[]string{"'X-Auth-Token: XXXX'", "'Authorization: XXXX'", "'Potato: Help'", ""},
}} {
in := http2curl.CurlCommand(test.in)
cleanCurl(&in)
assert.Equal(t, test.want, test.in, test.in)
}
}
var certSerial = int64(0) var certSerial = int64(0)
// Create a test certificate and key pair that is valid for a specific // Create a test certificate and key pair that is valid for a specific