Repository navigation
Add Mailru backend - #3501
Add Mailru backend#3501ivandeex wants to merge 41 commits into
Conversation
commit f9384013a60f61fbef60eebdd5317d23d23fd9b7 Author: Ivan Andreev <[email protected]> Date: Sun Jun 9 14:18:59 2019 +0300 merge all but api sources commit 94823d127a51365c4655b09b0e6f7439a5e10711 Author: Ivan Andreev <[email protected]> Date: Sun Jun 9 01:38:43 2019 +0300 move protocol constants to api subpackage (m1, bin, helpers) commit 15fa37209587ca3e5b0c40ad86c3505ea78bf10f Author: Ivan Andreev <[email protected]> Date: Sun Jun 9 00:47:18 2019 +0300 timely close response bodies commit 672b711f16200875e19ae2efda19309a1d414675 Author: Ivan Andreev <[email protected]> Date: Sat Jun 8 23:53:32 2019 +0300 rename typical http response from resp to res commit ef253af5424660c7960298ebbbe7b265d92ac0ed Author: Ivan Andreev <[email protected]> Date: Sat Jun 8 23:38:56 2019 +0300 rewrite relPath() commit cf1f9a2d60d94b490ae546c384ee96c62e08f1b8 Author: Ivan Andreev <[email protected]> Date: Sat Jun 8 23:36:49 2019 +0300 rename fullPath() to absPath() commit 472075f97342f6e909de1524a315d4973ea642f4 Author: Ivan Andreev <[email protected]> Date: Sat Jun 8 22:52:07 2019 +0300 allow http gzip and cleanly get my config commit c5f7424752dfd35bfd6895ade1698acec6b5e00d Author: Ivan Andreev <[email protected]> Date: Sat Jun 8 17:07:36 2019 +0300 support ServerSideAcrossConfigs if accounts are same commit e1ba7c974d15bae3bb545aa091d76e301b5c4030 Author: Ivan Andreev <[email protected]> Date: Sat Jun 8 16:33:51 2019 +0300 remove unsupported CleanUp and PublicLink commit 6f86f389001b41b0597123e89c05c29451a0d026 Author: Ivan Andreev <[email protected]> Date: Sat Jun 8 16:20:38 2019 +0300 a number of code enhancements commit 089d67426f3ef2047c17d938bf748242c769fee0 Author: Ivan Andreev <[email protected]> Date: Sat Jun 8 15:44:44 2019 +0300 flexible debugging options commit 34fe787e0b22741ed6473229420ab7c65234ef37 Author: Ivan Andreev <[email protected]> Date: Sat Jun 8 15:03:33 2019 +0300 BinReader should not auto-read first byte commit 08835b295f49bed6657c9a15d0e7ad22cee6bd5d Author: Ivan Andreev <[email protected]> Date: Sat Jun 8 07:05:55 2019 +0300 revive binary directory listing commit e40868090569a76767e69e61beefe76cfacb1b8f Author: Ivan Andreev <[email protected]> Date: Fri Jun 7 15:56:22 2019 +0300 rename binary protocol helpers commit cbf297a95cce18d4ac175f84b30ddc6c6fca1894 Author: Ivan Andreev <[email protected]> Date: Fri Jun 7 15:27:17 2019 +0300 use go varint encoder insted of hand-written codec commit f12b05c01ae875e061678cf7494c27290ef889b5 Author: Ivan Andreev <[email protected]> Date: Wed Jun 5 04:19:44 2019 +0300 keep object name with download lock commit 6484acf5b9fcf3c2027ed786514f95dba694ceff Author: Ivan Andreev <[email protected]> Date: Wed Jun 5 04:19:12 2019 +0300 support for ranges in download commit 5f06e73830a2fa786c0ae34db434e7b932f01ead Author: Ivan Andreev <[email protected]> Date: Wed Jun 5 04:16:13 2019 +0300 mailru is case sensitive commit 6528f38835745f0bb23d97d4a0299ad4dd07bfb9 Author: Ivan Andreev <[email protected]> Date: Sun Jun 2 11:34:23 2019 +0300 debug directory listing commit bd6916a01a30b022336140981f4bd35ce92dffb7 Author: Ivan Andreev <[email protected]> Date: Sat Jun 1 12:16:33 2019 +0300 investigate more binary opcodes commit f549efd948238f738c4dfd771f63b663880755bf Author: Ivan Andreev <[email protected]> Date: Sat Jun 1 11:32:16 2019 +0300 fix target path issues on intra-provider file copy commit c6a6cd9a706c676080d8155e32b7fd57394fe5f6 Author: Ivan Andreev <[email protected]> Date: Sat Jun 1 11:31:37 2019 +0300 small enhancements commit 80a12869f916b9885f02547584b34c5febe158bd Author: Ivan Andreev <[email protected]> Date: Sat Jun 1 08:02:41 2019 +0300 upload small files commit 70a4f8412009f03826d4bd627e46441c4397e9d3 Author: Ivan Andreev <[email protected]> Date: Sat Jun 1 07:10:21 2019 +0300 merge m1XxxInfo into wrappers, remove binFolderInfo commit 3631c3952f176b9dbe0468fc79d695444c5b7cae Author: Ivan Andreev <[email protected]> Date: Sat Jun 1 06:40:11 2019 +0300 implement rmdir/purge commit 703374e519b5debc581c0affc1e911ccc4216704 Author: Ivan Andreev <[email protected]> Date: Sat Jun 1 05:38:45 2019 +0300 implement directory move commit bee0d64427b887675f046482f5874dc7211559e0 Author: Ivan Andreev <[email protected]> Date: Sat Jun 1 05:00:47 2019 +0300 implement copy/move commit 2cf1c0b59cd4e7eeec25c4365258d61063c67dfa Author: Ivan Andreev <[email protected]> Date: Sat Jun 1 05:01:08 2019 +0300 minor stylistic enhancements commit 5d977d0998a7e35a3178f275080ba4e0ed97f7f2 Author: Ivan Andreev <[email protected]> Date: Sat Jun 1 04:49:48 2019 +0300 NewObject/readXxxMetaData must properly return ErrorObjectNotFound commit 54edf4eb75313b3981fab0f95d0211164c019894 Author: Ivan Andreev <[email protected]> Date: Sat Jun 1 04:46:46 2019 +0300 mkParentDirs based on mkDirs commit 436d33d0246895245f013fe07b45735870c30bcc Author: Ivan Andreev <[email protected]> Date: Fri May 31 22:41:22 2019 +0300 delete file commit 2a36d61128bdde79dc845724c8a1d694b0caf625 Author: Ivan Andreev <[email protected]> Date: Fri May 31 21:57:41 2019 +0300 fix path conversion commit 552df255d9531f07c44580bc5f9bda7499faf073 Author: Ivan Andreev <[email protected]> Date: Fri May 31 21:57:09 2019 +0300 add or update file metadata commit ba522ebbeec9d2d8b05747e258efc9da5231f135 Author: Ivan Andreev <[email protected]> Date: Fri May 31 21:54:03 2019 +0300 upload file content commit f2aac9ab41006c738d1fd5bfd69934e844a8379c Author: Ivan Andreev <[email protected]> Date: Fri May 31 17:25:42 2019 +0300 switch upload shards commit 6ae9c9ceb851da927f232bf19641443aa2726f0a Author: Ivan Andreev <[email protected]> Date: Fri May 31 17:24:55 2019 +0300 object method fullPath commit 46634f7fae9d345ac3fa8883189c5e860c5140be Author: Ivan Andreev <[email protected]> Date: Fri May 31 17:20:21 2019 +0300 mark that native sha1 is not supported commit 61eb1183bac0e484fad63a9b68ef4b470cfde10e Author: Ivan Andreev <[email protected]> Date: Fri May 31 16:16:02 2019 +0300 handle meta server errors commit fa33aef7670bf659e52c8bbe0444b2815669d2ff Author: Ivan Andreev <[email protected]> Date: Fri May 31 15:52:34 2019 +0300 mail.ru hash is not a classic sha1 commit 1b5c32c27144c41c5a3b9ed2323226e7a3ae3777 Author: Ivan Andreev <[email protected]> Date: Fri May 31 15:35:35 2019 +0300 ignore non-existing root on init commit 00166bf49fc9bce312801486983e93f0b1e575ac Author: Ivan Andreev <[email protected]> Date: Fri May 31 07:04:22 2019 +0300 create directory or directory tree commit 66d1ed50a18a6e65824d454d4fbd79ada448d029 Author: Ivan Andreev <[email protected]> Date: Fri May 31 05:11:16 2019 +0300 split long source file commit a573bb576aee7142a0ae2327f6f65506a153f911 Author: Ivan Andreev <[email protected]> Date: Thu May 30 23:47:20 2019 +0300 simplify file server switcher commit d7954b462900c9052acb634392ea0d709f3d5804 Author: Ivan Andreev <[email protected]> Date: Thu May 30 19:37:56 2019 +0300 switch and lock download servers commit da6c35226135bbc24b33b3abc3f21be34a288a53 Author: Ivan Andreev <[email protected]> Date: Thu May 30 15:37:28 2019 +0300 guard server switchers with mutex commit 3871c8b08e960be80edb9fc04a4a1f7f300139c9 Author: Ivan Andreev <[email protected]> Date: Thu May 30 15:21:35 2019 +0300 use single api client commit bd0e392884b7881b62c4c3d5dd0bf4c9d8306818 Author: Ivan Andreev <[email protected]> Date: Thu May 30 15:19:05 2019 +0300 handle file related errors commit b1cdaae736fec075e5004bb377d63ad58e0c0938 Author: Ivan Andreev <[email protected]> Date: Thu May 30 01:08:22 2019 +0300 open file for reading commit 2fb9defde31a92265cebc98fc7711cc8e0370e48 Author: Ivan Andreev <[email protected]> Date: Wed May 29 22:25:42 2019 +0300 fix problems with slashes commit ac78dabfbd05e391e3e7c28740f7bc93aac70fa7 Author: Ivan Andreev <[email protected]> Date: Wed May 29 21:50:19 2019 +0300 cleanup stub functions commit 7df779251376b6709c9f8dc373c3d848d3562b48 Author: Ivan Andreev <[email protected]> Date: Wed May 29 21:48:30 2019 +0300 handle single files correctly commit 846cbb6b98ee87c0b2e0aca2cccdcacc00f8aa2b Author: Ivan Andreev <[email protected]> Date: Tue May 28 06:34:30 2019 +0300 list directory using m1 protocol commit eaeadd80889afa0c11cf8840169a12fdc0f811e9 Author: Ivan Andreev <[email protected]> Date: Tue May 28 04:22:56 2019 +0300 attempt to list directory using Bin protocol commit 89e8a0d26a37819a579ee4bc7d701fe9a81303cc Author: Ivan Andreev <[email protected]> Date: Mon May 27 22:47:41 2019 +0300 implement request for meta server commit 10d4608674d9c4241a6c18c951de4c4331e27648 Author: Ivan Andreev <[email protected]> Date: Mon May 27 21:11:33 2019 +0300 implement About commit db10fed663857399903177de627e313b629f5af5 Author: Ivan Andreev <[email protected]> Date: Mon May 27 20:22:28 2019 +0300 implement oauth2 token source commit 378262cbd86a2bdd233d610c48b7180fee0508c7 Author: Ivan Andreev <[email protected]> Date: Sun May 26 11:23:41 2019 +0300 stub remote for mail.ru
Empty pattern string will disable speedup completely. "*" as one of file patterns will enable speedup for all file names.
Normally `rclone mkdir` returns success if a directory already exists. Some programs (e.g. borgbackup or restic) use mkdir as an atomic primitive to lock their on-disk structures. As a workaround, mailru backend will support a special option. If rclone finds already existing directory while invoked as `rclone mkdir --mailru-debug=atomicmkdir mkdir backend:somedir`, it will return the ErrorDirAlreadyExists.
|
This branch enables mailru hash in rclone globally: https://github.com/ivandeex/rclone/tree/mrhash |
ncw
left a comment
There was a problem hiding this comment.
That looks like a fantastic piece of work - well done :-)
Is the protocol reverse engineered?
I put some comments inline.
I think we need to get the mrhash into the framework then we can make things more efficient!
Thanks
|
The protocol was originally rev-eng'ed by this guy https://github.com/yar229/WebDavMailRuCloud |
|
Let me know when you are ready for another round of review :-) |
|
I have committed remaining pieces and run unit/integration test suites successfully. I will later submit tickets or PRs for two remaining issues:
Please review and merge. |
|
I've merged that now - thank you very much :-) I squashed the commits locally and added the missing docs. I'll manually close this pull request now. Thank you very much for this :-) |

What is the purpose of this change?
This PR implements a remote for Mail.ru Cloud, a Russian cloud storage provider. All unit and integration tests pass for me. See https://travis-ci.org/ivandeex/rclone
I will submit a separate PR which will enable Mailru hash algorithm in rclone.
Was the change discussed in an issue or in the forum before?
This backend was requested in issue #591
Checklist