Spaces:
Runtime error
Runtime error
sanjay7178
commited on
Commit
•
8f7dcac
1
Parent(s):
7387da9
Update README.md
Browse files
README.md
CHANGED
@@ -1,324 +1,335 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
[
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
*
|
84 |
-
*
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
*
|
92 |
-
*
|
93 |
-
*
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
Example
|
113 |
-
```
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
cmd
|
131 |
-
url
|
132 |
-
maxTimeout
|
133 |
-
}
|
134 |
-
|
135 |
-
|
136 |
-
```
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
{
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
|
188 |
-
|
189 |
-
|
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
"
|
215 |
-
"
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
"
|
233 |
-
"
|
234 |
-
"
|
235 |
-
"
|
236 |
-
"
|
237 |
-
"
|
238 |
-
"
|
239 |
-
"
|
240 |
-
"
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
|
270 |
-
|
271 |
-
|
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
|
276 |
-
|
277 |
-
|
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
#
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: FlareSolver
|
3 |
+
emoji: ️🔥
|
4 |
+
colorFrom: "red"
|
5 |
+
colorTo: "blue"
|
6 |
+
sdk: "docker"
|
7 |
+
sdk_version: "v1.1"
|
8 |
+
app_file: app.py
|
9 |
+
pinned: false
|
10 |
+
---
|
11 |
+
|
12 |
+
# FlareSolverr
|
13 |
+
|
14 |
+
[![Latest release](https://img.shields.io/github/v/release/FlareSolverr/FlareSolverr)](https://github.com/FlareSolverr/FlareSolverr/releases)
|
15 |
+
[![Docker Pulls](https://img.shields.io/docker/pulls/flaresolverr/flaresolverr)](https://hub.docker.com/r/flaresolverr/flaresolverr/)
|
16 |
+
[![GitHub issues](https://img.shields.io/github/issues/FlareSolverr/FlareSolverr)](https://github.com/FlareSolverr/FlareSolverr/issues)
|
17 |
+
[![GitHub pull requests](https://img.shields.io/github/issues-pr/FlareSolverr/FlareSolverr)](https://github.com/FlareSolverr/FlareSolverr/pulls)
|
18 |
+
[![Donate PayPal](https://img.shields.io/badge/Donate-PayPal-yellow.svg)](https://www.paypal.com/paypalme/diegoheras0xff)
|
19 |
+
[![Donate Bitcoin](https://img.shields.io/badge/Donate-Bitcoin-f7931a.svg)](https://www.blockchain.com/btc/address/13Hcv77AdnFWEUZ9qUpoPBttQsUT7q9TTh)
|
20 |
+
[![Donate Ethereum](https://img.shields.io/badge/Donate-Ethereum-8c8c8c.svg)](https://www.blockchain.com/eth/address/0x0D1549BbB00926BF3D92c1A8A58695e982f1BE2E)
|
21 |
+
|
22 |
+
FlareSolverr is a proxy server to bypass Cloudflare and DDoS-GUARD protection.
|
23 |
+
|
24 |
+
## How it works
|
25 |
+
|
26 |
+
FlareSolverr starts a proxy server, and it waits for user requests in an idle state using few resources.
|
27 |
+
When some request arrives, it uses [Selenium](https://www.selenium.dev) with the
|
28 |
+
[undetected-chromedriver](https://github.com/ultrafunkamsterdam/undetected-chromedriver)
|
29 |
+
to create a web browser (Chrome). It opens the URL with user parameters and waits until the Cloudflare challenge
|
30 |
+
is solved (or timeout). The HTML code and the cookies are sent back to the user, and those cookies can be used to
|
31 |
+
bypass Cloudflare using other HTTP clients.
|
32 |
+
|
33 |
+
**NOTE**: Web browsers consume a lot of memory. If you are running FlareSolverr on a machine with few RAM, do not make
|
34 |
+
many requests at once. With each request a new browser is launched.
|
35 |
+
|
36 |
+
It is also possible to use a permanent session. However, if you use sessions, you should make sure to close them as
|
37 |
+
soon as you are done using them.
|
38 |
+
|
39 |
+
## Installation
|
40 |
+
|
41 |
+
### Docker
|
42 |
+
|
43 |
+
It is recommended to install using a Docker container because the project depends on an external browser that is
|
44 |
+
already included within the image.
|
45 |
+
|
46 |
+
Docker images are available in:
|
47 |
+
* GitHub Registry => https://github.com/orgs/FlareSolverr/packages/container/package/flaresolverr
|
48 |
+
* DockerHub => https://hub.docker.com/r/flaresolverr/flaresolverr
|
49 |
+
|
50 |
+
Supported architectures are:
|
51 |
+
|
52 |
+
| Architecture | Tag |
|
53 |
+
|--------------|--------------|
|
54 |
+
| x86 | linux/386 |
|
55 |
+
| x86-64 | linux/amd64 |
|
56 |
+
| ARM32 | linux/arm/v7 |
|
57 |
+
| ARM64 | linux/arm64 |
|
58 |
+
|
59 |
+
We provide a `docker-compose.yml` configuration file. Clone this repository and execute
|
60 |
+
`docker-compose up -d` _(Compose V1)_ or `docker compose up -d` _(Compose V2)_ to start
|
61 |
+
the container.
|
62 |
+
|
63 |
+
If you prefer the `docker cli` execute the following command.
|
64 |
+
```bash
|
65 |
+
docker run -d \
|
66 |
+
--name=flaresolverr \
|
67 |
+
-p 8191:8191 \
|
68 |
+
-e LOG_LEVEL=info \
|
69 |
+
--restart unless-stopped \
|
70 |
+
ghcr.io/flaresolverr/flaresolverr:latest
|
71 |
+
```
|
72 |
+
|
73 |
+
If your host OS is Debian, make sure `libseccomp2` version is 2.5.x. You can check the version with `sudo apt-cache policy libseccomp2`
|
74 |
+
and update the package with `sudo apt install libseccomp2=2.5.1-1~bpo10+1` or `sudo apt install libseccomp2=2.5.1-1+deb11u1`.
|
75 |
+
Remember to restart the Docker daemon and the container after the update.
|
76 |
+
|
77 |
+
### Precompiled binaries
|
78 |
+
|
79 |
+
> **Warning**
|
80 |
+
> Precompiled binaries are only available for x64 architecture. For other architectures see Docker images.
|
81 |
+
|
82 |
+
This is the recommended way for Windows users.
|
83 |
+
* Download the [FlareSolverr executable](https://github.com/FlareSolverr/FlareSolverr/releases) from the release's page. It is available for Windows x64 and Linux x64.
|
84 |
+
* Execute FlareSolverr binary. In the environment variables section you can find how to change the configuration.
|
85 |
+
|
86 |
+
### From source code
|
87 |
+
|
88 |
+
> **Warning**
|
89 |
+
> Installing from source code only works for x64 architecture. For other architectures see Docker images.
|
90 |
+
|
91 |
+
* Install [Python 3.11](https://www.python.org/downloads/).
|
92 |
+
* Install [Chrome](https://www.google.com/intl/en_us/chrome/) (all OS) or [Chromium](https://www.chromium.org/getting-involved/download-chromium/) (just Linux, it doesn't work in Windows) web browser.
|
93 |
+
* (Only in Linux) Install [Xvfb](https://en.wikipedia.org/wiki/Xvfb) package.
|
94 |
+
* (Only in macOS) Install [XQuartz](https://www.xquartz.org/) package.
|
95 |
+
* Clone this repository and open a shell in that path.
|
96 |
+
* Run `pip install -r requirements.txt` command to install FlareSolverr dependencies.
|
97 |
+
* Run `python src/flaresolverr.py` command to start FlareSolverr.
|
98 |
+
|
99 |
+
### From source code (FreeBSD/TrueNAS CORE)
|
100 |
+
|
101 |
+
* Run `pkg install chromium python39 py39-pip xorg-vfbserver` command to install the required dependencies.
|
102 |
+
* Clone this repository and open a shell in that path.
|
103 |
+
* Run `python3.9 -m pip install -r requirements.txt` command to install FlareSolverr dependencies.
|
104 |
+
* Run `python3.9 src/flaresolverr.py` command to start FlareSolverr.
|
105 |
+
|
106 |
+
### Systemd service
|
107 |
+
|
108 |
+
We provide an example Systemd unit file `flaresolverr.service` as reference. You have to modify the file to suit your needs: paths, user and environment variables.
|
109 |
+
|
110 |
+
## Usage
|
111 |
+
|
112 |
+
Example Bash request:
|
113 |
+
```bash
|
114 |
+
curl -L -X POST 'http://localhost:8191/v1' \
|
115 |
+
-H 'Content-Type: application/json' \
|
116 |
+
--data-raw '{
|
117 |
+
"cmd": "request.get",
|
118 |
+
"url": "http://www.google.com/",
|
119 |
+
"maxTimeout": 60000
|
120 |
+
}'
|
121 |
+
```
|
122 |
+
|
123 |
+
Example Python request:
|
124 |
+
```py
|
125 |
+
import requests
|
126 |
+
|
127 |
+
url = "http://localhost:8191/v1"
|
128 |
+
headers = {"Content-Type": "application/json"}
|
129 |
+
data = {
|
130 |
+
"cmd": "request.get",
|
131 |
+
"url": "http://www.google.com/",
|
132 |
+
"maxTimeout": 60000
|
133 |
+
}
|
134 |
+
response = requests.post(url, headers=headers, json=data)
|
135 |
+
print(response.text)
|
136 |
+
```
|
137 |
+
|
138 |
+
Example PowerShell request:
|
139 |
+
```ps1
|
140 |
+
$body = @{
|
141 |
+
cmd = "request.get"
|
142 |
+
url = "http://www.google.com/"
|
143 |
+
maxTimeout = 60000
|
144 |
+
} | ConvertTo-Json
|
145 |
+
|
146 |
+
irm -UseBasicParsing 'http://localhost:8191/v1' -Headers @{"Content-Type"="application/json"} -Method Post -Body $body
|
147 |
+
```
|
148 |
+
|
149 |
+
### Commands
|
150 |
+
|
151 |
+
#### + `sessions.create`
|
152 |
+
|
153 |
+
This will launch a new browser instance which will retain cookies until you destroy it with `sessions.destroy`.
|
154 |
+
This comes in handy, so you don't have to keep solving challenges over and over and you won't need to keep sending
|
155 |
+
cookies for the browser to use.
|
156 |
+
|
157 |
+
This also speeds up the requests since it won't have to launch a new browser instance for every request.
|
158 |
+
|
159 |
+
| Parameter | Notes |
|
160 |
+
|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
161 |
+
| session | Optional. The session ID that you want to be assigned to the instance. If isn't set a random UUID will be assigned. |
|
162 |
+
| proxy | Optional, default disabled. Eg: `"proxy": {"url": "http://127.0.0.1:8888"}`. You must include the proxy schema in the URL: `http://`, `socks4://` or `socks5://`. Authorization (username/password) is supported. Eg: `"proxy": {"url": "http://127.0.0.1:8888", "username": "testuser", "password": "testpass"}` |
|
163 |
+
|
164 |
+
#### + `sessions.list`
|
165 |
+
|
166 |
+
Returns a list of all the active sessions. More for debugging if you are curious to see how many sessions are running.
|
167 |
+
You should always make sure to properly close each session when you are done using them as too many may slow your
|
168 |
+
computer down.
|
169 |
+
|
170 |
+
Example response:
|
171 |
+
|
172 |
+
```json
|
173 |
+
{
|
174 |
+
"sessions": [
|
175 |
+
"session_id_1",
|
176 |
+
"session_id_2",
|
177 |
+
"session_id_3..."
|
178 |
+
]
|
179 |
+
}
|
180 |
+
```
|
181 |
+
|
182 |
+
#### + `sessions.destroy`
|
183 |
+
|
184 |
+
This will properly shutdown a browser instance and remove all files associated with it to free up resources for a new
|
185 |
+
session. When you no longer need to use a session you should make sure to close it.
|
186 |
+
|
187 |
+
| Parameter | Notes |
|
188 |
+
|-----------|-----------------------------------------------|
|
189 |
+
| session | The session ID that you want to be destroyed. |
|
190 |
+
|
191 |
+
#### + `request.get`
|
192 |
+
|
193 |
+
| Parameter | Notes |
|
194 |
+
|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
195 |
+
| url | Mandatory |
|
196 |
+
| session | Optional. Will send the request from and existing browser instance. If one is not sent it will create a temporary instance that will be destroyed immediately after the request is completed. |
|
197 |
+
| session_ttl_minutes | Optional. FlareSolverr will automatically rotate expired sessions based on the TTL provided in minutes. |
|
198 |
+
| maxTimeout | Optional, default value 60000. Max timeout to solve the challenge in milliseconds. |
|
199 |
+
| cookies | Optional. Will be used by the headless browser. Eg: `"cookies": [{"name": "cookie1", "value": "value1"}, {"name": "cookie2", "value": "value2"}]`. |
|
200 |
+
| returnOnlyCookies | Optional, default false. Only returns the cookies. Response data, headers and other parts of the response are removed. |
|
201 |
+
| proxy | Optional, default disabled. Eg: `"proxy": {"url": "http://127.0.0.1:8888"}`. You must include the proxy schema in the URL: `http://`, `socks4://` or `socks5://`. Authorization (username/password) is not supported. (When the `session` parameter is set, the proxy is ignored; a session specific proxy can be set in `sessions.create`.) |
|
202 |
+
|
203 |
+
> **Warning**
|
204 |
+
> If you want to use Cloudflare clearance cookie in your scripts, make sure you use the FlareSolverr User-Agent too. If they don't match you will see the challenge.
|
205 |
+
|
206 |
+
Example response from running the `curl` above:
|
207 |
+
|
208 |
+
```json
|
209 |
+
{
|
210 |
+
"solution": {
|
211 |
+
"url": "https://www.google.com/?gws_rd=ssl",
|
212 |
+
"status": 200,
|
213 |
+
"headers": {
|
214 |
+
"status": "200",
|
215 |
+
"date": "Thu, 16 Jul 2020 04:15:49 GMT",
|
216 |
+
"expires": "-1",
|
217 |
+
"cache-control": "private, max-age=0",
|
218 |
+
"content-type": "text/html; charset=UTF-8",
|
219 |
+
"strict-transport-security": "max-age=31536000",
|
220 |
+
"p3p": "CP=\"This is not a P3P policy! See g.co/p3phelp for more info.\"",
|
221 |
+
"content-encoding": "br",
|
222 |
+
"server": "gws",
|
223 |
+
"content-length": "61587",
|
224 |
+
"x-xss-protection": "0",
|
225 |
+
"x-frame-options": "SAMEORIGIN",
|
226 |
+
"set-cookie": "1P_JAR=2020-07-16-04; expires=Sat..."
|
227 |
+
},
|
228 |
+
"response":"<!DOCTYPE html>...",
|
229 |
+
"cookies": [
|
230 |
+
{
|
231 |
+
"name": "NID",
|
232 |
+
"value": "204=QE3Ocq15XalczqjuDy52HeseG3zAZuJzID3R57...",
|
233 |
+
"domain": ".google.com",
|
234 |
+
"path": "/",
|
235 |
+
"expires": 1610684149.307722,
|
236 |
+
"size": 178,
|
237 |
+
"httpOnly": true,
|
238 |
+
"secure": true,
|
239 |
+
"session": false,
|
240 |
+
"sameSite": "None"
|
241 |
+
},
|
242 |
+
{
|
243 |
+
"name": "1P_JAR",
|
244 |
+
"value": "2020-07-16-04",
|
245 |
+
"domain": ".google.com",
|
246 |
+
"path": "/",
|
247 |
+
"expires": 1597464949.307626,
|
248 |
+
"size": 19,
|
249 |
+
"httpOnly": false,
|
250 |
+
"secure": true,
|
251 |
+
"session": false,
|
252 |
+
"sameSite": "None"
|
253 |
+
}
|
254 |
+
],
|
255 |
+
"userAgent": "Windows NT 10.0; Win64; x64) AppleWebKit/5..."
|
256 |
+
},
|
257 |
+
"status": "ok",
|
258 |
+
"message": "",
|
259 |
+
"startTimestamp": 1594872947467,
|
260 |
+
"endTimestamp": 1594872949617,
|
261 |
+
"version": "1.0.0"
|
262 |
+
}
|
263 |
+
```
|
264 |
+
|
265 |
+
### + `request.post`
|
266 |
+
|
267 |
+
This is the same as `request.get` but it takes one more param:
|
268 |
+
|
269 |
+
| Parameter | Notes |
|
270 |
+
|-----------|--------------------------------------------------------------------------|
|
271 |
+
| postData | Must be a string with `application/x-www-form-urlencoded`. Eg: `a=b&c=d` |
|
272 |
+
|
273 |
+
## Environment variables
|
274 |
+
|
275 |
+
| Name | Default | Notes |
|
276 |
+
|--------------------|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
277 |
+
| LOG_LEVEL | info | Verbosity of the logging. Use `LOG_LEVEL=debug` for more information. |
|
278 |
+
| LOG_HTML | false | Only for debugging. If `true` all HTML that passes through the proxy will be logged to the console in `debug` level. |
|
279 |
+
| CAPTCHA_SOLVER | none | Captcha solving method. It is used when a captcha is encountered. See the Captcha Solvers section. |
|
280 |
+
| TZ | UTC | Timezone used in the logs and the web browser. Example: `TZ=Europe/London`. |
|
281 |
+
| LANG | none | Language used in the web browser. Example: `LANG=en_GB`. |
|
282 |
+
| HEADLESS | true | Only for debugging. To run the web browser in headless mode or visible. |
|
283 |
+
| BROWSER_TIMEOUT | 40000 | If you are experiencing errors/timeouts because your system is slow, you can try to increase this value. Remember to increase the `maxTimeout` parameter too. |
|
284 |
+
| TEST_URL | https://www.google.com | FlareSolverr makes a request on start to make sure the web browser is working. You can change that URL if it is blocked in your country. |
|
285 |
+
| PORT | 8191 | Listening port. You don't need to change this if you are running on Docker. |
|
286 |
+
| HOST | 0.0.0.0 | Listening interface. You don't need to change this if you are running on Docker. |
|
287 |
+
| PROMETHEUS_ENABLED | false | Enable Prometheus exporter. See the Prometheus section below. |
|
288 |
+
| PROMETHEUS_PORT | 8192 | Listening port for Prometheus exporter. See the Prometheus section below. |
|
289 |
+
|
290 |
+
Environment variables are set differently depending on the operating system. Some examples:
|
291 |
+
* Docker: Take a look at the Docker section in this document. Environment variables can be set in the `docker-compose.yml` file or in the Docker CLI command.
|
292 |
+
* Linux: Run `export LOG_LEVEL=debug` and then run `flaresolverr` in the same shell.
|
293 |
+
* Windows: Open `cmd.exe`, run `set LOG_LEVEL=debug` and then run `flaresolverr.exe` in the same shell.
|
294 |
+
|
295 |
+
## Prometheus exporter
|
296 |
+
|
297 |
+
The Prometheus exporter for FlareSolverr is disabled by default. It can be enabled with the environment variable `PROMETHEUS_ENABLED`. If you are using Docker make sure you expose the `PROMETHEUS_PORT`.
|
298 |
+
|
299 |
+
Example metrics:
|
300 |
+
```shell
|
301 |
+
# HELP flaresolverr_request_total Total requests with result
|
302 |
+
# TYPE flaresolverr_request_total counter
|
303 |
+
flaresolverr_request_total{domain="nowsecure.nl",result="solved"} 1.0
|
304 |
+
# HELP flaresolverr_request_created Total requests with result
|
305 |
+
# TYPE flaresolverr_request_created gauge
|
306 |
+
flaresolverr_request_created{domain="nowsecure.nl",result="solved"} 1.690141657157109e+09
|
307 |
+
# HELP flaresolverr_request_duration Request duration in seconds
|
308 |
+
# TYPE flaresolverr_request_duration histogram
|
309 |
+
flaresolverr_request_duration_bucket{domain="nowsecure.nl",le="0.0"} 0.0
|
310 |
+
flaresolverr_request_duration_bucket{domain="nowsecure.nl",le="10.0"} 1.0
|
311 |
+
flaresolverr_request_duration_bucket{domain="nowsecure.nl",le="25.0"} 1.0
|
312 |
+
flaresolverr_request_duration_bucket{domain="nowsecure.nl",le="50.0"} 1.0
|
313 |
+
flaresolverr_request_duration_bucket{domain="nowsecure.nl",le="+Inf"} 1.0
|
314 |
+
flaresolverr_request_duration_count{domain="nowsecure.nl"} 1.0
|
315 |
+
flaresolverr_request_duration_sum{domain="nowsecure.nl"} 5.858
|
316 |
+
# HELP flaresolverr_request_duration_created Request duration in seconds
|
317 |
+
# TYPE flaresolverr_request_duration_created gauge
|
318 |
+
flaresolverr_request_duration_created{domain="nowsecure.nl"} 1.6901416571570296e+09
|
319 |
+
```
|
320 |
+
|
321 |
+
## Captcha Solvers
|
322 |
+
|
323 |
+
> **Warning**
|
324 |
+
> At this time none of the captcha solvers work. You can check the status in the open issues. Any help is welcome.
|
325 |
+
|
326 |
+
Sometimes CloudFlare not only gives mathematical computations and browser tests, sometimes they also require the user to
|
327 |
+
solve a captcha.
|
328 |
+
If this is the case, FlareSolverr will return the error `Captcha detected but no automatic solver is configured.`
|
329 |
+
|
330 |
+
FlareSolverr can be customized to solve the CAPTCHA automatically by setting the environment variable `CAPTCHA_SOLVER`
|
331 |
+
to the file name of one of the adapters inside the [/captcha](src/captcha) directory.
|
332 |
+
|
333 |
+
## Related projects
|
334 |
+
|
335 |
+
* C# implementation => https://github.com/FlareSolverr/FlareSolverrSharp
|