Skip to content

v2.0.5 — Pluggable Cloud Upload (6 adapters + open plugin system)

Latest

Choose a tag to compare

@serenashenn3-art serenashenn3-art released this 01 Aug 19:21
· 24 commits to main since this release

v2.0.5 — Pluggable Cloud Upload (6 adapters + open plugin system)

v2.0.5 — 2026-08-02

Highlights

  • 🧩 Pluggable uploader architectureUploaderBase abstract class with 6 built-in adapters (baidu / aliyun / s3 / webdav / sftp / local); open plugin mechanism for any custom cloud
  • 🌐 S3-compatible out of the box — covers AWS S3, Tencent COS, Qiniu S3 mode, Aliyun OSS-S3, MinIO, Cloudflare R2, self-hosted Ceph — just change endpoint_url
  • 📁 WebDAV / SFTP / Local — 坚果云 / Nextcloud / ownCloud / OneDrive(WebDAV); 自建 SFTP; NAS 挂载 / USB 移动硬盘
  • 🔌 Zero-config plugin discovery — drop a .py file into ~/.config/wechat-forensic/plugins/uploaders/ and it just works (no setuptools entry_points)
  • ⚙️ Flexible configuration — YAML / JSON file, env vars, or inline WECHAT_FORENSIC_UPLOAD_<NAME>_<FIELD>=... patterns
  • 📋 Audit trail enhancementoperations[].upload now includes message, remote, algorithm for judicial review

What's new

Area Change
wechat_forensic/uploader.py Rewritten — UploaderBase + 6 adapters + UploaderRegistry + load_config / get_config_for
wechat_forensic/cli.py --upload-config <path> flag, --upload-list flag, --upload accepts any name; deprecation warnings on old static methods
wechat_forensic/__init__.py Version bump to 2.0.5
pyproject.toml Version 2.0.5; 4 new extras: [s3] / [webdav] / [sftp] / [yaml]; [all] includes all cloud SDKs
examples/uploaders/tencent_cos.py New — complete Tencent COS plugin
examples/uploaders/qiniu.py New — complete Qiniu Kodo plugin
examples/uploaders/README.md New — plugin development guide + config schema
tests/test_uploader.py New — 21 tests covering registry, plugins, config, error handling, CLI
tests/test_cli.py Bumped version assertion 2.0.3 → 2.0.5
README.md New "Cloud Upload" chapter with quickstart + plugin template
AGENTS.md New "可插拔云盘" section + security requirements for plugin authors
CHANGELOG.md v2.0.5 entry with full migration guide

Built-in uploaders (6)

--upload Protocol Required extra Typical providers
baidu bypy CLI [baidu] 百度网盘
aliyun oss2 [aliyun] 阿里云 OSS
s3 boto3 (S3 API) [s3] AWS S3 · 腾讯 COS · 七牛 · MinIO · Cloudflare R2 · 自建 Ceph
webdav webdavclient3 [webdav] 坚果云 · Nextcloud · ownCloud · OneDrive(WebDAV)
sftp paramiko [sftp] 自建 SFTP · 树莓派 NAS
local stdlib only (none) NAS 挂载 · USB 移动硬盘 · 第二块硬盘

Quick start — any S3-compatible cloud

# ~/.config/wechat-forensic/upload.yaml
s3:
  endpoint_url: https://cos.ap-guangzhou.myqcloud.com
  region: ap-guangzhou
  bucket: example-1250000000
  access_key: AKIDxxxxxxxxxxxxxxxxxxxx
  secret_key: xxxxxxxxxxxxxxxxxxxxxxxx
  prefix: wechat_forensic/
wechat-forensic --upload s3 --upload-config ~/.config/wechat-forensic/upload.yaml

Plugin template (10 lines)

from wechat_forensic.uploader import UploaderBase

class MyCloudUploader(UploaderBase):
    name = "my-cloud"
    display_name = "My Company Cloud"
    required_deps = ["my-sdk"]

    def upload(self, file, logger=None, config=None):
        # your logic
        return self._return_success("remote://path", {"extra": "info"})

Save to ~/.config/wechat-forensic/plugins/uploaders/my_cloud.py → done.


Verification

pip install -e ".[all]"
pytest tests/ -q                  # 50 passed (29 → 50, +72%)
wechat-forensic --version         # wechat-forensic 2.0.5
wechat-forensic --upload-list     # show 6 built-in adapters

Compatibility

  • 100% backward compatible — old --upload baidu / aliyun / none still work
  • Uploader.baidu/aliyun static methods preserved, emit DeprecationWarning
  • Recommended migration: Uploader.baidu(f)UploaderRegistry().get("baidu").upload(f)
  • Report JSON schema: operations[].upload gains 3 optional fields (message / remote / algorithm) — readers must handle their absence (default to null)

Legal

  • MIT license (code grant) — unchanged
  • End-use governed by AGENTS.md + local law — unchanged
  • Never use on unauthorized devices.

Full Changelog: https://github.com/serenashenn3-art/wechat-forensic-pro/blob/main/CHANGELOG.md


✨ Generated via GitHub API · 2026-08-02