Skip to content

Commit

Permalink
protondrive: complete docs with all references to Proton Drive
Browse files Browse the repository at this point in the history
  • Loading branch information
ncw committed Sep 10, 2023
1 parent d4d530b commit fa4d171
Show file tree
Hide file tree
Showing 8 changed files with 166 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ alphabetical order of full name of remote (e.g. `drive` is ordered as
* `README.md` - main GitHub page
* `docs/content/remote.md` - main docs page (note the backend options are automatically added to this file with `make backenddocs`)
* make sure this has the `autogenerated options` comments in (see your reference backend docs)
* update them with `make backenddocs` - revert any changes in other backends
* update them in your backend with `bin/make_backend_docs.py remote`
* `docs/content/overview.md` - overview docs
* `docs/content/docs.md` - list of remotes in config section
* `docs/content/_index.md` - front page of rclone.org
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Rclone *("rsync for cloud storage")* is a command-line program to sync files and
* PikPak [:page_facing_up:](https://rclone.org/pikpak/)
* premiumize.me [:page_facing_up:](https://rclone.org/premiumizeme/)
* put.io [:page_facing_up:](https://rclone.org/putio/)
* 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)
* Quatrix [:page_facing_up:](https://rclone.org/quatrix/)
Expand Down
1 change: 1 addition & 0 deletions bin/make_manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"premiumizeme.md",
"protondrive.md",
"putio.md",
"protondrive.md",
"seafile.md",
"sftp.md",
"smb.md",
Expand Down
1 change: 1 addition & 0 deletions docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ WebDAV or S3, that work out of the box.)
{{< provider name="PikPak" home="https://mypikpak.com/" config="/pikpak/" >}}
{{< provider name="premiumize.me" home="https://premiumize.me/" config="/premiumizeme/" >}}
{{< provider name="put.io" home="https://put.io/" config="/putio/" >}}
{{< provider name="Proton Drive" home="https://proton.me/drive" config="/protondrive/" >}}
{{< 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/" >}}
Expand Down
1 change: 1 addition & 0 deletions docs/content/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ See the following for detailed instructions for
* [PikPak](/pikpak/)
* [premiumize.me](/premiumizeme/)
* [put.io](/putio/)
* [Proton Drive](/protondrive/)
* [QingStor](/qingstor/)
* [Quatrix by Maytech](/quatrix/)
* [Seafile](/seafile/)
Expand Down
2 changes: 2 additions & 0 deletions docs/content/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Here is an overview of the major features of each cloud storage system.
| PikPak | MD5 | R | No | No | R | - |
| premiumize.me | - | - | Yes | No | R | - |
| put.io | CRC-32 | R/W | No | Yes | R | - |
| Proton Drive | SHA1 | R/W | No | No | R | - |
| QingStor | MD5 | - ⁹ | No | No | R/W | - |
| Quatrix by Maytech | - | R/W | No | No | - | - |
| Seafile | - | - | No | No | - | - |
Expand Down Expand Up @@ -499,6 +500,7 @@ upon backend-specific capabilities.
| PikPak | Yes | Yes | Yes | Yes | Yes | 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 |
| 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 |
| 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 |
Expand Down
163 changes: 158 additions & 5 deletions docs/content/protondrive.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,26 @@
title: "Proton Drive"
description: "Rclone docs for Proton Drive"
versionIntroduced: "v1.64.0"
status: Beta
---

# {{< icon "fa fa-atom-simple" >}} Proton Drive
# {{< icon "fa fa-folder" >}} Proton Drive

[Proton Drive](https://proton.me/drive) is an end-to-end encrypted Swiss vault
for your files that protects your data.

This is a rclone backend for Proton Drive which supports the file transfer
This is an rclone backend for Proton Drive which supports the file transfer
features of Proton Drive using the same client-side encryption.

Due to the fact that Proton Drive doesn't publish its API documentation, this
backend is implemented with the best effort by reading the open-sourced client
source code and observing the Proton Drive traffic on the browser.
backend is implemented with best efforts by reading the open-sourced client
source code and observing the Proton Drive traffic in the browser.

**NB** This backend is currently in Beta. It is believed to be correct
and all the integration tests pass. However the Proton Drive protocol
has evolved over time there may be accounts it is not compatible
with. Please [post on the rclone forum](https://forum.rclone.org/) if
you find an incompatibility.

Paths are specified as `remote:path`

Expand Down Expand Up @@ -116,6 +123,152 @@ to be implemented, so updates from other clients won’t be reflected in the
cache. Thus, if there are concurrent clients accessing the same mount point,
then we might have a problem with caching the stale data.

{{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/protondrive/protondrive.go then run make backenddocs" >}}
### Standard options

Here are the Standard options specific to protondrive (Proton Drive).

#### --protondrive-username

The username of your proton drive account

Properties:

- Config: username
- Env Var: RCLONE_PROTONDRIVE_USERNAME
- Type: string
- Required: true

#### --protondrive-password

The password of your proton drive account.

**NB** Input to this must be obscured - see [rclone obscure](/commands/rclone_obscure/).

Properties:

- Config: password
- Env Var: RCLONE_PROTONDRIVE_PASSWORD
- Type: string
- Required: true

#### --protondrive-2fa

The 2FA code

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

Properties:

- Config: 2fa
- Env Var: RCLONE_PROTONDRIVE_2FA
- Type: string
- Required: false

### Advanced options

Here are the Advanced options specific to protondrive (Proton Drive).

#### --protondrive-encoding

The encoding for the backend.

See the [encoding section in the overview](/overview/#encoding) for more info.

Properties:

- Config: encoding
- Env Var: RCLONE_PROTONDRIVE_ENCODING
- Type: MultiEncoder
- Default: Slash,LeftSpace,RightSpace,InvalidUtf8,Dot

#### --protondrive-original-file-size

Return the file size before encryption

The size of the encrypted file will be different from (bigger than) the
original file size. Unless there is a reason to return the file size
after encryption is performed, otherwise, set this option to true, as
features like Open() which will need to be supplied with original content
size, will fail to operate properly

Properties:

- Config: original_file_size
- Env Var: RCLONE_PROTONDRIVE_ORIGINAL_FILE_SIZE
- Type: bool
- Default: true

#### --protondrive-app-version

The app version string

The app version string indicates the client that is currently performing
the API request. This information is required and will be sent with every
API request.

Properties:

- Config: app_version
- Env Var: RCLONE_PROTONDRIVE_APP_VERSION
- Type: string
- Default: "macos-drive@1.0.0-alpha.1+rclone"

#### --protondrive-replace-existing-draft

Create a new revision when filename conflict is detected

When a file upload is cancelled or failed before completion, a draft will be
created and the subsequent upload of the same file to the same location will be
reported as a conflict.

The value can also be set by --protondrive-replace-existing-draft=true

If the option is set to true, the draft will be replaced and then the upload
operation will restart. If there are other clients also uploading at the same
file location at the same time, the behavior is currently unknown. Need to set
to true for integration tests.
If the option is set to false, an error "a draft exist - usually this means a
file is being uploaded at another client, or, there was a failed upload attempt"
will be returned, and no upload will happen.

Properties:

- Config: replace_existing_draft
- Env Var: RCLONE_PROTONDRIVE_REPLACE_EXISTING_DRAFT
- Type: bool
- Default: false

#### --protondrive-enable-caching

Caches the files and folders metadata to reduce API calls

Notice: If you are mounting ProtonDrive as a VFS, please disable this feature,
as the current implementation doesn't update or clear the cache when there are
external changes.

The files and folders on ProtonDrive are represented as links with keyrings,
which can be cached to improve performance and be friendly to the API server.

The cache is currently built for the case when the rclone is the only instance
performing operations to the mount point. The event system, which is the proton
API system that provides visibility of what has changed on the drive, is yet
to be implemented, so updates from other clients won’t be reflected in the
cache. Thus, if there are concurrent clients accessing the same mount point,
then we might have a problem with caching the stale data.

Properties:

- Config: enable_caching
- Env Var: RCLONE_PROTONDRIVE_ENABLE_CACHING
- Type: bool
- Default: true

{{< rem autogenerated options stop >}}

## Limitations

This backend uses the
Expand All @@ -139,4 +292,4 @@ top of this quickly. This codebase handles the intricate tasks before and after
calling Proton APIs, particularly the complex encryption scheme, allowing
developers to implement features for other software on top of this codebase.
There are likely quite a few errors in this library, as there isn't official
documentation available.
documentation available.
1 change: 1 addition & 0 deletions docs/layouts/chrome/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
<a class="dropdown-item" href="/pikpak/"><i class="fa fa-cloud fa-fw"></i> PikPak</a>
<a class="dropdown-item" href="/premiumizeme/"><i class="fa fa-user fa-fw"></i> premiumize.me</a>
<a class="dropdown-item" href="/putio/"><i class="fas fa-parking fa-fw"></i> put.io</a>
<a class="dropdown-item" href="/protondrive/"><i class="fas fa-folder fa-fw"></i> Proton Drive</a>
<a class="dropdown-item" href="/quatrix/"><i class="fas fa-shield-alt"></i> Quatrix</a>
<a class="dropdown-item" href="/seafile/"><i class="fa fa-server fa-fw"></i> Seafile</a>
<a class="dropdown-item" href="/sftp/"><i class="fa fa-server fa-fw"></i> SFTP</a>
Expand Down

0 comments on commit fa4d171

Please sign in to comment.