Spaces:
Paused
Paused
Commit History
-
bump version to 0.4.1
Peng Dingb652289 -
chore: bump vendored readability 0.2.0→0.2.1 (flat sibling import fix)
Peng Dingadeb1d5
-
fix: readability sibling import — add same-dir to sys.path for flat vendor layout (#29)
Peng Ding6fc1eee -
fix: re-vendor readability module to fix soup sibling import (#29)
Peng DingThe vendored readability module used `from soup import Soup` with a sibling path that assumed nested layout (soup/soup.py). In flat vendor layout (_vendor/soup.py), this failed silently — readability always returned null. Re-vendored via zerodep CLI which generates correct flat imports.f802979 -
bump version to 0.4.0
Peng Ding4a272fd -
chore: remove 8 unused vendor modules (368K → 184K)
Peng DingRemove config, dotenv, yaml, jsonx, markdown, structlog, useragent, retry — none are imported by project code. Remaining: httpserver, cache, s3, readability, soup.08c34fe -
refactor: replace minio with vendored zerodep S3Client
Peng Ding- Remove minio from dependencies (was the last external dep besides patchright) - Vendor zerodep s3 module (S3Client, zero-dependency, stdlib only) - storage.py: Minio → S3Client, API is compatible - pyproject.toml: only patchright remains as runtime dependencya6d9249
-
fix: address review — CDP proxy routing, worker_type, TLS support
Peng Ding- CDP proxy auto-assign now filters to cdp-type workers only, preventing routing to PlaywrightWorker which returns None for get_cdp_url() - Add worker_type field to _BaseWorker ("cdp"/"playwright"), exposed in worker_stats() for dashboard/metrics differentiation - Support playwrights:// prefix for TLS Playwright endpoints (→ wss://)009229c -
feat: add PlaywrightWorker for Firefox/Camoufox support (#26)
Peng DingSupport mixed Chromium+Firefox worker pools via protocol-aware config: VEILRENDER_WORKERS=cdp://host1:9222,playwright://host2:1234/ws - PlaywrightWorker: connects via playwright.firefox.connect() for Camoufox and other Playwright-compatible browsers - Protocol prefix parsing in config: cdp:// (default) or playwright:// - Page count via Playwright API (browser.contexts) instead of CDP HTTP - CDP proxy naturally excludes Firefox workers (get_cdp_url returns None) - deploy/Dockerfile.camoufox: Camoufox server image - deploy/compose-pool-mixed.yaml: CloakBrowser + Camoufox example Closes #26fabae1f -
feat: remove cloakbrowser pip dependency, auto-download binary
Peng Ding- Drop cloakbrowser from dependencies (no more playwright transitive dep) - LocalWorker auto-detects binary: env var → ~/.cloakbrowser/ → download - Binary downloaded directly from GitHub Releases via pure Python - CLOAKBROWSER_MIRROR env var for China (e.g. https://ghfast.top) - scripts/download-cloakbrowser.py for Dockerfile and manual use - Stealth args generated inline (random fingerprint) - Dockerfile full target: downloads binary directly, no pip cloakbrowser Image sizes: full 1.07GB (was 1.43GB), gateway 336MB (was 498MB)a4ba91f -
feat: migrate to Patchright, add pool deploy templates
Peng Ding- Replace playwright with patchright (drop-in, stealth driver layer) - Dockerfile: install patchright chromium driver - Add deploy/compose.yaml (single-instance) and deploy/compose-pool.yaml (gateway + cloakhq/cloakbrowser workers) - Makefile: POOL=1 flag for deploy-dev pool mode - pyproject.toml: add patchright>=1.0.0 dependency582bde6 -
feat: real browser page count via CDP /json endpoint
Peng Ding- Add _count_cdp_pages() to query actual open page targets from browser - worker_stats() now includes browser_pages (real count from CDP) - RemoteWorker.start() verifies connectivity by creating a test page - Prometheus metrics: add veilrender_worker_browser_pages gauge - /stats JSON: workers array includes browser_pages field - worker_stats() and dependent functions are now async16780dd -
fix: resolve hostname to IP for remote CDP connections
Peng DingChromium's CDP HTTP API rejects Host headers that aren't IP addresses or localhost. In Docker Compose networks where workers are accessed by service name (e.g. browser-worker:9222), the hostname in the Host header causes HTTP 500. Add _resolve_to_ip() helper that DNS-resolves hostnames to IPs before connecting, keeping the original endpoint for display/logging. Tested with zenika/alpine-chrome as remote worker on production.70d4363 -
fix: address review — health loop race, await cancel, wss://, async I/O
Peng Ding- Health loop uses ensure_ready() instead of direct stop()/start(), respecting worker's _lock to prevent concurrent teardown - Await health task cancellation in stop() to avoid resource leaks - Add _ws_to_http() helper to handle wss:// → https:// conversion - Wrap urlopen in asyncio.to_thread() for get_cdp_url() to avoid blocking the event loop on remote endpoints - Log warning when 0 of N workers are healthy at startup - Extract _fetch_json() helper to reduce duplicationc5e2bec -
feat: add remote browser worker pool support (#24)
Peng DingExtract LocalWorker/RemoteWorker from BrowserManager to support horizontal scaling of browser instances. When VEILRENDER_WORKERS is not set, behavior is identical to before (single local Chromium). When set to comma-separated CDP endpoints, requests are distributed across remote workers via least-connections routing. - LocalWorker: spawns local Chromium process (existing behavior) - RemoteWorker: connects to external CDP endpoint - BrowserManager: pool coordinator with least-connections routing - Health loop: periodic checks, automatic reconnection for remote workers - CDP proxy: ?worker=N query param for targeted routing - Per-worker Prometheus gauges (healthy, active_pages) - Dashboard capacity derived from total pool capacity - New config: VEILRENDER_WORKERS, VEILRENDER_WORKER_MAX_CONCURRENT, VEILRENDER_WORKER_HEALTH_INTERVAL Closes #249aca48e
-
fix: address metrics review — real p50, seconds, _sum/_count
Peng Ding- Add p50_ms to EndpointStats via shared _percentile() helper - Use real p50 instead of avg for quantile="0.5" (avg ≠ median) - Rename metric to _seconds with values in seconds (Prometheus convention) - Add _sum and _count lines to summary for rate() query support - Rename cache_total → cache_lookups_total for claritydfb4f0e -
feat: add Prometheus metrics endpoint (GET /metrics)
Peng DingZero-dependency Prometheus exposition format endpoint. Exposes: - veilrender_uptime_seconds (gauge) - veilrender_browser_alive (gauge) - veilrender_active_pages (gauge) - veilrender_max_concurrent (gauge) - veilrender_requests_total (counter, by endpoint + status) - veilrender_cache_total (counter, by endpoint + hit/miss) - veilrender_request_duration_ms (summary, p50 + p95 by endpoint) All metrics derived from existing in-memory stats — no new dependencies or persistence. Cache-Control: no-store header included.12e389a -
fix: preserve footer links during i18n switch
Peng DingUse data-i18n-html + innerHTML for keys containing markup (footer_author), plain data-i18n + textContent for everything else. Fixes bug where applyLang() stripped <a> tags from the footer on every language switch.65b9bdc -
fix: address review feedback — math.pi, stale indicator, DRY stats
Peng DingAddresses all review comments from Milo, Clementine, and Elena: - Use math.pi instead of hardcoded 3.14159 (fixes Python/JS precision mismatch) - _build_html() now calls _stats_json() internally (single source of truth) - Add stale-data indicator: body dims after 3 consecutive fetch failures - Pause polling on hidden tab via Page Visibility API - Add Cache-Control: no-store to /stats endpoint - SVG ring reads circumference from data-circ attr (no JS/Python coupling) - SVG ring has role="img" and aria-label for accessibility - var → const/let throughout JS8720e9c -
feat: add i18n dropdown, move badges to footer, add author credit
Peng Ding- Replace lang toggle button with <select> dropdown, auto-populated from I18N dict keys — adding a language only requires a new dict entry - Language preference persisted in localStorage - Move shields.io badges from header to footer for cleaner header - Add "Built by Oaklight · source on GitHub" footer line with i18n - Remove HF Spaces badge (space taken down) - Capacity ring gauge now has "Capacity" label4665394 -
feat: redesign dashboard with live data updates and themed UI
Peng Ding- Replace meta-refresh with fetch-based polling (GET /stats JSON endpoint) - New dark theme inspired by modal.com: black bg, mint-green accents - SVG ring gauge for capacity visualization - Animated status indicators and staggered entrance animations - Unified shields.io badge colors to match dashboard theme - Remove HF Spaces badge (space was taken down) - DM Sans + JetBrains Mono typography09a11ff -
chore: replace deprecated jsonc with jsonx, remove benchmark_compare
Peng Dingcd0db39
-
chore: bump vendored config 0.3.0→0.3.1, httpserver 0.1.0→0.2.1, readability 0.1.0→0.2.0
Peng Ding0ae4e28
-
bump version to 0.3.1
Peng Ding7921f85 -
security: fix SSRF, add URL validation, fail2ban, and body size limit
Peng Ding- Add url_validator.py: scheme whitelist (http/https only), DNS resolution with private IP blocking (loopback, RFC1918, link-local, metadata endpoint), prevents file://, data:, javascript:// URLs - Add fail2ban-style IP rate limiting to auth: 3 failures in 5min window → 10min ban, with X-Forwarded-For support - Reduce max_body_size from 10MB to 64KB - Promote filter blocked-request log from DEBUG to INFO573cdfc -
bump version to 0.3.0
Peng Ding0e7856a
-
feat: add two-tier render cache with S3-compatible storage
Peng DingL1 in-memory TTLCache (vendor) + L2 S3-compatible persistent storage via minio client. Supports Cloudflare R2, Oracle Object Storage, AWS S3, or any S3-compatible backend. Cached render results survive container restarts. Disabled by default; enable with env vars.f8b5624
-
feat: add outbound request filtering with StevenBlack/hosts blocklist
Peng DingBlock ad networks, trackers, and beacons at the Playwright level to prevent HF Spaces abuse-flag triggers and reduce attack surface. Uses 82k-domain blocklist from StevenBlack/hosts (MIT), loaded at startup with suffix matching via page.route().8d22106
-
bump version to 0.2.0
clementine-oaklight[bot]4bc4d92 -
fix: pre-commit formatting for dashboard.py
clementine-oaklight[bot]- Wrap long ternary expressions across lines - Use double quotes inside f-string expressions Fixes CI lint failurecf79c60 -
feat: improve dashboard UI with badges, capacity bar, and responsive layout (#20)
clementine-oaklight[bot] +1: clementine-oaklight[bot]Unverified signature- Add shields.io badges for GitHub, PyPI, Docker Hub, HF Spaces - Add capacity utilization bar with color-coded thresholds - Improve visual hierarchy with section labels and card borders - Color-code success rate based on thresholds (≥95% green, ≥80% yellow, <80% red) - Dynamic failure count color (red when >0, green when clean) - Add hover effects on cards and table rows - Responsive layout: 2-column grid on mobile - Polish typography with monospace tabular numbers for stats Fixes #19 Co-authored-by: clementine-oaklight[bot] <290556973+clementine-oaklight[bot]@users.noreply.github.com>2f6a57f -
bump default max_concurrent from 3 to 5
Peng Ding4b885ad -
add stats dashboard at GET / and restrict deploy-hf triggers
Peng Ding- New stats module: per-endpoint counters, avg/p95 latency, rolling deque(maxlen=1000) - Instrument render and screenshot handlers with timing - Add active_pages/is_browser_alive properties to BrowserManager - New dashboard route: auto-refreshing HTML page with uptime, browser status, request stats table - deploy-hf.yml: trigger only on workflow_dispatch and tagsaefeb84
-
initial release v0.1.0: headless browser rendering API
Peng DingVeilRender is a self-hostable headless browser rendering API built with zerodep modules and CloakBrowser (stealth Chromium). Accepts a URL, renders it with the browser, and returns content as HTML, Markdown, or readability-extracted text. Features: - POST /render — URL to rendered HTML/Markdown/readability - POST /screenshot — URL to PNG screenshot - GET /health — liveness check - CDP WebSocket proxy on /cdp for direct browser control - Token-based authentication via Bearer header or query param - Per-request browser context isolation with concurrency control - CloakBrowser with 58 source-level anti-fingerprint patches - 13 vendored zerodep modules, only external dep is cloakbrowser - Docker image based on python:3.12-slim - GitHub CI: pre-commit (ruff + ty), multi-arch Docker (amd64/arm64) - Auto-deploy to HF Spaces and Docker Hub/GHCR - Bilingual README (en/zh)1293e20