Skip to content

Add iCloud GCBD (China Mainland) Option in iCloud Drive backend #8257

Closed

Description

@BingoKingo
          > Hi, I got these when using a Apple ID (cn) 

NOTICE: Fatal error: HTTP error 302 (302 Found) returned body: "{\"domainToUse\":\"iCloud.com.cn\"}"

CRITICAL: Failed to create file system for "iCloud:": missing icloud trust token: try refreshing it with "rclone config reconnect iCloud:"

Any progress?

china right? not supported right now (china uses a different server)

could you create an issue for this? will add it soon

Originally posted by @lostb1t in #7717 (comment)

Activity

  1. wcumsjy commented on Feb 15, 2025

    @wcumsjy

    Same problem when using the v1.69.1 version, try to update the url by adding ".cn" in each url in the file with "https://github.com/rclone/rclone/blob/master/backend/iclouddrive/api/client.go",
    '''
    const (
    baseEndpoint = "https://www.icloud.com"
    homeEndpoint = "https://www.icloud.com"
    setupEndpoint = "https://setup.icloud.com/setup/ws/1"
    authEndpoint = "https://idmsa.apple.com/appleauth/auth"
    )
    ''',
    However, the go build command didn't go well, as it needs to download massive package from internet, and my connection is unstable. Can someone could fix it. Thank you very much

  2. ncw commented on Feb 15, 2025

    @ncw
    Member

    @wcumsjy I updated all the urls to .cn ones. I don't know if it will work - please report back!

    v1.70.0-beta.8597.7f715befb.fix-8257-iclouddrive-cn on branch fix-8257-iclouddrive-cn (uploaded in 15-30 mins)

  3. wcumsjy commented on Feb 15, 2025

    @wcumsjy

    @ncw Dear Nick, thank you very much for your timely feedback and for quickly compiling the new version. However, I regret to inform you that my computer has an x86 architecture and cannot execute the arm64 version. I was wondering if you have an x86 version available? If so, I can try testing it immediately.
    “rclone v1.69.1

    • os/version: ubuntu 22.04 (64 bit)
    • os/kernel: 6.8.0-53-generic (x86_64)
    • os/type: linux
    • os/arch: amd64
    • go/version: go1.24.0
    • go/linking: static
    • go/tags: none
      ”
  4. wcumsjy commented on Feb 15, 2025

    @wcumsjy

    @ncw Dear Nick, I confirmed that I can connect and mount the iCloud to my Unbuntu through this version with my China iCloud account! BIG THANKS TO YOU!!!

    "~$ rclone version
    rclone v1.70.0-beta.8597.7f715befb.fix-8257-iclouddrive-cn

    • os/version: ubuntu 22.04 (64 bit)
    • os/kernel: 6.8.0-53-generic (x86_64)
    • os/type: linux
    • os/arch: 386
    • go/version: go1.24.0
    • go/linking: static
    • go/tags: none
      "
  5. BingoKingo commented on Feb 16, 2025

    @BingoKingo
    Author

    failed with 1 errors and: corrupted on transfer: sizes differ src() 10679453 vs dst(Local file system at /Users/admin/Downloads) 10501687
    rclone was able to list the file but got the wrong file size.

  6. ncw commented on Feb 16, 2025

    @ncw
    Member

    We probably need @lostb1t to do this properly, but I thought it would be interesting to do an experiment to see if changing the URLs was enough or not.

    @BingoKingo what kind of file was that? Do any fillers transfer ok?

  7. BingoKingo commented on Feb 16, 2025

    @BingoKingo
    Author

    rclone works fine with most files. This issue can be closed.

    It's a new problem with iWork files generated or modified by iWork Web and it can be reproduced on iCloud backend. Just create any file through iWork Web, and then download it using rclone.

  8. ncw commented on Feb 17, 2025

    @ncw
    Member

    @BingoKingo

    rclone works fine with most files. This issue can be closed.

    Is that with the patched rclone with the .cn domain names I linked above?

    It's a new problem with iWork files generated or modified by iWork Web and it can be reproduced on iCloud backend. Just create any file through iWork Web, and then download it using rclone.

  9. BingoKingo commented on Feb 18, 2025

    @BingoKingo
    Author

    Yes, .cn domain patch works well.

  10. ncw commented on Feb 19, 2025

    @ncw
    Member

    Great. I'll re-open this as we need to merge the fix (and likely do it a bit better!)

  11. reopened this on Feb 19, 2025
  12. 8 remaining items

  13. added a commit that references this issue on Sep 12, 2025
    8914863
  14. added a commit that references this issue on Jun 27, 2026
    f56bd5b
  15. added a commit that references this issue on Oct 23, 2026
    490c398
  16. ncw commented on Nov 11, 2026

    @ncw
    Member

    I've merged @zsyeh fix this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.77

  17. added a commit that references this issue on Nov 11, 2026
    571b965
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions