antidetect 2.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. antidetect-2.1.0/LICENSE +21 -0
  2. antidetect-2.1.0/PKG-INFO +401 -0
  3. antidetect-2.1.0/antidetect/__init__.py +29 -0
  4. antidetect-2.1.0/antidetect/__main__.py +19 -0
  5. antidetect-2.1.0/antidetect/browser.py +389 -0
  6. antidetect-2.1.0/antidetect/cli.py +405 -0
  7. antidetect-2.1.0/antidetect/constants.py +288 -0
  8. antidetect-2.1.0/antidetect/display.py +86 -0
  9. antidetect-2.1.0/antidetect/geo.py +242 -0
  10. antidetect-2.1.0/antidetect/gui/__init__.py +0 -0
  11. antidetect-2.1.0/antidetect/gui/api.py +376 -0
  12. antidetect-2.1.0/antidetect/gui/app.py +275 -0
  13. antidetect-2.1.0/antidetect/gui/constants.py +474 -0
  14. antidetect-2.1.0/antidetect/gui/editor.py +431 -0
  15. antidetect-2.1.0/antidetect/gui/favicon.svg +1 -0
  16. antidetect-2.1.0/antidetect/gui/formatter.py +95 -0
  17. antidetect-2.1.0/antidetect/gui/guard.py +153 -0
  18. antidetect-2.1.0/antidetect/gui/profiles.py +635 -0
  19. antidetect-2.1.0/antidetect/gui/proxies.py +661 -0
  20. antidetect-2.1.0/antidetect/gui/settings.py +276 -0
  21. antidetect-2.1.0/antidetect/gui/state.py +53 -0
  22. antidetect-2.1.0/antidetect/gui/structures.py +119 -0
  23. antidetect-2.1.0/antidetect/icons/antidetect.icns +0 -0
  24. antidetect-2.1.0/antidetect/icons/antidetect.ico +0 -0
  25. antidetect-2.1.0/antidetect/icons/antidetect.png +0 -0
  26. antidetect-2.1.0/antidetect/install.py +307 -0
  27. antidetect-2.1.0/antidetect/launcher.py +305 -0
  28. antidetect-2.1.0/antidetect/legacy/README.md +34 -0
  29. antidetect-2.1.0/antidetect/legacy/__init__.py +3 -0
  30. antidetect-2.1.0/antidetect/legacy/converter.py +194 -0
  31. antidetect-2.1.0/antidetect/legacy/unpickler.py +38 -0
  32. antidetect-2.1.0/antidetect/library.py +493 -0
  33. antidetect-2.1.0/antidetect/manager.py +424 -0
  34. antidetect-2.1.0/antidetect/proxy.py +171 -0
  35. antidetect-2.1.0/antidetect/relay.py +331 -0
  36. antidetect-2.1.0/antidetect/store.py +390 -0
  37. antidetect-2.1.0/antidetect/structures.py +253 -0
  38. antidetect-2.1.0/antidetect.egg-info/PKG-INFO +401 -0
  39. antidetect-2.1.0/antidetect.egg-info/SOURCES.txt +57 -0
  40. antidetect-2.1.0/antidetect.egg-info/dependency_links.txt +1 -0
  41. antidetect-2.1.0/antidetect.egg-info/entry_points.txt +5 -0
  42. antidetect-2.1.0/antidetect.egg-info/requires.txt +15 -0
  43. antidetect-2.1.0/antidetect.egg-info/top_level.txt +1 -0
  44. antidetect-2.1.0/pyproject.toml +69 -0
  45. antidetect-2.1.0/readme.md +359 -0
  46. antidetect-2.1.0/setup.cfg +4 -0
  47. antidetect-2.1.0/tests/test_api.py +120 -0
  48. antidetect-2.1.0/tests/test_browser.py +254 -0
  49. antidetect-2.1.0/tests/test_cli.py +187 -0
  50. antidetect-2.1.0/tests/test_formatter.py +20 -0
  51. antidetect-2.1.0/tests/test_geo.py +86 -0
  52. antidetect-2.1.0/tests/test_guard.py +87 -0
  53. antidetect-2.1.0/tests/test_install.py +141 -0
  54. antidetect-2.1.0/tests/test_legacy.py +214 -0
  55. antidetect-2.1.0/tests/test_library.py +84 -0
  56. antidetect-2.1.0/tests/test_manager.py +157 -0
  57. antidetect-2.1.0/tests/test_proxy.py +74 -0
  58. antidetect-2.1.0/tests/test_relay.py +104 -0
  59. antidetect-2.1.0/tests/test_store.py +124 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 MaestroOfAutomation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,401 @@
1
+ Metadata-Version: 2.4
2
+ Name: antidetect
3
+ Version: 2.1.0
4
+ Summary: Antidetect Chrome profiles with their own proxy, location and storage: a GUI app and a Python library
5
+ Author: MaestroOfAutomation
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/MaestroOfAutomation/AntidetectBrowserSolution
8
+ Project-URL: Changelog, https://github.com/MaestroOfAutomation/AntidetectBrowserSolution/blob/main/CHANGELOG.md
9
+ Project-URL: Issues, https://github.com/MaestroOfAutomation/AntidetectBrowserSolution/issues
10
+ Keywords: antidetect,browser,fingerprint,chrome,playwright,proxy,profiles
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Environment :: Web Environment
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: End Users/Desktop
15
+ Classifier: Operating System :: MacOS
16
+ Classifier: Operating System :: Microsoft :: Windows
17
+ Classifier: Operating System :: POSIX :: Linux
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Programming Language :: Python :: 3.15
24
+ Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
25
+ Requires-Python: >=3.11
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: patchright==1.64.4
29
+ Requires-Dist: nicegui==4.1.0
30
+ Requires-Dist: pydantic<3,>=2.14
31
+ Requires-Dist: aiohttp<4,>=3.14
32
+ Requires-Dist: aiohttp-socks<1,>=0.12
33
+ Requires-Dist: loguru<0.9,>=0.8
34
+ Requires-Dist: opentelemetry-api<1.46
35
+ Provides-Extra: native
36
+ Requires-Dist: pywebview>=6.2; extra == "native"
37
+ Provides-Extra: dev
38
+ Requires-Dist: pytest>=9; extra == "dev"
39
+ Requires-Dist: pytest-asyncio>=1.5; extra == "dev"
40
+ Requires-Dist: ruff>=0.14; extra == "dev"
41
+ Dynamic: license-file
42
+
43
+ <div align="center">
44
+
45
+ <img src="https://raw.githubusercontent.com/MaestroOfAutomation/AntidetectBrowserSolution/main/antidetect/gui/favicon.svg" width="84" height="84" alt="">
46
+
47
+ # AntidetectBrowserSolution
48
+
49
+ **Browser profiles that look like separate, ordinary people.**<br>
50
+ An antidetect browser with a GUI and a Python library, built on your real Google Chrome.
51
+
52
+ [![PyPI](https://img.shields.io/pypi/v/antidetect?color=5b5bd6&label=pypi)](https://pypi.org/project/antidetect/)
53
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-3776AB?logo=python&logoColor=white)](https://www.python.org/downloads/)
54
+ [![Windows | macOS | Linux](https://img.shields.io/badge/runs%20on-Windows%20%7C%20macOS%20%7C%20Linux-5b5bd6)](#quick-start)
55
+ [![Tests](https://github.com/MaestroOfAutomation/AntidetectBrowserSolution/actions/workflows/ci.yml/badge.svg)](https://github.com/MaestroOfAutomation/AntidetectBrowserSolution/actions/workflows/ci.yml)
56
+ [![License: MIT](https://img.shields.io/badge/license-MIT-2ea44f)](https://github.com/MaestroOfAutomation/AntidetectBrowserSolution/blob/main/LICENSE)
57
+ [![Telegram](https://img.shields.io/badge/Telegram-join-26A5E4?logo=telegram&logoColor=white)](https://t.me/maestroofautomation)
58
+
59
+ [Quick start](#quick-start) · [Python library](#python-library) · [API and CDP](#local-api-and-cdp) · [Docker](#docker) · [Telegram](https://t.me/maestroofautomation)
60
+
61
+ <br>
62
+
63
+ <picture>
64
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/MaestroOfAutomation/AntidetectBrowserSolution/main/docs/screenshots/gui-profiles-dark.png">
65
+ <img alt="Profiles in the GUI" src="https://raw.githubusercontent.com/MaestroOfAutomation/AntidetectBrowserSolution/main/docs/screenshots/gui-profiles-light.png">
66
+ </picture>
67
+
68
+ </div>
69
+
70
+ <table>
71
+ <tr>
72
+ <td align="center" width="33%"><h3>12 of 14</h3>public bot detectors pass</td>
73
+ <td align="center" width="33%"><h3>0 of 37</h3>consistency checks fail</td>
74
+ <td align="center" width="33%"><h3>0.6 s</h3>to start a profile</td>
75
+ </tr>
76
+ </table>
77
+
78
+ ## Why it passes
79
+
80
+ Most antidetect browsers inject a made-up fingerprint with JavaScript, and detectors catch the
81
+ seams: a Chrome 136 engine behind a Chrome 130 User-Agent, workers that report the real GPU,
82
+ Playwright's `__pwInitScripts`. AntidetectBrowserSolution starts your real Google Chrome through
83
+ [patchright](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python) and changes only what
84
+ a real person behind that proxy would have different: IP, timezone, language, geolocation and
85
+ WebRTC.
86
+
87
+ On a desktop with Google Chrome ([bench](https://github.com/MaestroOfAutomation/AntidetectBrowserSolution/tree/main/bench/)):
88
+
89
+ | Detector | Result |
90
+ |---|---|
91
+ | Own probe: User-Agent, Client Hints, headers, workers, WebGL | ✅ 0 of 37 checks fail |
92
+ | [bot.sannysoft.com](https://bot.sannysoft.com/) | ✅ |
93
+ | [CreepJS](https://abrahamjuliot.github.io/creepjs/) | ✅ headless 0 %, stealth 0 % |
94
+ | [rebrowser bot-detector](https://bot-detector.rebrowser.net/) | ✅ 0 red |
95
+ | [BrowserScan](https://www.browserscan.net/bot-detection) | ✅ Normal |
96
+ | [Pixelscan](https://pixelscan.net/fingerprint-check) | ✅ consistent |
97
+ | [deviceandbrowserinfo.com](https://deviceandbrowserinfo.com/are_you_a_bot) | ✅ you are human |
98
+ | [Fingerprint Pro playground](https://demo.fingerprint.com/playground) | ✅ no bot, no tampering |
99
+ | [iphey.com](https://iphey.com/) | ✅ trustworthy |
100
+ | [bot.incolumitas.com](https://bot.incolumitas.com/) | ⚠️ 1 fail\* |
101
+ | [Brotector](https://ttlns.github.io/brotector/) | ✅ 0 detections, a Playwright click too |
102
+ | [fingerprint-scan.com](https://fingerprint-scan.com/) | ⚠️ bot score 15 of 100 |
103
+ | [BrowserScan fingerprint](https://www.browserscan.net/) | ✅ authenticity 100 % |
104
+ | [Pixelscan bot check](https://pixelscan.net/bot-check) | ✅ definitely a human |
105
+ | [Selenium Detector](https://hmaker.github.io/selenium-detector/) | ✅ 0 detections |
106
+
107
+ <sub>\* Only the old fpscanner `WEBDRIVER` test fails. The start time is a headless profile
108
+ without a proxy, from the call to the local API until Chrome is ready.</sub>
109
+
110
+ ### Next to other tools
111
+
112
+ The same bench for each tool in one Linux container on the same day: the same IP, timezone,
113
+ screen and fonts, no proxy. The container has no GPU, so Chrome turns WebGL off there.
114
+
115
+ | Detector | AntidetectBrowserSolution | Camoufox | SeleniumBase | Playwright |
116
+ |---|---|---|---|---|
117
+ | Own probe | ✅ 0 of 37 fail | ✅ 0 of 26 fail\* | ✅ 0 of 37 fail | ❌ 3 of 37 fail |
118
+ | bot.sannysoft.com | ❌ no WebGL | ✅ | ❌ no WebGL | ❌ webdriver, SwiftShader |
119
+ | CreepJS | ✅ | ⚠️ canvas | ✅ | ❌ 33 % headless |
120
+ | rebrowser bot-detector | ✅ | ✅ | ❌ Runtime.enable | ❌ 4 red |
121
+ | BrowserScan | ✅ | ✅ | ✅ | ❌ robot |
122
+ | Pixelscan | ❌ masking | ❌ masking | ❌ masking | ❌ masking, automation |
123
+ | deviceandbrowserinfo.com | ✅ | ✅ | ❌ bot | ❌ bot |
124
+ | Fingerprint Pro playground | ✅ | ✅ | ✅ | ❌ bad bot |
125
+ | iphey.com | ⚠️ no verdict | ✅ | ⚠️ no verdict | ❌ unreliable |
126
+ | bot.incolumitas.com | ⚠️ 1 fail† | ❌ 1 fail | ⚠️ 1 fail† | ❌ 3 fail |
127
+ | Brotector | ✅ | ✅ | ❌ runtime.enabled | ❌ tab crashed |
128
+ | fingerprint-scan.com | ⚠️ bot score 39 | ⚠️ bot score 6 | ❌ bot score 99 | ❌ bot score 100 |
129
+ | BrowserScan fingerprint | ✅ 100 % | ✅ 100 % | ✅ 100 % | ❌ 95 %, bot |
130
+ | Pixelscan bot check | ✅ human | ✅ human | ❌ CDP | ❌ webdriver, CDP |
131
+ | Selenium Detector | ✅ | ✅ | ✅ | ✅ |
132
+ | **Passed** | **10 of 15** | **11 of 15** | **6 of 15** | **1 of 15** |
133
+
134
+ <sub>\* Firefox has no Client Hints and no `window.chrome`: 11 checks do not apply. † The old
135
+ fpscanner `WEBDRIVER` test. Camoufox 0.5.9 with its default fingerprint, which reports a GPU it
136
+ does not have; SeleniumBase 4.59.2 in its Stealthy Playwright Mode; Playwright 1.65.3 with Google
137
+ Chrome 158. December 2026, repeat it with [bench/compare.Dockerfile](https://github.com/MaestroOfAutomation/AntidetectBrowserSolution/blob/main/bench/compare.Dockerfile).</sub>
138
+
139
+ ## What you get
140
+
141
+ - **A profile is a person.** Own cookies, logins, history and tabs, own proxy, timezone,
142
+ language, geolocation and WebRTC policy. Timezone, language and geolocation follow the exit IP
143
+ unless you set them.
144
+ - **Proxy pool.** Paste a list in any format. Each proxy is checked through itself: exit IP,
145
+ country, city, timezone, latency. Mobile proxies take a rotation link. A dead proxy stops the
146
+ start with a plain error instead of leaking your real IP.
147
+ - **SOCKS5 with a password.** Chrome cannot log in to one, so a small local relay does it.
148
+ - **Bulk work.** Select many profiles to start, stop, tag, give a proxy or delete. One click
149
+ makes a profile per proxy.
150
+ - **Automation.** A Playwright context from Python, a local REST API and a CDP address for every
151
+ profile.
152
+ - **Clean window.** No warning bar about command-line flags. Close the window and the profile
153
+ shows as stopped.
154
+ - **Light and dark theme**, keys `/` to search, `N` for a new item and `Ctrl+S` to save, its own
155
+ window with `--native`.
156
+
157
+ | Editor | Proxy pool | Paste a list |
158
+ |---|---|---|
159
+ | <picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/MaestroOfAutomation/AntidetectBrowserSolution/main/docs/screenshots/gui-editor-dark.png"><img alt="Editor" src="https://raw.githubusercontent.com/MaestroOfAutomation/AntidetectBrowserSolution/main/docs/screenshots/gui-editor-light.png"></picture> | <picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/MaestroOfAutomation/AntidetectBrowserSolution/main/docs/screenshots/gui-proxies-dark.png"><img alt="Proxies" src="https://raw.githubusercontent.com/MaestroOfAutomation/AntidetectBrowserSolution/main/docs/screenshots/gui-proxies-light.png"></picture> | <picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/MaestroOfAutomation/AntidetectBrowserSolution/main/docs/screenshots/gui-proxies-add-dark.png"><img alt="Add proxies" src="https://raw.githubusercontent.com/MaestroOfAutomation/AntidetectBrowserSolution/main/docs/screenshots/gui-proxies-add-light.png"></picture> |
160
+
161
+ ## Quick start
162
+
163
+ Windows, in PowerShell:
164
+
165
+ ```powershell
166
+ powershell -ExecutionPolicy ByPass -c "irm https://github.com/MaestroOfAutomation/AntidetectBrowserSolution/releases/latest/download/install.ps1 | iex"
167
+ ```
168
+
169
+ macOS and Linux:
170
+
171
+ ```bash
172
+ curl -LsSf https://github.com/MaestroOfAutomation/AntidetectBrowserSolution/releases/latest/download/install.sh | sh
173
+ ```
174
+
175
+ The script installs [uv](https://docs.astral.sh/uv/) with a Python 3.13 of its own, then the app,
176
+ and adds it to the Start menu and the desktop, Applications or the app menu. Without Google Chrome
177
+ it downloads Chromium. Start the app from there or with `antidetect`: the GUI opens in its own
178
+ window on Windows and macOS, and at http://127.0.0.1:8188 on Linux. Profiles live in
179
+ `~/.antidetect-browser-solution`, and `ANTIDETECT_HOME` moves them.
180
+
181
+ <details>
182
+ <summary><b>Other ways to install</b></summary>
183
+
184
+ The package is [antidetect on PyPI](https://pypi.org/project/antidetect/):
185
+
186
+ ```bash
187
+ uv tool install "antidetect[native]" # or: pipx install "antidetect[native]"
188
+ antidetect shortcut # Start menu, Applications or app menu
189
+ uvx antidetect # run without installing
190
+ ```
191
+
192
+ `[native]` adds pywebview for the window of its own on Windows and macOS. Without Google Chrome
193
+ run `antidetect browsers --install` once.
194
+
195
+ From the source, with `git pull` on every start:
196
+
197
+ ```bash
198
+ git clone https://github.com/MaestroOfAutomation/AntidetectBrowserSolution.git
199
+ cd AntidetectBrowserSolution
200
+ ./run.sh # macOS, Linux
201
+ run.bat # Windows
202
+ ```
203
+
204
+ A checkout keeps profiles in `user_data/` and extensions in `extensions/`. To switch to the
205
+ installed app, move them to `~/.antidetect-browser-solution/` and
206
+ `~/.antidetect-browser-solution/extensions/`.
207
+
208
+ </details>
209
+
210
+ ### Updates
211
+
212
+ Once a day the app asks PyPI for the latest version and then shows **Update to** in its header.
213
+ Quit the app and run the install script again, or the command of your install:
214
+
215
+ ```bash
216
+ uv tool upgrade antidetect # pipx upgrade antidetect, pip install -U antidetect
217
+ ```
218
+
219
+ A checkout updates itself on start. The check is one request to `pypi.org/pypi/antidetect/json`
220
+ without your profiles or settings. Settings → Updates turns it off.
221
+
222
+ ## Python library
223
+
224
+ ```bash
225
+ pip install antidetect
226
+ antidetect browsers --install # only without Google Chrome
227
+ ```
228
+
229
+ ```python
230
+ import asyncio
231
+
232
+ from antidetect import AsyncAntidetect
233
+
234
+
235
+ async def main():
236
+ async with AsyncAntidetect(profile='work', proxy='user:pass@1.2.3.4:8080') as context:
237
+ page = await context.new_page()
238
+ await page.goto('https://www.browserscan.net')
239
+
240
+
241
+ asyncio.run(main())
242
+ ```
243
+
244
+ ```python
245
+ from antidetect import Antidetect
246
+
247
+ with Antidetect(proxy='socks5://user:pass@1.2.3.4:1080', headless='virtual') as context:
248
+ page = context.new_page()
249
+ page.goto('https://example.com')
250
+ ```
251
+
252
+ The context is a patchright one, so the Playwright API you know works as is. Profiles are shared
253
+ with the GUI: create one there, drive it from a script, open it again by hand.
254
+
255
+ <details>
256
+ <summary><b>All arguments</b></summary>
257
+
258
+ | Argument | Meaning |
259
+ |---|---|
260
+ | `profile` | Name of a saved profile, created on first use. The arguments below update it. Without `profile` the profile is thrown away on exit |
261
+ | `proxy` | Any [proxy format](#proxy-formats) or the dict of Playwright and Camoufox: `{'server': ..., 'username': ..., 'password': ...}`. The exit IP sets the timezone, languages and geolocation |
262
+ | `headless` | `True`: headless Chrome, which says `HeadlessChrome` in its User-Agent and has an 800×600 screen. `'virtual'`: a normal window on an Xvfb screen (Linux, `apt install xvfb`), the way to run on a server |
263
+ | `browser` | `chrome` or `chromium`. Default: Chrome when it is installed, else Chromium |
264
+ | `timezone`, `language` | Instead of the values of the exit IP: `'Europe/Paris'`, `'fr-FR'` |
265
+ | `webrtc` | `proxy_only` (default): no UDP past the proxy, a page sees no ICE candidates. `real`: as is. `disabled`: no candidates even without a proxy |
266
+ | `start_urls` | Pages to open when the profile has no saved tabs |
267
+ | `window` | Window size, `(1440, 900)`. Default: a common size, picked once per profile |
268
+ | `cdp` | Also open a CDP port. Its address is in `.cdp_url` (async) |
269
+ | `user_data_dir` | Keep the browser data of a throwaway profile in this folder |
270
+ | `data_path` | Data folder of the profiles, by default the same as the app |
271
+
272
+ The library logs nothing until you ask: `from loguru import logger; logger.enable('antidetect')`.
273
+
274
+ </details>
275
+
276
+ ## Local API and CDP
277
+
278
+ The running app serves an API on the same port:
279
+
280
+ ```bash
281
+ curl -X POST localhost:8188/api/profiles -H 'content-type: application/json' \
282
+ -d '{"name": "shop-2", "proxy": "http://user:pass@1.2.3.4:8080"}'
283
+ curl -X POST 'localhost:8188/api/profiles/shop-2/start?headless=true'
284
+ curl -X POST localhost:8188/api/profiles/shop-2/stop
285
+ ```
286
+
287
+ ```python
288
+ browser = await playwright.chromium.connect_over_cdp('ws://localhost:8188/cdp/shop-2')
289
+ page = await browser.contexts[0].new_page()
290
+ ```
291
+
292
+ Connect with patchright, [rebrowser-puppeteer](https://github.com/rebrowser/rebrowser-patches)
293
+ or another client that does not call `Runtime.enable`: plain Playwright and Puppeteer give
294
+ themselves away through it. Without `--token` the API answers only `localhost` and refuses
295
+ requests from web pages of other sites. With `--token` or `ANTIDETECT_TOKEN`, every request needs
296
+ the `X-Token` header.
297
+
298
+ Guide: [docs/api.md](https://github.com/MaestroOfAutomation/AntidetectBrowserSolution/blob/main/docs/api.md).
299
+ Contract: [docs/openapi.json](https://github.com/MaestroOfAutomation/AntidetectBrowserSolution/blob/main/docs/openapi.json),
300
+ also served at `GET /api/openapi.json`.
301
+
302
+ ## Docker
303
+
304
+ ```bash
305
+ docker run -d --name antidetect -p 127.0.0.1:8188:8188 --shm-size 2g \
306
+ -v antidetect-data:/data ghcr.io/maestroofautomation/antidetect-browser-solution
307
+ ```
308
+
309
+ The GUI and the API are at http://127.0.0.1:8188, profiles stay in the volume `antidetect-data`.
310
+ To update, pull the image, remove the container and run it again. In a checkout
311
+ `docker compose up --build` builds the image and keeps profiles in `./docker-data`.
312
+
313
+ Browsers run with a window on a virtual display. Google builds no Chrome for Linux arm64, so
314
+ there new profiles use Chromium, which detectors that look for the Google Chrome brand flag: run
315
+ the image on amd64. Without a GPU Chrome has no WebGL. Without a proxy the clock of the
316
+ container is UTC: set `TZ` to the zone of the server, or give profiles a proxy.
317
+
318
+ <details>
319
+ <summary><b>Command line</b></summary>
320
+
321
+ ```bash
322
+ antidetect # GUI, same as: antidetect gui
323
+ antidetect gui --port 8188 --native # own window, needs: antidetect[native]
324
+ antidetect browsers # which browsers are ready
325
+ antidetect proxies add proxies.txt --tag mobile
326
+ antidetect proxies check # exit IP, country, timezone of every proxy
327
+ antidetect create shop-1 --proxy socks5://user:pass@1.2.3.4:1080 --tag shop
328
+ antidetect start shop-1 --cdp # print a CDP address for automation
329
+ antidetect list
330
+ antidetect delete shop-1
331
+ antidetect shortcut --remove # delete the shortcuts
332
+ ```
333
+
334
+ In a checkout the same commands run as `python main.py ...`.
335
+
336
+ </details>
337
+
338
+ <details>
339
+ <summary><b>Proxy formats</b></summary>
340
+
341
+ `http`, `https` and `socks5`, with or without a password:
342
+
343
+ ```text
344
+ socks5://user:pass@host:port http://host:port host:port (http)
345
+ host:port:user:pass user:pass@host:port user:pass:host:port
346
+ socks5:host:port:user:pass socks5h://... # comments and blank lines are skipped
347
+ ```
348
+
349
+ Before a start the proxy is checked through itself. A dead proxy stops the start.
350
+
351
+ </details>
352
+
353
+ <details>
354
+ <summary><b>Check a profile against detectors</b></summary>
355
+
356
+ ```bash
357
+ python -m bench --target current --browser chrome --out bench/out/chrome
358
+ python -m bench.report chrome # markdown table of one or more runs
359
+ ```
360
+
361
+ `bench` opens a profile, visits the detector sites of
362
+ [bench/sites.py](https://github.com/MaestroOfAutomation/AntidetectBrowserSolution/blob/main/bench/sites.py),
363
+ reads their verdicts from an isolated world the page cannot see, saves screenshots and runs its
364
+ own probe: 37 checks that the User-Agent, Client Hints, headers, workers, WebGL and `navigator`
365
+ agree. [bench/compare.Dockerfile](https://github.com/MaestroOfAutomation/AntidetectBrowserSolution/blob/main/bench/compare.Dockerfile) runs the same bench for other tools,
366
+ all in one Linux image.
367
+
368
+ </details>
369
+
370
+ <details>
371
+ <summary><b>Good to know</b></summary>
372
+
373
+ - Profiles of earlier versions convert on the first start, and their files stay untouched
374
+ ([details](https://github.com/MaestroOfAutomation/AntidetectBrowserSolution/blob/main/antidetect/legacy/README.md)).
375
+ - Profiles on one computer share its GPU, screen and fonts: they differ by storage, IP,
376
+ timezone and language.
377
+ - Google Chrome ignores `--load-extension` since version 137. The app loads the `extensions`
378
+ folder with a feature flag that Google may remove. Then install extensions from the Chrome Web
379
+ Store inside a profile, or use Chromium.
380
+ - On macOS Chrome keeps the system UI language for `Intl`. `navigator.languages` and
381
+ `Accept-Language` follow the proxy.
382
+
383
+ </details>
384
+
385
+ ## Community
386
+
387
+ Questions, ideas and news: [Telegram](https://t.me/maestroofautomation).
388
+
389
+ ## Development
390
+
391
+ ```bash
392
+ pip install -e ".[dev]"
393
+ pytest -q && ruff check .
394
+ ```
395
+
396
+ Every pull request runs the tests on Windows, macOS and Linux. Changes:
397
+ [CHANGELOG.md](https://github.com/MaestroOfAutomation/AntidetectBrowserSolution/blob/main/CHANGELOG.md).
398
+
399
+ ## License
400
+
401
+ [MIT](https://github.com/MaestroOfAutomation/AntidetectBrowserSolution/blob/main/LICENSE)
@@ -0,0 +1,29 @@
1
+ from loguru import logger
2
+
3
+ from antidetect.library import Antidetect, AsyncAntidetect
4
+ from antidetect.manager import ProfileManager
5
+ from antidetect.store import Store
6
+ from antidetect.structures import (
7
+ BrowserKind,
8
+ Profile,
9
+ ProxyEntry,
10
+ Settings,
11
+ WebRtcPolicy,
12
+ )
13
+
14
+ __version__ = '2.1.0'
15
+
16
+ # A library stays quiet until the app enables it: logger.enable('antidetect').
17
+ logger.disable('antidetect')
18
+
19
+ __all__ = [
20
+ 'Antidetect',
21
+ 'AsyncAntidetect',
22
+ 'BrowserKind',
23
+ 'Profile',
24
+ 'ProfileManager',
25
+ 'ProxyEntry',
26
+ 'Settings',
27
+ 'Store',
28
+ 'WebRtcPolicy',
29
+ ]
@@ -0,0 +1,19 @@
1
+ from antidetect.cli import Cli
2
+
3
+
4
+ def main():
5
+ """
6
+ Run the command line.
7
+ """
8
+ Cli().run()
9
+
10
+
11
+ def main_gui():
12
+ """
13
+ Open the GUI of a shortcut, in a window of its own when pywebview is installed.
14
+ """
15
+ Cli().run(['gui', '--native'] if Cli.is_native_available() else ['gui'])
16
+
17
+
18
+ if __name__ == '__main__':
19
+ main()