@ZZZConsulting:
Дополнительно сделан вход на Яндекс.Диск с помощью браузера.
Поддерживается всё разнообразие вариантов аутентификации, включая СМС-коды и QR-коды.
Версия .NET обновлена до 7.0, включая поддержку установки сервисом Windows.

-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.
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.
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.
(download latest Release, use --protocol YadWebV2 command line key)
Yandex.Disk WebDAV issues
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:
YandexAuthBrowser
Download the package with YandexAuthBrowser.
Unpack YandexAuthBrowser into selected secured folder.
Run the YandexAuthBrowser.
Choose a port number to listen to incoming authentication request on.
Set a password or use link to generate GUID as a new password.
Also you can test the authentication process using Test button.
Open wdmrc.config and edit <BrowserAuthenticator> tag
(add the tag if it’s missing).
Attributes:
Url=”http://localhost:<port>/” - address of the PC running YandexAuthBrowser application,
port means port number you selected on previous step in YandexAuthBrowser application.
Password=”E86A63FC-9BF0-4351-AD51-A5F806BA38EF” - password or GUID
you selected on previous step in YandexAuthBrowser application.
The E86A63FC-9BF0-4351-AD51-A5F806BA38EF is an example of password, use your own please.
The privacy of your password prevents intruders from accessing your private data on Yandex.Disk!
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, keep CacheDir attribute 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.
login field with short (John) or full (John@yandex.ru) name of the account.password field empty (or put one or more spaces in case your program disallows empty passwords).password is empty or space(s) only the Password from <BrowserAuthenticator> tag is used
to authenticate the request to the BrowserAuthenticator program.
If passwords are not matched the BrowserAuthenticator rejects the request.password field with Password taken from BrowserAuthenticator application.Password from <BrowserAuthenticator> tag is not used.
Also you may remove Password attribute in <BrowserAuthenticator> tag.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
>>crypt passwd special command # and separator string to your login: login@mail.ru#_SEP_MyLoginPassword_SEP_MyCryptingPassword>>crypt init commandCommands
Commands executed by making directory with special name.
Parameters with spaces must be screened by quotes.
>>join SHARED_FOLDER_LINK Clone shared cloud.mail.ru file/folder to your account>>join #filehash filesize [/][path]filename Clone cloud.mail.ru file to your account by known hash and size>>link SHARED_FOLDER_LINK [linkname] Link shared folder without wasting your space (or manually edit file /item.links.wdmrc)>>link check Remove all dead links (may take time if there’s a lot of links)>>move /full/path/from /full/path/to Fast move (if your client moves inner items recursively)>>copy /full/path/from /full/path/to Fast copy (if your client copies inner items recursively)>>lcopy x:/local/path/from /full/server/path/to If file already in cloud, add it by hash without uploading>>rlist [[/]path] [list_filename] list [path] to [list_filename]>>del [[/]path] Fast delete (if your client makes recursive deletions of inner items)>>share [[/]path] Make file/folder public .share.wdmrc file with links>>sharev [[/]path] [resolution] Make media file public resolution = 0p (all), 240p, 360p, 480p, 720p, 1080p.share.wdmrc file with public and direct play links>>pl [[/]path] [resolution] Make media file public resolution = 0p (all), 240p, 360p, 480p, 720p, 1080p.share.wdmrc file with public and direct play links .m3u8 playlist file>>crypt init Mark current folder as encrypted>>crypt passwd password_for_encryption_decryption Set password for encryption/decryptionSettings in wdmrc.exe.config
<config><log4net> protocol and port properties taken from command-line parameters.<config><DefaultSharedVideoResolution> 0p auto, m3u contains links to all available resolutions
240p ~ 352 x 240
360p ~ 480 x 360
480p ~ 858 x 480
720p ~ 1280 x 720
1080p ~ 1920 x 1080<config><DefaultUserAgent> <config><AdditionalSpecialCommandPrefix> >>. Make possible to use special commands if client doesn’t allow >>.<config><WebDAVProps> false on properties you don’t need to speedup listing on large catalogs / slow connections.<TwoFactorAuthHandler Name = "AuthCodeConsole"/> - asks for authcode in application console<TwoFactorAuthHandler Name = "AuthCodeWindow"/> - asks for authcode in GUI window (only for .NET Framework releases) <TwoFactorAuthHandler Name = "AuthCodeFile">
<Param Name = "Directory" Value = "d:"/>
<Param Name = "FilenamePrefix" Value = "wdmrc_2FA_"/>
</TwoFactorAuthHandler>
user must write authcode to file. For example, user test@mail.ru writes code to d:\wdmrc_2FA_test@mail.ru.
Be careful, this methods does not usable when application started as a service/daemon.
You can make your own 2FA handlers inherited from ITwoFaHandler and put it in separate dll which name starts with MailRuCloudApi.TwoFA
Connect with (almost any) file manager that supports WebDAV using Basic authentication with no encryption and
anonymous login if only public links list/download required (WinSCP script example)Automatically split/join when uploading/downloading files larger than cloud allows.
Russian FAQ
geektimes.ru - Снова про WebDAV и Облако Mail.Ru
glashkoff.com - Как бесплатно подключить Облако Mail.Ru через WebDAV
manjaro.ru - Облако Mail.Ru подключаем через эмулятор WebDav как сетевой диск
Using as windows service
cmd with Administrator rightswdmrc.exe --install wdmrc -p 801 --maxthreads 15 net start wdmrc(tested under Elementary OS and Lubuntu)
sudo apt install apt mono-completemono wdmrc.exe -p <port>dotnet wdmrc.dll <params>See also
Mount with davfs2
mkdir /mnt/<folder>/etc/davfs2/davfs2.conf set use_locks 0sudo mount --rw -t davfs http://<address>:<port> /mnt/<folder>/ -o uid=<current_linux_user>As a service (daemon)
CERTIFICATE_VERIFY_FAILED exception Issue 56 default installation of Mono doesn’t trust anyone
In short:
# cat /etc/ssl/certs/* >ca-bundle.crt
# cert-sync ca-bundle.crt
# rm ca-bundle.crt
brew install mono (how to install brew)mono wdmrc.exe -p <port>dotnet wdmrc.dll <params>Use any client supports webdav.
WebDAV plugin to v.2.9(connection properties) -> Send\Receive accents in URLs as UTF-8 Unicode(disk properties) -> HTTP Settings -> Do chunked upload for large files.(connection properties) -> Advanced -> Don't update property.