{"id":19883559,"url":"https://github.com/apachecn/cdndrive","last_synced_at":"2025-05-16T08:04:21.835Z","repository":{"id":40333066,"uuid":"248750787","full_name":"apachecn/CDNDrive","owner":"apachecn","description":":cloud: CDNDrive = BiliDrive + SuperBed，支持任意文件的全速上传与下载","archived":false,"fork":false,"pushed_at":"2023-04-22T04:17:10.000Z","size":197,"stargazers_count":811,"open_issues_count":16,"forks_count":104,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-05-16T08:04:14.492Z","etag":null,"topics":["cdn","cloud","drive","netdisk","pan","picbed","storage","yun"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/CDNDrive/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apachecn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-20T12:32:49.000Z","updated_at":"2025-05-14T18:20:12.000Z","dependencies_parsed_at":"2024-11-12T17:22:48.959Z","dependency_job_id":"620beb0e-41a4-4474-9968-f6f12c9c7353","html_url":"https://github.com/apachecn/CDNDrive","commit_stats":{"total_commits":161,"total_committers":6,"mean_commits":"26.833333333333332","dds":0.1863354037267081,"last_synced_commit":"231f8692156524e651f35c2ef664f007bc63429e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apachecn%2FCDNDrive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apachecn%2FCDNDrive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apachecn%2FCDNDrive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apachecn%2FCDNDrive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apachecn","download_url":"https://codeload.github.com/apachecn/CDNDrive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493378,"owners_count":22080126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cdn","cloud","drive","netdisk","pan","picbed","storage","yun"],"created_at":"2024-11-12T17:21:10.376Z","updated_at":"2025-05-16T08:04:16.827Z","avatar_url":"https://github.com/apachecn.png","language":"Python","readme":"\u003ch1 align=\"center\"\u003eCDNDrive = BiliDrive + SuperBed\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003e☁️ 废墟之上，重建辉煌！ ☁️\u003c/h4\u003e\n\u003ch4 align=\"center\"\u003e☁️ 支持任意文件的全速上传与下载 ☁️\u003c/h4\u003e\n\n## 特色\n\n- 轻量：无复杂依赖，资源占用少\n- 自由：无文件格式与大小限制，无容量限制\n- 安全：上传的文件需要通过生成的 META URL 才能访问，他人无法随意查看\n- 稳定：带有分块校验与超时重试机制，在较差的网络环境中依然能确保文件的完整性\n- 快速：支持多线程传输与断点续传，同时借助各个站点的 CDN 资源，能最大化地利用网络环境进行上传与下载\n\n## 使用指南\n\n### 安装\n\n通过`pip`（推荐）：\n\n```\npip install CDNDrive\n```\n\n从源码安装：\n\n```\npip install git+https://github.com/apachecn/CDNDrive\n```\n\n### 登录\n\n```\ncdrive login [-h] site username password\n\nsite: 站点名称（见 -h）\nusername: 用户名\npassword: 密码\n```\n\n\u003e 运行 cdrive 报错\n\n```\n$ cdrive\n-bash: cdrive: command not found\n```\n\n解决方案: https://github.com/apachecn/CDNDrive/issues/7\n\n### 设置 Cookie\n\n```\ncdrive cookies [-h] site cookies\n\nsite: 站点名称（见 -h）\ncookies: Cookie\n```\n\n### 查看登录状态\n\n```\ncdrive userinfo [-h] site\n\nsite: 站点名称（见 -h）\n```\n\n### 上传\n\n```\ncdrive upload [-h] [-b BLOCK_SIZE] [-t THREAD] site file\n\nsite: 站点名称（见 -h）\nfile: 待上传的文件路径\n\n-b BLOCK_SIZE: 分块大小(MB), 默认值为4\n-t THREAD: 上传线程数, 默认值为4\n```\n\n上传完毕后，终端会打印一串 META URL 用于下载或分享，请妥善保管\n\n### 下载\n\n```\ncdrive download [-h] [-f] [-t THREAD] meta [file]\n\nmeta: META URL (通常以 cdrive:// 开头)\nfile: 另存为新的文件名, 不指定则保存为上传时的文件名\n\n-f: 覆盖已有文件\n-t THREAD: 下载线程数, 默认值为8\n```\n\n下载完毕后会自动进行文件完整性校验，对于大文件该过程可能需要较长时间，若不愿等待可直接退出\n\n### 查看文件元数据\n\n```\ncdrive info [-h] meta\n\nmeta: META URL\n```\n\n### 查看历史记录\n\n```\ncdrive history [-h]\n```\n\n### 交互模式\n\n不传入任何命令行参数，直接运行程序即可进入交互模式\n\n该模式下，程序会打印命令提示符`CDNDrive \u003e `，并等待用户输入命令\n\n## 技术实现\n\n将任意文件分块编码为图片后上传至各个站点，对该操作逆序即可下载并还原文件\n\n## 性能指标\n\n### 测试文件\n\n文件名：[Vmoe]Hatsune Miku「Magical Mirai 2017」[BDrip][1920x1080p][HEVC_YUV420p10_60fps_2FLAC_5.1ch\u00262.0ch_Chapter][Effect Subtitles].mkv\n\n大小：14.5 GB (14918.37 MB)\n\n分块：10 MB * 1492\n\nMETA URL：`bdrive://d28784bff1086450a6c331fb322accccd382228e`\n\n### 上传\n\n地理位置：四川成都\n\n运营商：教育网\n\n上行速率：20 Mbps\n\n用时：02:16:39\n\n平均速度：1.82 MB/s\n\n### 下载\n\n### 测试点1\n\n地理位置：福建福州\n\n运营商：中国电信\n\n下行速率：100 Mbps\n\n用时：00:18:15\n\n平均速度：13.62 MB/s\n\n### 测试点2\n\n地理位置：上海\n\n运营商：中国电信\n\n下行速率：1 Gbps\n\n用时：00:02:22\n\n平均速度：104.97 MB/s\n\n## 历史记录\n\n[见这里](history.md)。\n\n## 免责声明\n\n+   请自行对重要文件做好本地备份。\n+   请不要上传含有个人隐私的文件，因为无法删除。\n+   请勿使用本项目上传不符合社会主义核心价值观的文件。\n+   请合理使用本项目，避免对哔哩哔哩的存储与带宽资源造成无意义的浪费。\n+   该项目仅用于学习和技术交流，开发者不承担任何由使用者的行为带来的法律责任。\n\n## 协议\n\n本项目基于 SATA 协议发布。\n\n您有义务为此开源项目点赞，并考虑额外给予作者适当的奖励。\n\n## 致谢\n\n本项目基于 [Hsury](https://github.com/Hsury) 的 [BiliDrive](https://github.com/Hsury/BiliDrive)，在此表示感谢。\n\n同时感谢 [goocarder](https://v2ex.com/t/618064) 提供的思路。\n\n## 赞助我们\n\n![](https://home.apachecn.org/img/qr/zfb_wx.png)\n\n## 另见\n\n+   [ApacheCN 学习资源](https://docs.apachecn.org/)\n+   [计算机电子书](http://it-ebooks.flygon.net)\n+   [布客新知](http://flygon.net/ixinzhi/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapachecn%2Fcdndrive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapachecn%2Fcdndrive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapachecn%2Fcdndrive/lists"}