Skip to content

Commit 9cfd39e

Browse files
committed
v3.15b
1 parent b34b3ee commit 9cfd39e

18 files changed

+385
-73
lines changed

README.md

Lines changed: 73 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@ Python server to automatically solve Cloudflare Turnstile CAPTCHA with an averag
44

55
PD: This repository was initially created for personal use. I've adjusted it for sharing, but it might still be slightly disorganized. Feel free to contribute, open issues, and request new features.
66

7+
---
8+
9+
## Table of Content
10+
11+
- [Screenshots](#screenshots)
12+
- [Install](#install)
13+
- [Patchright](#install-patchright-patched-chrome-browser)
14+
- [How to use](#how-to-use)
15+
- [Run server](#run-server)
16+
- [Global proxy](#use-global-browser-proxy)
17+
- [Proxy parameters](#load-proxy-parameters-from-environment-variables-all-caps)
18+
- [Proxy file](#use-a-proxy-from-file-per-browser-context)
19+
- [Get Token](#get-token)
20+
- [Curl](#curl)
21+
- [Python](#python)
22+
- [Docker](./docker/README.md)
23+
- [Disclaimer](#disclaimer)
24+
- [Donate](#donate)
25+
26+
---
27+
728
## Screenshots
829

930
TODO: Update
@@ -13,42 +34,58 @@ TODO: Update
1334

1435
![Browser](images/browser.png)
1536

37+
---
38+
1639
## Install
40+
1741
```bash
1842
pip install git+https://github.com/odell0111/turnstile_solver@main
1943
```
20-
### Install Patchright patched chromium browser
44+
45+
### Install Patchright patched chrome browser
46+
2147
```bash
22-
patchright install chromium
48+
patchright install chrome
2349
```
2450

51+
Note: You can also install chromium but chrome is [recommended by Patchright](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python?tab=readme-ov-file#best-practice----use-chrome-without-fingerprint-injection)
52+
53+
---
54+
2555
## How to use
2656

2757
### Run server
58+
2859
```bash
2960
solver
3061
```
3162

3263
```bash
3364
solver --port 8088 --secret jWRN7DH6 --browser-position --max-attempts 3 --captcha-timeout 30 --page-load-timeout 30 --reload-on-overrun
3465
```
66+
3567
#### Use global browser proxy
68+
3669
```bash
3770
solver --proxy-server http://myproxy.com:3128 --proxy-username user --proxy-password pass
3871
```
72+
3973
##### Load proxy parameters from environment variables (all caps)
74+
4075
```bash
4176
solver --proxy-server MY_PROXY_SERVER --proxy-username MY_PROXY_USERNAME --proxy-password MY_PROXY_PASSWORD
4277
```
78+
4379
##### Use a proxy from file per browser context
80+
4481
```bash
4582
solver --proxies myproxies.txt
4683
```
4784

48-
4985
### Get token
5086

5187
#### cURL
88+
5289
```bash
5390
curl --location --request GET 'http://127.0.0.1:8088/solve' \
5491
--header 'ngrok-skip-browser-warning: _' \
@@ -61,6 +98,7 @@ curl --location --request GET 'http://127.0.0.1:8088/solve' \
6198
```
6299

63100
#### Python
101+
64102
```python
65103
import requests
66104

@@ -80,8 +118,8 @@ json_data = {
80118
}
81119

82120
response = requests.get(
83-
url=url,
84-
headers=headers,
121+
url=url,
122+
headers=headers,
85123
json=json_data,
86124
)
87125

@@ -100,31 +138,42 @@ print("Token:", token)
100138

101139
```
102140

103-
## Disclaimer ‼️
141+
---
142+
143+
## 🐳 Container Management Guide
144+
goto [./docker/README.md](./docker/README.md)
145+
146+
---
147+
148+
## Disclaimer
149+
104150
Use this project entirely at your own risk. I hold no responsibility for any negative outcomes, including but not limited to API blocking and IP bans
105151

152+
---
153+
106154
## Donate
155+
107156
If you find my work useful and want to encourage further development, you can do so by donating
108157

109-
[//]: # ([![Donate](https://app.oxapay.com/media/btn/light-btn.png)](https://oxapay.com/donate/42319117))
158+
### [OxaPay](https://oxapay.com/donate/42319117)
110159

111-
[//]: # (<a href="https://oxapay.com/donate/42319117" target="_blank"> <img src="https://app.oxapay.com/media/btn/light-btn.png" style="width: 200px"> </a>)
160+
### USDT (BEP20 - BSC)
161+
`0x88046e6d0f2bf8629cd7fbd754e4e275083fc993`
112162

113-
### [OxaPay](https://oxapay.com/donate/42319117)
163+
### USDT (SOL - Solana)
164+
`BL3QX5GtfXp8qha8PMLVwyud7gxB1aPE4Vsqotwscxsv`
165+
166+
### USDT (TRC20 - Tron)
167+
`TMpXigKBghRQmgYD53KyuxS38FH516ermu`
168+
169+
### BTC
170+
`1E9kw3FuaahfeproboNL7uvyBdjP9wY6CR`
171+
172+
### BTC (BEP20)
173+
`0x88046e6d0f2bf8629cd7fbd754e4e275083fc993`
114174

115175
### TON
116-
```
117-
UQCyCnWVYOmv97idVFZ4tIewToZacRhYVwfGNU658fN5w3Kl
118-
```
119-
### Bitcoin
120-
```
121-
1E9kw3FuaahfeproboNL7uvyBdjP9wY6CR
122-
```
123-
### Bitcoin (BEP20)
124-
```
125-
0x88046e6d0f2bf8629cd7fbd754e4e275083fc993
126-
```
127-
#### Speed Lightning Address username
128-
```
129-
bytechanger@speed.app
130-
```
176+
`UQCyCnWVYOmv97idVFZ4tIewToZacRhYVwfGNU658fN5w3Kl`
177+
178+
### Speed Lightning Address username
179+
`bytechanger@speed.app`

docker-compose.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
services:
2+
solver:
3+
container_name: solver
4+
hostname: solver
5+
build:
6+
context: ./docker/services/solver
7+
dockerfile: ./solver.Dockerfile
8+
restart: always
9+
ports:
10+
- 8088:8088 # turnstile_solver server
11+
- 3389:3389 # RDP
12+
networks:
13+
- solver
14+
15+
networks:
16+
solver:
17+
name: solver
18+
driver: bridge

docker/README.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
## 🐳 Docker
2+
3+
### 🚧 Pre-Release Developer Notice
4+
5+
**Important Context**
6+
This release has been marked as experimental because:
7+
⚠️ **I have been unable to personally validate the build** due to:
8+
9+
- Unstable power infrastructure
10+
- Unreliable internet connectivity
11+
12+
**Your Contribution is needed !!**
13+
14+
### 🛠️ Build Instructions
15+
16+
#### 1. Clone Repository
17+
18+
```bash
19+
git clone https://github.com/odell0111/turnstile_solver.git
20+
cd turnstile_solver
21+
```
22+
23+
#### 2. Build Image
24+
25+
```bash
26+
# Clean build with fresh dependencies
27+
docker compose build --no-cache --pull
28+
```
29+
30+
#### 3. Start the Container
31+
32+
**Command** (with environment variables):
33+
34+
```bash
35+
docker compose up -d \
36+
-e TZ="America/New_York" \
37+
-e START_SERVER="true"
38+
```
39+
40+
**Key Parameters**:
41+
42+
- `TZ`: Set your [IANA timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
43+
*(Example: Europe/London, Asia/Dubai)*
44+
- `START_SERVER`:
45+
- `true` = Auto-start with default config
46+
- `false` = Manual start required
47+
48+
### 🔌 Remote Access Configuration
49+
50+
**Current Protocol (RDP)**:
51+
52+
1. **Client Software**:
53+
- Windows: Built-in Remote Desktop Connection
54+
- Linux: `Remmina` or `FreeRDP`
55+
- macOS: Microsoft Remote Desktop
56+
57+
2. **Connection Details**:
58+
- Address: `localhost:3389`
59+
- Credentials:
60+
- Username: `root`
61+
- Password: `root` (❗Change after first login)
62+
63+
3. **Post-Connection (Start server with desired parameters)**:
64+
65+
```bash
66+
python3 solver
67+
```
68+
69+
⚠️ **Security Notice**: Default credentials pose significant risk - change immediately after initial setup!
70+
71+
---
72+
73+
Do you think I should add support for VNC server/protocol for next release?
74+
75+
### 🤔 VNC vs RDP Considerations
76+
77+
**Protocol Comparison**:
78+
79+
| Feature | RDP | VNC |
80+
|-----------------------|---------------------|---------------------|
81+
| Performance | ✅ Optimized | ⚠️ Bandwidth-heavy |
82+
| Security | ✅ Native encryption | 🔄 Depends on setup |
83+
| Cross-Platform | ✅ Excellent | ✅ Universal |
84+
| File Transfer | ✅ Built-in | ❌ Requires add-ons |
85+
| Multi-Monitor Support | ✅ Native | ✅ Possible |
86+
87+
```diff
88+
+ For Next Release: Hybrid Support
89+
- Implement both protocols (RDP+VNC) via separate ports
90+
- Add environment variable: PROTOCOL="RDP|VNC" (default: RDP)
91+
- Include VNC password configuration in docker-compose
92+
```
93+
94+
**Suggested Implementation**:
95+
96+
```yaml
97+
# docker-compose.yml
98+
environment:
99+
- PROTOCOL=${REMOTE_PROTOCOL:-RDP}
100+
- VNC_PASSWORD=${VNC_PWD:-changeme}
101+
ports:
102+
- "3389:3389" # RDP
103+
- "5900:5900" # VNC
104+
```
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/bin/bash
2+
3+
declare -r TARGET_USER="root"
4+
#declare -r WORKSPACE="/${TARGET_USER}/Desktop"
5+
declare -r REPO_URL="https://github.com/odell0111/turnstile_solver.git"
6+
7+
clean_pids() {
8+
find /var/run -name '*xrdp*.pid' -delete
9+
}
10+
11+
service_init() {
12+
clean_pids
13+
xrdp-sesman & xrdp -n &
14+
local timeout=20
15+
16+
while ((timeout-- > 0)); do
17+
pgrep -x Xorg && return 0
18+
sleep 1
19+
done
20+
return 1
21+
}
22+
23+
user_setup() {
24+
if ! id "${TARGET_USER}" &>/dev/null; then
25+
getent group "${TARGET_USER}" || groupadd "${TARGET_USER}"
26+
useradd -mUs "/bin/bash" -G "${TARGET_USER},sudo" "${TARGET_USER}" || return 1
27+
fi
28+
echo "${TARGET_USER}:${TARGET_USER}" | chpasswd || return 1
29+
}
30+
31+
env_config() {
32+
[[ -n "${TZ}" ]] && {
33+
ln -sf "/usr/share/zoneinfo/${TZ}" /etc/localtime
34+
echo "${TZ}" >/etc/timezone
35+
}
36+
# mkdir -p "${WORKSPACE}"
37+
}
38+
39+
repo_setup() {
40+
# ( cd "${WORKSPACE}" && git clone -q "${REPO_URL}" && cd turnstile_solver || exit 2
41+
# pip3 install -r requirements.txt --break-system-packages )
42+
pip3 install "git+${REPO_URL}@main" --break-system-packages || exit 2
43+
}
44+
45+
# Execution flow
46+
user_setup || { echo "User config failed"; exit 1; }
47+
env_config || exit 1
48+
repo_setup || { echo "Repo setup failed"; exit 2; }
49+
if service_init; then
50+
echo "Xorg running"
51+
else
52+
echo "X server failed"
53+
exit 3
54+
fi
55+
56+
if [ "$START_SERVER" = "true" ]; then
57+
echo "Starting server in headful mode..."
58+
xvfb-run -a python3 solver
59+
# xvfb-run -a python3 "${WORKSPACE}/turnstile_solver/main.py"
60+
fi

0 commit comments

Comments
 (0)