Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Git
.git
.gitignore

# Python
__pycache__
*.pyc
*.pyo
*.pyd
.Python
env
venv
.venv
pip-log.txt
pip-delete-this-directory.txt
.tox
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.log
.git
.mypy_cache
.pytest_cache
.hypothesis

# Virtual environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Docker
Dockerfile
docker-compose.yml
.dockerignore

# Logs
*.log

# Database (if not using volume)
# db_results.db

# Other
README.md
28 changes: 28 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Turnstile Solver Docker Environment Variables
# Copy this file to .env and modify as needed

# Server configuration
HOST=0.0.0.0
PORT=8383

# Browser configuration
BROWSER_TYPE=chromium
THREAD=4

# Debug and logging
DEBUG=true

# Proxy support (NOTE: Cannot be used with IPv6)
PROXY=false

# IPv6 support (NOTE: Cannot be used with proxy)
IPV6=false

# IPv6 subnets (comma-separated list, required if IPv6=true)
IPV6_SUBNETS=XXXX:XXXX:XXXX::/48,XXX:XXX::/32

# User agent (leave empty for random)
USERAGENT=

# Headless mode (set to true to run with GUI)
NO_HEADLESS=false
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.env
__pycache__/
*.pyc
*.pyo
*.pyd
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Use Python 3.9 slim (stabile come il Dockerfile funzionante)
FROM python:3.9-slim

# Set working directory
WORKDIR /app

# Install minimal system dependencies (come il Dockerfile funzionante)
RUN apt-get update && apt-get install -y \
git \
curl \
&& rm -rf /var/lib/apt/lists/*

# Copy application files (invece di clonare)
COPY . .

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Install Playwright browsers and system dependencies
RUN python -m playwright install chromium && \
python -m playwright install firefox && \
python -m playwright install-deps

# Make entrypoint script executable
RUN chmod +x entrypoint.sh

# Expose port
EXPOSE 5072

# Use entrypoint script
ENTRYPOINT ["/app/entrypoint.sh"]
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ A Python-based Turnstile solver using the patchright and camoufox libraries, fea
- **Multi-threaded execution** - Solve multiple CAPTCHAs simultaneously
- **Multiple browser support** - Chromium, Chrome, Edge, and Camoufox
- **Proxy support** - Use proxies from proxies.txt file
- **IPv6 support** - Use IPv6 addresses from custom subnets
- **Random browser configurations** - Rotate User-Agent and Sec-CH-UA headers
- **Detailed logging** - Comprehensive debug information
- **REST API** - Easy integration with other applications
Expand Down Expand Up @@ -46,6 +47,20 @@ scheme://ip:port
scheme://username:password@ip:port
```

### IPv6 Configuration

The solver supports IPv6 addresses from custom subnets. Configure via environment variables:

```bash
# Enable IPv6 support
IPV6=true

# Configure IPv6 subnets (comma-separated)
IPV6_SUBNETS=XXX:XXX:XXX::/48,XXX:XXXX::/32
```

**⚠️ Important**: IPv6 and proxy support cannot be enabled simultaneously. Choose only one mode.

## ❗ Disclaimers

I am not responsible for anything that may happen, such as API Blocking, IP ban, etc.
Expand Down Expand Up @@ -129,6 +144,7 @@ python api_solver.py
| `--host` | 0.0.0.0 | string | Specifies the IP address the API solver runs on. |
| `--port` | 6080 | integer | Sets the port the API solver listens on. |
| `--proxy` | False | boolean | Select a random proxy from proxies.txt for solving captchas |
| `--ipv6` | False | boolean | Enable IPv6 support (cannot be used with --proxy) |
| `--random` | False | boolean | Use random User-Agent and Sec-CH-UA configuration from pool |
| `--browser` | None | string | Specify browser name to use (e.g., chrome, firefox) |
| `--version` | None | string | Specify browser version to use (e.g., 139, 141) |
Expand Down
Binary file added __pycache__/api_solver.cpython-313.pyc
Binary file not shown.
Loading