golinks is a high-performance personal Go-links and dynamic QR code generation service built on Cloudflare Workers.
Important
Public by Design (Security Notice)
This service is architected as an unauthenticated, publicly accessible gateway. Any link configured on link.chebread.org and any QR code generated on qr.chebread.org can be resolved by anyone on the internet.
Never store or route confidential credentials, API keys, passwords, private tokens, Wi-Fi credentials, or sensitive documents through this service. Only register destinations and text intended for public sharing.
- Dual Subdomain Architecture:
link.chebread.org: Instant 302 redirects for vanity slugs (e.g./github,/blog).qr.chebread.org: Dedicated subdomain for instant QR generation directly from path (e.g./github,/hello,/https://...).
- Dynamic QR Code Generation:
- Automatically renders an ASCII/Unicode compact QR code in CLI terminals.
- Automatically delivers an optimized, scalable vector SVG download in web browsers.
- Intelligent Routing: Supports vanity slugs (
/github), full URLs (/https://...), and arbitrary text (/hello). - Safe Query Fallback: Use
?url=or?text=to encode complex strings without path-mangling or URL-encoding conflicts. - Terminal Theme Awareness: Support for dark and light terminal backgrounds (
?light/?invert). - Standard-Compliant Content-Disposition: Full RFC 6266 and RFC 5987 (
filename*=UTF-8''...) support with strict ByteString sanitization for multi-byte Unicode/Korean filenames. - Pure JavaScript & Zero Native Overhead: Powered by
uqr, executing within Cloudflare Workers V8 isolates with sub-millisecond execution and zero external network calls.
| Subdomain | Purpose | Path Example | Result |
|---|---|---|---|
qr.chebread.org |
Instant QR Code Generation | https://qr.chebread.org/github |
Renders/downloads QR code for https://github.com/chebread |
https://qr.chebread.org/hello |
Renders/downloads QR code for text "hello" |
||
https://qr.chebread.org/https://example.com |
Renders/downloads QR code for URL "https://example.com" |
||
https://qr.chebread.org/?url=... |
Renders/downloads QR code from query parameter | ||
link.chebread.org |
Go-Links (URL Redirection) | https://link.chebread.org/github |
302 Redirect to https://github.com/chebread |
https://link.chebread.org/ |
302 Redirect to https://chebread.org |
Add your custom slug and target URL in src/redirects.ts:
export const redirects: Record<string, string> = {
github: "https://github.com/chebread",
blog: "https://chebread.org",
email: "mailto:che@chebread.org",
sponsor: "https://github.com/sponsors/chebread",
geeknews: "https://news.hada.io/@chebread",
velog: "https://velog.io/@haneum",
stackoverflow: "https://stackoverflow.com/users/16726480/chebread",
orcid: "https://orcid.org/0009-0003-8673-5891",
};https://link.chebread.org/<slug>: 302 redirects to the destination URL.- Paths are case-insensitive and trim slashes (e.g.
/GITHUB/->https://github.com/chebread). - Unmatched slugs or root
/redirect tohttps://chebread.org.
| Format | Example | Description |
|---|---|---|
/<slug> |
https://qr.chebread.org/github |
Encodes destination URL mapped in redirects.ts. |
/<url> |
https://qr.chebread.org/https://chebread.org |
Encodes the specified target URL directly. |
/<text> |
https://qr.chebread.org/hello-world |
Encodes arbitrary text or payloads. |
/?url=<target> |
https://qr.chebread.org/?url=https://example.com?foo=1 |
Safe query parameter for complex URLs. |
/?text=<raw> |
https://qr.chebread.org/?text=github |
Explicit raw text parameter (skips slug redirect lookup). |
| Parameter | Values | Description |
|---|---|---|
url |
URL string | Target URL to encode into the QR code (recommended for URLs with query strings). |
text (or target, q) |
string | Text payload to encode into the QR code. |
format (or type) |
svg, image |
Force output format to vector SVG (overrides terminal auto-detection). |
format (or type) |
terminal, ascii, text |
Force output format to terminal Unicode half-blocks. |
light, invert, theme=light |
flag / light |
Inverts black/white block modules for terminals with white/light backgrounds. |
When requested via curl, wget, httpie, xh, or powershell (or with Accept: text/plain), the worker outputs a 2-in-1 Unicode half-block QR code directly into stdout.
# Saved redirect slug
curl -sL https://qr.chebread.org/github
# Arbitrary text
curl -sL https://qr.chebread.org/hello-world
# Arbitrary URL
curl -sL https://qr.chebread.org/https://chebread.orgcurl -sL "https://qr.chebread.org/github?light"
# or
curl -sL "https://qr.chebread.org/github?invert"curl -sL "https://qr.chebread.org/?url=https://example.com/search?q=cloudflare&lang=en"
curl -sL "https://qr.chebread.org/?text=WIFI:S:MyNetwork;T:WPA;P:SecretPassword;;"curl -sL "https://qr.chebread.org/github?format=svg" -o qr-github.svg
# or using Accept header
curl -sL -H "Accept: image/svg+xml" https://qr.chebread.org/github -o qr-github.svgWhen visited from a standard web browser (Chrome, Safari, Firefox), the service returns an optimized SVG file served as a download attachment:
- Instant Download via
qr.chebread.org:https://qr.chebread.org/githubtriggers download ofqr-github.svg.https://qr.chebread.org/hellotriggers download ofqr-hello.svg.
- Clean File Naming:
/githubtriggers download ofqr-github.svg. - Sanitized Filenames: Paths and unsafe characters are stripped into safe tokens (e.g.
/https://example.combecomesqr-https_example.com.svg). - Unicode Support (RFC 5987): Multi-byte languages (such as Korean) download with their original name preserved via
filename*=UTF-8''...(e.g./안녕하세요->qr-안녕하세요.svg).
pnpm dev
# or: cf devpnpm run typecheckRuns worker bundle integration tests (verifies redirects, Unicode QR rendering, SVG output, and security edge cases via node:test and jsqr):
pnpm testpnpm run deploy
# or: cf deployIn Cloudflare DNS for your zone (chebread.org), configure CNAME records for both subdomains:
link.chebread.org-> Workerqr.chebread.org-> Worker
This project is licensed under the Hippocratic License 3.0 (HL3.0).