Commit Graph
59 Commits
Author SHA1 Message Date
ThePhaseless c18a7aa77e docs: stop recommending a tmpfs over /cache
/cache holds the browser baked into the image. A tmpfs over it hides
that browser, so Byparr downloads it again on every start (the cause
behind #439). Also move shm_size and tmpfs in compose.yaml out of the
build section, where they never applied to the running container.
2026-11-06 14:02:45 +01:00
ThePhaseless 406ad428c4 fix: fetch GeoIP data once at start instead of on every browser launch
invisible-core 49.46+ looks up the egress IP and checks GitHub for a newer
GeoIP database on every browser launch, so a network that blocks those hosts
delayed every request by the lookup timeouts. Memoize both lookups (success for
the process lifetime, failures retried after a backoff, proxied egress lookups
uncached), warm them up in the FastAPI lifespan before the port opens, and gate
get_browser() on the same warm-up. Drop the unused --init mode.
2026-11-05 00:27:20 +01:00
renovate[bot]andThePhaseless 3e8c09ea39 chore(deps): lock file maintenance (#432)
* chore(deps): lock file maintenance

* fix: fall back to the host timezone when the egress lookup raises

invisible-core 49.46 always looks up the egress IP and raises
GeoTimezoneError when an "auto" lookup fails, instead of returning an
empty zone. Catch it so a failed lookup uses the host timezone again
rather than failing the request, update the explicit-settings test to
the new always-lookup behaviour, and correct the README.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: ThePhaseless <kukubaorch@gmail.com>
2026-11-04 23:33:51 +01:00
ThePhaselessandClaude Opus 5.5 804c776a80 refactor: take the host timezone from tzlocal
The fallback zone used after a failed egress lookup came from hand-rolled
TZ and /etc/localtime parsing. That parsing passed values such as
TZ=UTC0, TZ=CET-1CEST,M3.5.0,M10.5.0/3 or TZ=:/usr/share/zoneinfo/... to
the browser unchanged, and Playwright rejects them as an invalid
timezone ID. tzlocal.get_localzone_name() handles those forms and returns
only names it could load, or None. A None result still falls back to UTC.

tzlocal already came in through trafilatura (htmldate -> dateparser).
It is now a direct dependency because Byparr imports it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 23:52:44 +02:00
ThePhaselessandClaude Opus 5.5 70d6ced2cb fix: resolve the browser timezone once per process instead of per request
Every request builds a new InvisiblePlaywright, and its __aenter__ calls
prepare_session_geo(): with the default timezone="" and no proxy that
discovers the egress IP through api.ipify.org, icanhazip.com and
checkip.amazonaws.com, then calls ensure_geoip_mmdb(), which HEADs GitHub
for a newer GeoIP release, three times per session. On a network where
those hosts are slow or blocked every request paid for it before the
browser even started. Measured in the app image: ipify black-holed adds
~5s per request, all three echo hosts black-holed ~12.5s, GitHub
black-holed ~75s. Setting BROWSER_LOCALE alone did not help, because
the timezone was still "auto".

Without a proxy the egress is the host's own, so the answer does not
change between requests. Resolve it on the first request, off the event
loop and under a lock so concurrent first requests share one lookup,
then hand the zone and the locale's primary tag to InvisiblePlaywright
explicitly; an explicit zone and tag make prepare_session_geo touch no
network. The resulting browser is the same as with "auto": passing the
primary tag back reproduces the decided language list for every Firefox
build the locale table can pick, and without a proxy the egress IP,
coordinates and srflx are not used by InvisiblePlaywright anyway.

When the lookup fails upstream falls back to the host timezone by
passing "", but passing "" again would repeat the lookup on every
request, so the host zone is named explicitly (TZ, else the
/etc/localtime link, else UTC) and the lookup is retried after ten
minutes.

Sessions behind a proxy (PROXY_SERVER or X-Proxy-Server) still resolve
per request through the proxy: each proxy has its own egress, and
upstream deliberately fails the launch when it cannot be resolved.

BROWSER_TIMEZONE mirrors BROWSER_LOCALE and wins also behind a proxy;
with both set the lookup is skipped entirely.

Fixes #416

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 00:05:13 +02:00
Jakub Orchowski ee1cd6a2d9 Revise warning about disk operations and temp storage
Updated warning message to simplify and clarify recommendations for reducing disk wear.
2026-10-07 00:22:39 +02:00
zkhcohen 73535a0f7e formatting 2026-09-21 10:23:24 -07:00
zkhcohen 4571c5b422 Add Disk Wear Reduction Recommendations 2026-09-21 10:17:20 -07:00
Jakub Orchowski 98e1668721 Add sponsor badge to README
Added a sponsor badge to the README.
2026-09-18 21:26:26 +02:00
ThePhaseless 8cb5770b84 feat: add BROWSER_LOCALE env to override browser language 2026-08-10 22:53:42 +02:00
marchingphoenixandClaude Opus 4.5 f76443cbda feat: add Open WebUI external web loader endpoint
Add /load endpoint for Open WebUI's WEB_LOADER_ENGINE=external integration.
Uses document.body.innerText for content extraction.

Configure in Open WebUI:
  WEB_LOADER_ENGINE=external
  EXTERNAL_WEB_LOADER_URL=http://byparr:8191/load
  EXTERNAL_WEB_LOADER_API_KEY=<OWUI_API_KEY env var>

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-08-08 00:56:46 +02:00
ThePhaseless ecdd4c112a docs(readme): add Proxmox OCI/LXC shm_size workaround
Adds the Docker Compose options from #283 (comment) that resolve
multiprocessing/camoufox FileNotFoundError errors on Proxmox OCI/LXC.

Closes #283
2026-07-04 18:24:54 +02:00
ThePhaseless dac2f60b46 [skip ci] add update info and fix md linting 2026-02-08 15:16:30 +00:00
ThePhaseless b5535fba02 [skip ci] Revise local install instructions in README
Updated installation instructions to include cloning the repository and revised the steps.
2026-02-08 15:30:50 +01:00
ThePhaseless c1d478f7b2 Fix numbering in README instructions 2026-02-08 14:00:17 +01:00
ThePhaseless a909098b43 Add Usage section to readme and add logo 2026-02-08 12:02:10 +00:00
ThePhaselessandClaude c45a464462 Add Building Feature (#276)
* feat: Build Docker images for PRs with branch name labels

- Remove condition preventing PR builds
- Add branch name extraction and sanitization
- Add branch labels to Docker images (org.opencontainers.image.branch and branch)
- Enable pushing of PR Docker images
- Sanitize branch names for Docker tags (replace / with -)

This allows PR images to be built and tagged with their branch names,
making it easier to test specific PR builds.

* feat: Add path filters to Docker workflow

Only build Docker images when relevant files change:
- Source code (src/**, main.py, tests/**)
- Docker configuration (Dockerfile, compose.yaml)
- Dependencies (pyproject.toml, uv.lock)
- Workflow file itself

This prevents unnecessary builds when only documentation or
other non-functional files are changed.

* feat: Add automatic cleanup of PR Docker images

Create a new workflow that automatically deletes Docker images
when a PR is closed or merged. This prevents accumulation of
old PR images in the container registry.

Features:
- Triggers on PR close/merge events
- Deletes images tagged with PR number and SHA
- Handles both architecture variants (amd64, arm64)
- Supports both organization and user repositories
- Provides detailed logging of cleanup operations

* refactor: Remove redundant branch label preparation

Remove duplicate branch name preparation step in merge-and-push job.
Branch labels are already added during the build step, so no need
to add them again when creating the manifest.

* refactor: Remove redundant label configurations

Remove custom label configurations from docker-publish workflow.
The docker/metadata-action already sets standard OCI labels by
default, so explicit label configuration is unnecessary.

Also removed unused BRANCH_TAG variable preparation.

* refactor: Use PR number for Docker image tags instead of SHA

Changed Docker image tagging strategy for pull requests:
- Use pr-{number}-{arch} for individual platform builds
- Use pr-{number} for final manifest
- Non-PR builds still use SHA-based tags

Benefits:
- Simpler, more readable tags for PRs
- Easier to identify which PR an image belongs to
- Cleanup script simplified to match only PR number tags

Updated cleanup workflow to match new tag pattern.

* docs: Add PR Docker image tags to README

Document the pr-{number} tag pattern used for pull request images.
These images are automatically built for PRs and cleaned up when
the PR is closed.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-20 01:25:00 +01:00
Thirawyn91 a8d1157b26 Change default PORT from 8196 to 8191 (#267) 2025-11-08 23:05:22 +01:00
oldwombatandAdam Roddick 7054136320 fix readme table (#256)
Co-authored-by: Adam Roddick <13641602+adamcybersec@users.noreply.github.com>
2025-10-15 09:29:13 +02:00
ThePhaseless 39b804da55 add host and port as env 2025-10-01 12:09:53 +00:00
ThePhaseless f98e823991 Migrate to camoufox (#235)
* use camoufox

* build custom branches

* organize compose

* ignore missing stubs

* add init method

* create ADDON PATH

* check if solving is required

* type checking and remove logger

* uv sync

* add timeout

* add descriptiuon

* cancel previous runs

* wildcard minor

* fix proxy

* syntax fix

* [skip ci] fix loop warning

* fix proxy format

* copy over docker ignore

* remove testing line

* comment out port expose

* remove idope

* use strict typechecking

* refactor

* adjust compose

* run init only before test

* try test without init

* add curl

* handle page response

* remove turnsile test

* fix dockerignore symlink

* use newer debian

* bump pytest

* add docker in docker in devcontaienr

* remove unused values

* handle timeouts

* fix edgecase

* use new envs for proxy

* remove init command

* remove testing line

* remove setuptools

* fix linters

* reimport

* readd setuptools

* better float handling
2025-09-05 23:08:35 +02:00
Alvaro Santos Andres 6e1c073a6f fix: set default CAPTCHA_RETRIES to 3 2025-08-12 07:16:33 +02:00
Alvaro Santos Andres b153d4ae34 fix: simplify code to fix PR suggestions 2025-08-11 06:57:42 +00:00
Alvaro Santos Andres ddd325ae29 Merge remote-tracking branch 'upstream/main' 2025-08-07 08:17:08 +02:00
ThePhaseless 9ef7a3d3ae Redefine "drop in replacement"
fixes #214
2025-08-06 23:21:40 +02:00
Mathieu Dallaire 117c9bdd95 update readme 2025-08-04 11:27:27 -04:00
Alvaro Santos Andres 39f758859d fix: disabled HEADLESS mode by default and updated dependencies 2025-07-25 13:51:19 +02:00
ThePhaseless 147902be2c Update ProxyBase link 2025-05-21 12:47:02 +02:00
ThePhaseless 7e9c2ba97d update readme 2025-05-18 23:22:19 +02:00
ThePhaseless 1fa6b66f3a fixes ctrl+c on docker run 2025-04-17 11:38:52 +00:00
ThePhaseless 409c0f9d8c [skip ci] add proxybase collaboration info 2025-04-14 10:38:02 +00:00
ThePhaseless d4f722d121 [skip ci] Clarified the info 2025-04-13 00:11:15 +02:00
ThePhaseless 81959df037 Added SOCKS5 with auth handling 2025-04-12 21:46:42 +00:00
ThePhaseless bdcf756b7e [skip ci] update TODO and fix None as default for Proxy 2025-02-20 22:59:11 +01:00
ThePhaseless b8a3995c8c [skip ci] fix typo and remake Troubleshooting 2025-02-20 21:31:17 +00:00
ThePhaseless ecbb2ab182 separate files, add gzip, save screenshots on exception, add PROXY support 2025-02-17 23:08:14 +00:00
ThePhaseless 0325877e19 [skip ci] clarified xvfb platform requirement 2025-01-02 12:35:30 +00:00
ThePhaseless c4159e5c38 disable headless on docker 2025-01-02 12:29:10 +00:00
ThePhaseless 83169ce019 add headless env 2025-01-02 12:18:21 +00:00
ThePhaseless 2ebb1bd820 optional xvfb support 2024-12-18 13:29:00 +00:00
ThePhaseless d7ef83b8c6 add tags info and use latest on stable release 2024-12-17 12:03:36 +00:00
ThePhaseless bbb7c73065 kill old processes 2024-12-13 22:38:47 +00:00
ThePhaseless 82130b77c0 fix docker and update readme 2024-12-10 22:48:35 +00:00
ThePhaseless b483dba080 [skip ci] Mili to Mega 2024-12-02 10:29:13 +01:00
ThePhaseless d26974e22a [skip ci] Add example issues for NAS devices 2024-11-26 21:15:34 +01:00
ThePhaseless 0d4d5093ca [skip ci] update readme and bug report 2024-11-26 17:56:10 +00:00
ThePhaseless 88abca13c5 Update README.md 2024-10-27 20:03:07 +01:00
ThePhaseless 3b7f501404 Add info about conditional passing and updated troubleshooting 2024-10-27 20:01:09 +01:00
ThePhaseless 8b0caf6adc dont test (fck it) 2024-10-18 16:33:27 +00:00
ThePhaseless 8a90428f4b update troubleshooting 2024-10-18 15:53:36 +00:00