Skip to main content

qshare

无需登录账号,一行命令即可把本地文件临时分享至公网。文件由本机 HTTP 服务提供,并通过临时 TryCloudflare 隧道传输,不会上传到 qshare 服务器留存。

特点

  • 无需注册或登录账号
  • 一行命令快速分享本地文件
  • 文件不在 qshare 服务器保存
  • 默认有效期 2 小时,可通过 --ttl 调整
  • 结果链接醒目显示,并提供终端二维码
  • 支持 Linux、Windows 和 macOS
  • PyPI 平台 wheel 内置对应的官方 cloudflared 二进制
  • 运行时不从 GitHub 下载二进制,适合网络受限环境

启动后会提示:私密文件请先加密,再进行中转分享。公网链接本身没有访问控制,请勿直接分享未加密的敏感文件。

安装

python -m pip install -U qshare

pip 会根据操作系统和架构选择对应 wheel,每个 wheel 只包含自身平台的二进制。

如果不信任 PyPI wheel 中的二进制,可以从 Cloudflare 官方发布页下载匹配版本,按官方校验和验证后放入 PATH:

https://github.com/cloudflare/cloudflared/releases

qshare 会优先使用 PATH 中已有的 cloudflared。没有匹配平台 wheel 时,也可以手动安装 cloudflared 后使用。

使用

qshare /path/to/file.zip
qshare /path/to/file.zip --ttl 2h
qshare /path/to/file.zip --ttl 900
qshare /path/to/file.zip --port 8000 --cf

成功后会显示醒目的公网文件链接及二维码。程序只接受真实的 *.trycloudflare.com 分享域名,会拒绝 api.trycloudflare.com 并自动重试。Unix-like 系统可在提示处输入 d 后台运行;Windows 始终前台运行。前台运行达到 TTL 后会提示并停止分享。

默认使用 CNB 方式上传文件到 CNB Release 并返回下载地址;文件会存储在 CNB,请先加密私密文件。上传过程中会显示进度。上传完成后程序会询问是否立即删除 CNB 上的该文件,默认删除(直接回车即删除,输入 n 保留)。本地文件不会被删除。

CNB 渠道适合需要持久下载地址或 Cloudflare 不稳定的场景。上传完成后可直接使用 CNB 下载链接;如果选择保留,CNB Release 中的文件需要自行管理。

加 --cf 改用 TryCloudflare 隧道分享:文件由本机提供,不依赖 CNB 存储,默认有效期 2 小时。

Windows 下 CMD 终端也会显示二维码,与其他平台一致;若 CNB 文件选择保留,最后会询问是否在浏览器中打开二维码页面(默认打开)。若已删除 CNB 上的文件,则不再询问(链接已失效)。浏览器页面在二维码上方显示下载链接,并支持一键复制。

DNS 排查

如果打开链接时提示找不到 IP,通常是本地 DNS 解析或网络限制。可以尝试使用 Cloudflare DNS 1.1.1.1、1.0.0.1,或 Google DNS 8.8.8.8、8.8.4.4,然后刷新本地 DNS 缓存并重试。1.1.1.1 可能改善解析,但无法解决隧道过期或网络屏蔽 Cloudflare 的问题。

开发与发布

uv venv
source .venv/bin/activate
uv pip install -e .
PYTHONPATH=src pytest -q

使用本地准备好的 Cloudflare 二进制构建平台 wheel:

uv build
python scripts/build_platform_wheels.py --assets-dir /path/to/cloudflared-assets

说明

  • 默认有效期为 2 小时。
  • 端口被占用时会自动选择其他空闲端口。
  • --ttl 支持 30m、90s、2h 或秒数。

Metadata

Release files for qshare 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qshare 0.4.2
File Size Uploaded Provenance Actions
qshare-0.4.2.tar.gz 21.5 kB Without provenance Details for qshare-0.4.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for qshare 0.4.2
File Actions
qshare-0.4.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for qshare-0.4.2-py3-none-win_amd64.whl
qshare-0.4.2-py3-none-win32.whl Python 3 none Windows x86-32 Details for qshare-0.4.2-py3-none-win32.whl
qshare-0.4.2-py3-none-manylinux_2_17_armv7l.whl Python 3 none Linux glibc 2.17+ ARMv7l Details for qshare-0.4.2-py3-none-manylinux_2_17_armv7l.whl
qshare-0.4.2-py3-none-manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for qshare-0.4.2-py3-none-manylinux2014_x86_64.whl
qshare-0.4.2-py3-none-manylinux2014_i686.whl Python 3 none Linux glibc 2.17+ x86-32 Details for qshare-0.4.2-py3-none-manylinux2014_i686.whl
qshare-0.4.2-py3-none-manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for qshare-0.4.2-py3-none-manylinux2014_aarch64.whl
qshare-0.4.2-py3-none-manylinux1_x86_64.whl Python 3 none Linux glibc 2.5+ x86-64 Details for qshare-0.4.2-py3-none-manylinux1_x86_64.whl
qshare-0.4.2-py3-none-manylinux1_i686.whl Python 3 none Linux glibc 2.5+ x86-32 Details for qshare-0.4.2-py3-none-manylinux1_i686.whl
qshare-0.4.2-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for qshare-0.4.2-py3-none-macosx_11_0_arm64.whl
qshare-0.4.2-py3-none-macosx_10_13_x86_64.whl Python 3 none macOS 10.13+ x86-64 Details for qshare-0.4.2-py3-none-macosx_10_13_x86_64.whl
qshare-0.4.2-py3-none-linux_armv6l.whl Python 3 none linux armv6l Details for qshare-0.4.2-py3-none-linux_armv6l.whl
qshare-0.4.2-py3-none-any.whl Python 3 none any Details for qshare-0.4.2-py3-none-any.whl

Total release size: 205.7 MB

Release files / qshare-0.4.2.tar.gz

Download URL qshare-0.4.2.tar.gz
Size 21.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c426dc9cf3f05efc17cf355e56006388a940fc469da0e8e544bf332c9e063c67
BLAKE2b-256 checksum
How to use checksums
19b7e0b0d7dd74324364c9088553314faf5b6fdda87a9e98d8d9c2ad636e649a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.2-py3-none-win_amd64.whl

Download URL qshare-0.4.2-py3-none-win_amd64.whl
Size 18.4 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
6979a32064ae6ac2d7b345675f84d203630a68c4d235802cc9620b03ad993bf5
BLAKE2b-256 checksum
How to use checksums
c9d161d5f48ffa6d7719a276e8cfbf3b68b1af932b590443041774a42dbb930a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.2-py3-none-win32.whl

Download URL qshare-0.4.2-py3-none-win32.whl
Size 18.5 MB
Tags Python 3 Windows x86-32
SHA-256 checksum
How to use checksums
f84050b5bfa0b945e5a6c5ace25a822a6a4d3ff172badd4ec726d1934b98f903
BLAKE2b-256 checksum
How to use checksums
221647e554f641038626a953eeac4f87b33567360c1b5d51a27b2131068165cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.2-py3-none-manylinux_2_17_armv7l.whl

Download URL qshare-0.4.2-py3-none-manylinux_2_17_armv7l.whl
Size 17.7 MB
Tags Linux glibc 2.17+ ARMv7l Python 3
SHA-256 checksum
How to use checksums
05cdef1449875abdf5f176e41d455d5aa80bd81f697a9783a6e4965afb98e486
BLAKE2b-256 checksum
How to use checksums
89c8122af2bbe058935f349814392dd4010095d77b33e941d37ae8f2b7e52bbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.2-py3-none-manylinux2014_x86_64.whl

Download URL qshare-0.4.2-py3-none-manylinux2014_x86_64.whl
Size 19.2 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c3d9a212548f950ae6319b5d3de47012e71f11934cbee2322b3f90fe9ed21ff5
BLAKE2b-256 checksum
How to use checksums
bb172b7b30004f20f8ded66d844a781004a9e3d1fe0da4b533aa465b0ad9f43d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.2-py3-none-manylinux2014_i686.whl

Download URL qshare-0.4.2-py3-none-manylinux2014_i686.whl
Size 18.4 MB
Tags Linux glibc 2.17+ x86-32 Python 3
SHA-256 checksum
How to use checksums
87f1e6b9a8d596c2fd2fe86561cfbdd604d4d0081934932999782d32e1b7b920
BLAKE2b-256 checksum
How to use checksums
2f5a7110afac6d5f0e727aa0d3a71fccf21f46b4a732f3525c85d660a8f4e537
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.2-py3-none-manylinux2014_aarch64.whl

Download URL qshare-0.4.2-py3-none-manylinux2014_aarch64.whl
Size 17.7 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
5a21ba7730bf713883ae30c913c4c05f086f86155b28f4c90de78a71802a262d
BLAKE2b-256 checksum
How to use checksums
2a8293f2c4a885e7a94bc416df4be7aad8fcf7555881cbbb178b37fb82f5ff0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.2-py3-none-manylinux1_x86_64.whl

Download URL qshare-0.4.2-py3-none-manylinux1_x86_64.whl
Size 19.2 MB
Tags Linux glibc 2.5+ x86-64 Python 3
SHA-256 checksum
How to use checksums
7700fb26eee6e4eba3442e7c6348d02ecc095f2e1d302dec4944170668d2dd64
BLAKE2b-256 checksum
How to use checksums
e159675e9eaa37e1730d19109db795c19c95940bb2fb3e40f7300d2473bfc1a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.2-py3-none-manylinux1_i686.whl

Download URL qshare-0.4.2-py3-none-manylinux1_i686.whl
Size 18.4 MB
Tags Linux glibc 2.5+ x86-32 Python 3
SHA-256 checksum
How to use checksums
1e0afb6a8761c2ed14401641bb218b9b25edd7d97c2369e3ed23ed1b4daf7df6
BLAKE2b-256 checksum
How to use checksums
b2c3b55dc438931573ed790411166cdced8d6dcd2ebac4e24cb28cd800635e22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.2-py3-none-macosx_11_0_arm64.whl

Download URL qshare-0.4.2-py3-none-macosx_11_0_arm64.whl
Size 19.2 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
eb5bd1b1d339126c490bf7eecb2fb726c82b465cdceed999d8607fa4159fc724
BLAKE2b-256 checksum
How to use checksums
66277a27322451b0563f3a724d80a64a4c1073ca868aa07df24c3064f450035f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.2-py3-none-macosx_10_13_x86_64.whl

Download URL qshare-0.4.2-py3-none-macosx_10_13_x86_64.whl
Size 21.1 MB
Tags Python 3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
47d5a52d5fbe220414f00a7511f324533ab2493bb5d683229bb7bf00c0dfaf0a
BLAKE2b-256 checksum
How to use checksums
0583ca810541d530cf6f48ad1d17dd66a8926d1db56f75098c93a8b077935f8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.2-py3-none-linux_armv6l.whl

Download URL qshare-0.4.2-py3-none-linux_armv6l.whl
Size 17.7 MB
Tags Python 3 linux armv6l
SHA-256 checksum
How to use checksums
2e7e64d3734dda7ca9d6f84c66a40405131049cfd425c5739086557916c6a1e0
BLAKE2b-256 checksum
How to use checksums
10592ebe87bcfaf03475422ab307ba5a64ae6ea1fbdc157cc3886b1f726010d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.2-py3-none-any.whl

Download URL qshare-0.4.2-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6616920b44f12b7ae41b0e4b395b6dc4f14072fdf90cb3526ff07af51274fcdf
BLAKE2b-256 checksum
How to use checksums
b287fc3ff693ca5ac764a5ea549dcf9df492ed7c0e65e4cbc7ada28e14582a3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Security for qshare 0.4.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page