Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yandex Disk speed cap fixes #7659

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Evengard
Copy link

@Evengard Evengard commented Mar 4, 2024

What is the purpose of this change?

  1. It fixes the speed cap of Yandex.Disk
  2. It allows for a device-type authorization flow (used when no browser available)

Now, this was an "exploratory PR", because I was initially having the wrong assumption about from where the speed cap actually comes from, hence why I implemented the device-type authorization flow first. I still kept it, as it should help people on systems without browsers to authenticate more easily...

It looks like the method how Yandex.Disk is actually limiting the speed is... The User-Agent. Yep, simple as that. When I sniffed the actual used UserAgent and tried to use it, miraculously, the speed limit was gone. So here we are, I just copied it from the official latest client, adjusted a bit and it Just Works ©. I still made sure that it is still possible to override it.

Was the change discussed in an issue or in the forum before?

This is a widely known problem. Found a thread here: https://forum.rclone.org/t/slow-upload-speed-yandex-disk/31943

Checklist

  • I have read the contribution guidelines.
  • I have added tests for all changes in this PR if appropriate.
  • I have added documentation for the changes if appropriate.
  • All commit messages are in house style.
  • I'm done, this Pull Request is ready for review :-)

oauthutil: allows for a device-type authorization flow (used when no browser available)
@Evengard
Copy link
Author

Evengard commented Mar 4, 2024

@devnoname120 You might be interested

@Evengard
Copy link
Author

Anyone?... @ncw ?

@ncw
Copy link
Member

ncw commented Apr 2, 2024

@Evengard sorry for the delay reviewing.

Do you think you could split this into two PRs? One for the speed improving user agent and one for the device-type authorization.

They both look useful. The User Agent changes will be easy to merge, but I think the oauth stuff will require some thought (eg will with work with other backends, is it part of the standard, how can we stop it reading from stdin as part of the config flow etc).

@Evengard
Copy link
Author

Evengard commented Apr 2, 2024

Man, I thought the policy "split your PRs" would be kept at the workplace 😁
Yeah, I can try to split them during the weekends, sorry about that, was exploring stuff. Do you want this one to be closed and open two new ones?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants