Metadata-Version: 2.5
Name: invisible_core
Version: 63.68.0
Summary: Pure config for a stealth Firefox profile: seed -> fingerprint -> prefs, engine download, proxy, geo, and the Juggler client the wrappers drive it with. Zero Playwright.
Project-URL: Homepage, https://github.com/oss-invisible/core
Project-URL: Repository, https://github.com/oss-invisible/core
Project-URL: Issues, https://github.com/oss-invisible/core/issues
Author-email: feder-cr <85809106+feder-cr@users.noreply.github.com>
License-Expression: MIT AND Apache-2.0
License-File: LICENSE
License-File: LICENSE-APACHE
Keywords: anti-detect,automation,browser,fingerprint,firefox,privacy,stealth
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
Classifier: Topic :: Software Development :: Testing
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: maxminddb>=2.2
Requires-Dist: platformdirs>=4
Requires-Dist: psutil>=5.9
Requires-Dist: requests[socks]>=2.31
Requires-Dist: tzdata>=2024.1
Provides-Extra: dev
Requires-Dist: build>=1; extra == 'dev'
Requires-Dist: pytest-mock>=3; extra == 'dev'
Requires-Dist: pytest-rerunfailures>=14; extra == 'dev'
Requires-Dist: pytest-timeout>=2; extra == 'dev'
Requires-Dist: pytest-xdist>=3; extra == 'dev'
Requires-Dist: pytest>=7; extra == 'dev'
Requires-Dist: responses>=0.24; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# invisible_core

Pure config for a patched Firefox stealth profile - **zero Playwright dependency**.

`seed → fingerprint profile → Firefox prefs`, plus patched-binary download,
proxy config, geo/timezone resolution, and `invisible_core.juggler`: the client
that drives the engine over its own protocol, with the human input rhythm, which
every wrapper below shares instead of carrying a copy. Importing it does not start a browser,
which is the point: the same fingerprint config backs an automation wrapper and,
through it, an MCP server, without either depending on the other.

(It backed a desktop profile manager too, until that repository was deleted on
2026-08-18. The package it published, `invisible-firefox`, is still on PyPI.)

The shared foundation used by:

- **[invisible_playwright](https://github.com/oss-invisible/playwright)** - the
  Playwright automation wrapper (`InvisiblePlaywright`).
- **[invisible_selenium](https://github.com/oss-invisible/selenium)** and
  **[invisible_puppeteer](https://github.com/oss-invisible/puppeteer)** - the
  Selenium and pyppeteer APIs on the same engine.

And through it, for anyone who would rather prompt than script:

- **[invisible-playwright-mcp](https://github.com/oss-invisible/playwright_mcp)**
  - the wrapper as an MCP server, for a client that brings its own model.
- **[AIHawk](https://github.com/feder-cr/AIHawk)** - an interface and a model, from
  one command.

The engine itself lives in
[firefox_antidetect_patch](https://github.com/oss-invisible/firefox_antidetect_patch),
a Firefox patched at the C++ source level so the fingerprint is produced by the
browser instead of injected into the page.

```bash
uv add invisible-core
```

```python
from invisible_core import (ensure_binary, generate_profile, prepare_session_geo,
                            translate_profile_to_prefs)

profile = generate_profile(seed=42)        # deterministic Bayesian fingerprint
geo     = prepare_session_geo("auto", None)  # zone and language of the exit (here, this machine's public IP)
prefs   = translate_profile_to_prefs(profile, locale=geo.locale, timezone=geo.timezone)
binary  = ensure_binary()                   # path to the patched Firefox binary
```

Same seed → same fingerprint, every time. The timezone is required: a session
without one would run on the host's own zone.

## Asking for less than the retail does

The core describes a retail Firefox, and where the retail does something the core does not change it. A caller can ask for less, by name, and
the core writes that as a declaration. `compose_session_prefs(profile, preload_newtab=False)` (in the Playwright wrapper:
`InvisiblePlaywright(preload_newtab=False)`) turns off the New Tab page that every retail Firefox keeps preloaded in a process of its own (about 200 MB,
and a second process for a Mozilla site beside it): the core writes `browser.newtab.preload` false. `None`, the default, writes nothing and
leaves the retail's behaviour; `True` writes the retail's value; a `browser.newtab.preload` in `extra_prefs` wins over the option.

## What the fields actually mean

Which surfaces a browser fingerprint is made of, what each one gives away, and why
consistency between them matters more than any single value, is written up at
**[the invisible_playwright wiki](https://github.com/oss-invisible/playwright/wiki)**.
Those pages are about the problem, not about this package, and several of them
record something we got wrong first. A few that document the exact fields this
package generates:

- [Pinning fingerprint fields](https://github.com/oss-invisible/playwright/blob/main/docs/pinning.md) -
  how `pin=` interacts with the Bayesian sampler, and which combinations it refuses
  because they don't occur on real hardware.
- [How to make Linux and macOS report real Windows fonts](https://github.com/oss-invisible/playwright/blob/main/docs/bundled-fonts-cross-platform.md) -
  the font side of `generate_profile`, and why the family list is bundled rather than
  sampled from the host.
- [Canvas and WebGL fingerprints across OSes](https://github.com/oss-invisible/playwright/blob/main/docs/canvas-webgl-cross-platform-consistency.md) -
  how the same seed gives the same canvas output on every host: 2D canvas is drawn on the CPU
  (`gfx.canvas.accelerated` is always false) and noise is projected only when WebGL and WebGPU
  pixels are read back, deterministically from the seed. Text and GPU raster can still differ
  slightly between Linux and Windows hosts; the PNG itself is not rewritten.
- [Playwright timezone does not match the proxy IP](https://github.com/oss-invisible/playwright/blob/main/docs/timezone-proxy-mismatch.md) -
  the surfaces this package's geo/timezone resolution has to keep in agreement.

---

<p align="center">
  <a href="https://github.com/oss-invisible/core/actions/workflows/ci.yml"><img src="https://github.com/oss-invisible/core/actions/workflows/ci.yml/badge.svg" alt="ci"></a>
</p>
