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 in playwright 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:
Added testInfo.skip(); at the end of the booking process. This ensures the bot exits with a status code of 0 upon a successful booking, preventing Docker Compose from restarting it. Without this, the bot exits with 1 due to page.close() calls that interrupt connections and cause test failures.
Playwright Update:
Updated Playwright to ensure compatibility and prevent crashes on M3 MacBook Pros.
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:
npx extract-stealth-evasions
Copy and edit the environment variables file:
cp .env.example .env
# Then edit .env with your preferred settings
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:
Build and start the Docker Compose setup:
Let me know if you have any questions!