WebDavMailRuCloud
WebDAV cloud.mail.ru ...& Yandex.Disk | WebDAV Облако Mail.Ru Сетевой Диск
Install / Use
/learn @yar229/WebDavMailRuCloudREADME
WebDAV emulator for Cloud.mail.ru / Yandex.Disk<br>
<a href="https://github.com/yar229/WebDavMailRuCloud/releases/latest"><img src="https://img.shields.io/github/v/release/yar229/WebDavMailRuCloud?include_prereleases"></a> <img src="https://img.shields.io/github/last-commit/yar229/WebDavMailRuCloud" target="_blank"> <img src="https://img.shields.io/github/downloads/yar229/WebDavMailRuCloud/total" align="right" target="_blank">
@ZZZConsulting:<br /> Дополнительно сделан вход на Яндекс.Диск с помощью браузера.<br> Поддерживается всё разнообразие вариантов аутентификации, включая СМС-коды и QR-коды.
Версия .NET обновлена до 7.0, включая поддержку установки сервисом Windows.
<hr> <br> <br>Requirements <img src="https://habrastorage.org/files/72e/83b/159/72e83b159c2446b9adcdaa03b9bb5c55.png" width=200 align="right"/>
- Windows - .NET Framework 4.8 / .NET 3.1 / 5.0 / 6.0 / 7.0
- Linux - Mono 6.8 / .NET 3.1 / 5.0 / 6.0 / 7.0
- OS X - Mono 6.8 / .NET 3.1 / 5.0 / 6.0 / 7.0
Usage
-p, --port (Default: 801) WebDAV server port or several ports separated by `,`
-h, --host (Default: "http://127.0.0.1") WebDAV server host with protocol (http://* for http://0.0.0.0)
--maxthreads (Default: 5) Maximum concurrent connections to cloud.mail.ru / disk.yandex.ru
--use-locks use locking feature
--cache-listing (Default: 30) Cache folders listing, sec
--cache-listing-depth (Default: 1) Cache folders listing depth.
If large folder browsing is extremely slow, set to 2
--protocol (Default: WebM1Bin) Cloud protocol
* WebM1Bin - (Cloud.Mail.Ru) mix of mobile and DiskO protocols
* WebV2 - (Cloud.Mail.Ru) [deprecated] desktop browser protocol
* YadWeb - (Yandex.Disk) desktop browser protocol, see Yandex.Disk readme section
* YadWebV2 - (Yandex.Disk) desktop browser protocol with browser authentication, see Yandex.Disk readme section
--use-deduplicate Enable deduplication (upload speedup, put by hash), see Using deduplication readme section
--install <servicename> Install as windows service (Windows .Net 4.8/7.0 versions only)
--install-display <displayname> Display name for Windows service (Windows .Net 4.8/7.0 versions only)
--uninstall <servicename> Uninstall windows service (Windows .Net 4.8/7.0 versions only)
--proxy-address <socks|https|http>://<address>:<port> Use proxy
--proxy-user <username> Proxy user name
--proxy-password <password> Proxy password
--help Display this help screen.
--version Display version information.
-user-agent overrides default 'user-agent' string in request headers while accessing clouds.
-sec-ch-ua overrides default 'sec-ch-ua' string in request headers while accessing clouds.
Hasher.exe usage
Calculating hashes for local files
--files (Group: sources) Filename(s)/wildcard(s) separated by space
--lists (Group: sources) Text files with wildcards/filenames separated by space
--protocol (Default: WebM1Bin) Cloud protocol to determine hasher
-r, --recursive (Default: false) Perform recursive directories scan
--help Display this help screen.
--version Display version information.
Using deduplication (upload speedup, put by hash)
Edit <Deduplicate> section in wdmrc.config:
<Deduplicate>
<!-- Path for disk file cache -->
<Disk Path = "d:\Temp\WDMRC_Cache" />
<!--
Cache: on disk or in-memory file caching
Target: path with filename in cloud, .NET regular expression,
see https://docs.microsoft.com/ru-ru/dotnet/standard/base-types/regular-expressions
MinSize: minimum file size
MaxSize: maximum file size
-->
<Rules>
<!-- cache any path/file contains "EUREKA" in disk cache-->
<Rule Cache="Disk" Target = "EUREKA" MinSize = "0" MaxSize = "0" />
<!-- small files less than 15000000 bytes will be cached in memory -->
<Rule Cache="Memory" Target = "" MinSize = "0" MaxSize = "15000000" />
<!-- files larger than 15000000 bytes will be cached on disk -->
<Rule Cache="Disk" Target = "" MinSize = "15000000" MaxSize = "0" />
</Rules>
</Deduplicate>
Then run with --use-deduplicate command line key.
Yandex.Disk
(download latest Release, use --protocol YadWebV2 command line key)
Yandex.Disk WebDAV issues
- It seems Yandex.Disk WebDAV is limited by speed now.
- After file uploading Yandex servers calculating hash. E.g. for a 10GB file it may take ~1..2 minutes depending on server load. So most of WebDAV clients drops connection on timeout.
- There's no WebDAV info in official help now. WTF?
This solution allow to bypass that limits using unofficial Yandex.Disk Web API.
Yandex.Disk WebDAV authentication
There are 2 ways to get into Yandex.Disk:
- Use login & password only. The option to use login & password only must be selected in account settings. In this case login (e.g. John or John@yandex.ru) and main account password should be used in authentication fields. Do not use an Application password or any other special password generated by Yandex, the main original account password must be used. And no codes from SMS!
- Use standard browser authentication. Use the YandexAuthBrowser application. In this case you can use any available Yandex authentication including SMS and QR codes. For more details read the YandexAuthBrowser section.
YandexAuthBrowser <br/>
-
Download the package with YandexAuthBrowser.
-
Choose a folder for the program.
- The access to folder must be unrestricted for the program!<br> The program writes into sub-folders, so it must have full unrestricted rights on the folder and sub-folders.<br> C:\, C:\Program Files and so on is not a good choice, the program will not work properly. The better choice is "%userprofile%\AppData\Local\YandexAuthBrowser" folder.
- The folder must be secured from anyone else!<br> The sub-folders contain cookies and other sensitive information for easy access any of your data inside on your Yandex.Disk!<br> Please keep program sub-folders from other's dirty hands!
-
Unpack YandexAuthBrowser into selected secured folder. Run the YandexAuthBrowser.<br> Choose a port number to listen to incoming authentication request on.<br> Set a password or use link to generate GUID as a new password.<br> Also you can test the authentication process using Test button.
-
Open
wdmrc.configand edit<BrowserAuthenticator>tag (add the tag if it's missing).<br> Attributes:<br>Url="http://localhost:<port>/" - address of the PC running YandexAuthBrowser application,portmeans port number you selected on previous step in YandexAuthBrowser application.<br>Password="E86A63FC-9BF0-4351-AD51-A5F806BA38EF" - password or GUID you selected on previous step in YandexAuthBrowser application.<br> TheE86A63FC-9BF0-4351-AD51-A5F806BA38EFis an example of password, use your own please. The privacy of your password prevents intruders from accessing your private data on Yandex.Disk!<br>CacheDir="full path to a secured folder" - full path to a folder with cache files containing browser cookies after authenticated access to your Yandex.Disk. This folder must be placed in restricted location. Only you and your BrowserAuthenticator must have access to the folder! If anyone gets files from the folder he or she may easily take your data on Yandex.Disk! So keep the folder secured! If you do not trust or if you do not want to keep cache, keepCacheDirattribute empty. Also you may delete any sub-folder but 'runtimes' in the BrowserAuthenticator application's folder. If you trust you PC enough, you can use a folder like "%userprofile%\AppData\Local\YandexAuthBrowser" for the cache. Replace the %userprofile% with actual path. -
When you connect to a webdav:
- Fill the
loginfield with short (John) or full (John@yandex.ru) name of the account.<br> - Leave the
passwordfield empty (or put one or more spaces in case your program disallows empty passwords).<br> Ifpasswordis empty or space(s) only thePasswordfrom<BrowserAuthenticator>tag is used to authenticate the request to the BrowserAuthenticator program. If passwords are not matched the BrowserAuthenticator rejects the request.<br> - Fill the
passwordfield withPasswordtaken from BrowserAuthenticator application.<br> In this case thePasswordfrom<BrowserAuthenticator>tag is not used. Also you may removePasswordattribute in<BrowserAuthenticator>tag.
- Press Win+R and run
shell:startup. Put shortcut of the BrowserAuthenticator program in startup folder, so the BrowserAuthenticator program will be started everytime you login the Windows. The program stays in system tray until you reboot or manually exit it using menu on tray icon.
How to use encryption
Using XTS AES-256 on-the-fly encryption/decryption
-
Set (en/de)cryption password
- with
>>crypt passwdspecial command <br/> or - Add
#and separator string to your login:login@mail.ru#_SEP_ - After your mail.ru password add separator string and password for encrypting:
MyLoginPassword_SEP_MyCryptingPassword
- with
-
Mark folder as encrypted using
>>crypt initcommand -
After that files uploaded to this folder will be encrypted
Commands <br/> Commands executed by making dire
