Skip to main content

cqw

Cloudflare Quick Tunnel wrapper with Basic Auth reverse proxy.

[Client] -> [Cloudflare Tunnel] -> [cqw Proxy (Basic Auth)] -> [Target Service]

Installation

uvx cqw

Or with uv tool:

uv tool install cqw

Usage

# Basic usage: creates tunnel with random credentials
cqw -f localhost:8080
... # QR code with authenticated URL, tunnel URL, credentials

# Custom Basic Auth credentials
cqw -f localhost:8080 --user admin --pass secret

# Direct tunnel to target (bypass proxy and authentication)
# [Cloudflare Tunnel] -> [Target Service]
cqw -f localhost:8080 --no-proxy

CLI Options

Option Description
-f, --forward Target address to forward (required)
--user Basic auth username (default: env CQW_USER or random)
--pass Basic auth password (default: env CQW_PASS or random)
--cloudflared Path to cloudflared binary (default: auto-download to cache)
--update-cloudflared Update cloudflared to latest version
--no-qr Disable QR code display
-v, --verbose Enable verbose logging
--no-proxy Disable proxy and Basic Auth (tunnel only)
--quiet Suppress cloudflared tunnel logs
--cloudflared-extra-args Extra arguments passed to cloudflared (e.g., '--protocol http2')

Environment Variables

  • CQW_USER: Basic auth username (fallback: random)
  • CQW_PASS: Basic auth password (fallback: random)

cloudflared Installation

cloudflared is automatically downloaded to the user cache directory on first run:

  • Linux: ~/.cache/cqw/cloudflared/
  • macOS: ~/Library/Caches/cqw/cloudflared/
  • Windows: %LOCALAPPDATA%\cqw\cloudflared\

To update to the latest version:

cqw -f localhost:8080 --update-cloudflared

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

Development

# Install tools
mise trust && mise install

# Install dependencies:
uv sync

# Install pre-commit hooks:
uv run pre-commit install

# Testing
uv run pytest tests/ -v

# Linting
uv run ruff check src/
uv run ruff format src/
uv run ty check src/ tests/

LICENSE

MIT

Metadata

Release files for cqw 0.1.0

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

Source distribution (sdist)

Source distribution for cqw 0.1.0
File Size Uploaded
cqw-0.1.0.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cqw 0.1.0
File Interpreter ABI Platform
cqw-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.3 kB

Release files / cqw-0.1.0.tar.gz

Download URL cqw-0.1.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
41a165291d64de000d6e1b9e2e4695cdcc681532867726f70806ded02c576faf
BLAKE2b-256 checksum
How to use checksums
584bea631ea11211e86d6151a7306285e0601e27f491bb8fb6020ea026c871d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / cqw-0.1.0-py3-none-any.whl

Download URL cqw-0.1.0-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a36e2aaaf52f8ce86ea6eb3593293ebc627c5e4e46f9a93b638dd79f430a038
BLAKE2b-256 checksum
How to use checksums
17acced00c8810ed3a42ee3505d72127554445f224b9d25f13612292ce88f198
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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