Commit Graph
24 Commits
Author SHA1 Message Date
CaliBrain 199d8453eb Adding Release version (#263) 2025-08-30 03:10:15 -04:00
Federico Della Rovere 207cff96d3 External CloudFlare resolver (#245)
Adding support for an external CloudFlare bypasser service and
introducing a new Docker image build with a dedicated target.

Key Changes
- Added `cloudflare_bypasser_external.py` for external bypasser
integration.
- Updated Docker Compose files to support the new service.
- Introduced a new Docker target for building a separate image for the
external bypasser.
- Refactored relevant modules to utilize the external bypasser when
configured.
- Documentation and configuration updates to reflect new options and
Docker targets.

Impact
- Users can now choose between internal and external CloudFlare
bypassing.
- New Docker image and target streamline deployment of the external
bypasser.
- Improved modularity and maintainability.
- No breaking changes for existing workflows.

Testing
- Manual and E2E tests performed for both bypasser modes.
- Docker Compose setups and new image build verified for development and
production.

Notes
Please review the new configuration options and Docker targets. Update
your environment and deployment scripts as needed. Feedback and
suggestions are welcome!
2025-08-28 17:37:59 -04:00
CCarpo f9ddc2ffc2 use the FLASK_HOST variable as declared in the documentation (#205)
I noticed that the FLASK_HOST was not used as stated in the
documentation. I need it so that FLASK is listening on my IPv6 address.
2025-07-30 08:29:25 -04:00
CaliBrain 600605f9c4 Fix is_writable check (#170) 2025-04-28 15:34:15 -04:00
CaliBrain 5c9962f17b Do not fail on folder permission error (#169) 2025-04-28 14:28:50 -04:00
CaliBrain 457351fa0b Better File check (#165)
- Better file permission initialization
- Fix chown bug
2025-04-27 13:49:07 -04:00
CaliBrain 49287ac86e Revert "Better file permission initialization" (#164)
Reverts calibrain/calibre-web-automated-book-downloader#162
2025-04-27 12:43:07 -04:00
CaliBrain 4ca8298b7e Better file permission initialization (#162) 2025-04-27 01:27:48 -04:00
CaliBrain 93e15cbdd0 Fix tor log file getting removed (#157) 2025-04-22 11:15:15 -07:00
CaliBrain 712f71a466 Add DEBUG button (#147) 2025-04-20 05:32:11 -04:00
Jacob Wolfe 05744eb256 Stop Gunicorn from Giving Up on Slow Tor Requests (#146)
I tried running the docker-compose.yml referenced in this comment
https://github.com/calibrain/calibre-web-automated-book-downloader/issues/120#issuecomment-2816539268
from issue #120 and was able to reproduce the same 'Server is not
responding' error. I found the issue would happen whenever the captcha
bypass took more than 30 seconds due to tor's slower connection. Adding
-t 300 would let gunicorn wait up to 5 minutes now.
2025-04-19 12:14:22 -04:00
CaliBrain 270fe7ae6b Fix tor (#145)
Add proper version in the container, and fix tor logging and
inconsistent flag
2025-04-19 01:33:58 -04:00
Jacob Wolfe 0be0c8f665 Fix cwa-book-downloader Permission Issues (#143)
Fix permission issues that occur if user forgets to create the
`cwa-book-downloader` folder before creating the docker container since
docker makes the directory with root ownership.
2025-04-19 00:57:34 -04:00
Jacob Wolfe 68f5464a88 Fix: Stop sudo -E from overwriting HOME environment variable (#138)
`sudo -E` was replacing `appuser`'s `$HOME` environment variable of
`/app` with `/root` causing permission issues when selenium tried to
write to `~/.cache/selenium`. This fixes [issue
#130](https://github.com/calibrain/calibre-web-automated-book-downloader/issues/130)
by allowing Driver from seleniumbase to successfully return instead of
timing out on line 172 in `cloudflare_bypasser.py`.
2025-04-16 10:56:19 -04:00
CaliBrain 747972180d Deep debug (#136) 2025-04-15 21:49:20 -04:00
CaliBrain 00d0a2e7c3 more debug logging (#135) 2025-04-15 10:52:25 -04:00
CaliBrain 666d7ba849 Refactor Cloudflare Bypass & Fix Bugs (#126) 2025-04-13 13:01:15 -04:00
CaliBrain 57f15b4d95 Tor support, use SeleniumBase instead of DrissionPage (#123)
Refactor: Improve Docker build, add Tor support, use SeleniumBase

- Overhauled Dockerfile:
    - Switched to python:3.10-slim base.
    - Implemented multi-stage builds (base, standard, tor).
    - Consolidated RUN layers for efficiency.
    - Added locale/timezone setup.
- Added Tor setup and iptables configuration in dedicated stage/script.
- Replaced DrissionPage with SeleniumBase for Cloudflare bypassing.
- Added Tor support via `docker-compose.tor.yml` and `tor.sh` script.
- Updated `docker-compose.yml` to build locally and changed default port
to 8083.
- Added `docker-compose.dev.yml` and `docker-compose.tor.dev.yml`.
- Updated `entrypoint.sh` for timezone and sudo usage.
- Added/Updated environment variables (`TZ`, `USING_TOR`, etc.).
- Improved `.dockerignore`.
- Updated `readme.md` to reflect port changes, build process, document
`TZ`, and add details about the new Tor variant.
2025-04-13 02:34:39 -04:00
DanielandDaniel Egberts b93bdd59ac Soft fail for chown in entrypoint.sh (#97)
Co-authored-by: Daniel Egberts <daniel@MacBook-Pro-van-Daniel.local>
2025-03-17 14:47:53 -04:00
CaliBrainandmik593 3a92c5de78 CF BYPASS (#24)
The Calibre dependency was due to the script testing for validity of the
downloaded file, as often they would be corrupted from aa. But CWA is
already doing that, so we are just having redundant code here.

For the cloudflarebypasser, I basically run my own version now, instead
of depending on an external library, this way we have better control for
debugging and on the docker image.

Fixes #18, #33, #27, #48, #65, #78, #86, #88, #89

---------

Co-authored-by: mik593 <91991279+mik593@users.noreply.github.com>
2025-03-16 02:25:15 -04:00
CaliBrain 74f00ddcec FIX Logging (#46)
- [FIX] Actually log to a file
- FIX Crash loop due to missing log folder
2025-01-07 15:30:45 -05:00
CaliBrain 2b80de35a8 [FIX] Actually log to a file (#44) 2025-01-07 14:04:50 -05:00
CaliBrain 78e423e8a5 Update entrypoint.sh
No need to exit on error
2024-12-20 20:17:26 -05:00
Vincent De Borger 06f654f4be Add UID and GID to set the user & group ID's during runtime (#10)
This PR add the option to set UID/GID during runtime, making sure the
application is running as a non-root user.
Besides this, it also helps with making sure UID/GID match between
containers.
2024-12-19 10:16:25 -05:00