Add support for Tor proxies using docker compose #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi guys,
This PR adds a Docker Compose configuration for running the bot through a Tor proxy. The Tor proxy rotates its IP address every 60 seconds and uses Germany as its exit point, reducing the risk of being blocked. Some minor adjustments were necessary for compatibility with the proxy:
Changes Made
Environment Variables Added:
DELAY_EACH_RETRY_IN_SEC
: Limits the rate of requests inplaywright test
to avoid excessive retries.RETRIES
: Sets the retry count for Playwright; must be greater than zero. The bot will restart through Docker Compose if retries are exhausted.TIMEOUT_IN_SEC
: Prevents MailSlurp from freezing during extended bot operation.Booking Process Update:
testInfo.skip();
at the end of the booking process. This ensures the bot exits with a status code of0
upon a successful booking, preventing Docker Compose from restarting it. Without this, the bot exits with1
due topage.close()
calls that interrupt connections and cause test failures.Playwright Update:
Additional Information
The Tor server may take up to 60 seconds to initialize and build its cache on the first run.
Setup Instructions
Extract stealth evasions:
Copy and edit the environment variables file:
cp .env.example .env # Then edit .env with your preferred settings
Build and start the Docker Compose setup:
Let me know if you have any questions!