Cloudflare Quick Tunnel wrapper with Basic Auth reverse proxy
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cqw-0.1.0.tar.gz.
File metadata
- Download URL: cqw-0.1.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41a165291d64de000d6e1b9e2e4695cdcc681532867726f70806ded02c576faf
|
|
| MD5 |
e8e6d3228b1817b64785868fa2583669
|
|
| BLAKE2b-256 |
584bea631ea11211e86d6151a7306285e0601e27f491bb8fb6020ea026c871d9
|
File details
Details for the file cqw-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cqw-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a36e2aaaf52f8ce86ea6eb3593293ebc627c5e4e46f9a93b638dd79f430a038
|
|
| MD5 |
72fbfca3bdfd8b4f8b546ea37d71c889
|
|
| BLAKE2b-256 |
17acced00c8810ed3a42ee3505d72127554445f224b9d25f13612292ce88f198
|