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

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

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.2.7

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.2.7
File Size Uploaded Provenance Actions
qshare-0.2.7.tar.gz 8.3 kB Without provenance Details for qshare-0.2.7.tar.gz

Built distributions (wheels)

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

Total release size: 168.0 MB

Release files / qshare-0.2.7.tar.gz

Download URL qshare-0.2.7.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
406ee0e98fe728d2a8043afb43279734a6a8add898493570d165d55b335b540e
BLAKE2b-256 checksum
How to use checksums
203af2edd6bbdede1374d2aa09b8cd6929279271285b851ec71c81eb966ed740
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

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

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

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

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

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

Download URL qshare-0.2.7-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
7f520d248a3b90854547c920e4f477980ecebf8915bd9db8058eaadada7ad5cf
BLAKE2b-256 checksum
How to use checksums
ba98516deb6720f8660fa4adda8647d0c5a61fa5336d1bd2e8430a1bb7988e2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

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

Download URL qshare-0.2.7-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
5168a154731681ad1dab4bb3af65edfe0fe4e4d5bab12c1f8ebbc7b98f8d85ab
BLAKE2b-256 checksum
How to use checksums
c80f7b00f071834005033bcf466d0a305bd0eed8c0b82fb2ef6115fcfcce83bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

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

Download URL qshare-0.2.7-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
79b3d60e10b4f52fadba3a0c5f252f7edd90d2217a48cd6fe25c2d1052fb0f82
BLAKE2b-256 checksum
How to use checksums
7429e609375e270cc5ad6828acf5c39ad1a72e89830c37fb8eae4ad45abc21d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

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

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

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

Download URL qshare-0.2.7-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
e4456438a0ee09aec0c3ea0d7599f362cc6c77d98f9430b40111af79b55f1ac4
BLAKE2b-256 checksum
How to use checksums
8cb19578ce5be5063bbb8c9fe430d384a6944f70c007bf359bddf8729630dedd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

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

Download URL qshare-0.2.7-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
1fb9c2784c4caafd1e21db4adcfceb85aa827cd054a2ea098fd115bbea99563c
BLAKE2b-256 checksum
How to use checksums
2ccdec5d9ad4545d99338bfb91b43f1e4456fa29ad1edc0343a44e2c7aa06e90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

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

Download URL qshare-0.2.7-py3-none-linux_armv6l.whl
Size 17.7 MB
Tags Python 3 linux armv6l
SHA-256 checksum
How to use checksums
dc5d63f0f2bd58748b67149e5976fca1b1b98fa161cd28e0a35173ddcaa88701
BLAKE2b-256 checksum
How to use checksums
20ac8ef6f1fb280aa029866be1baa8e3a1a7fd3e3017b90f6386e681ecfc019b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for qshare 0.2.7

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