invisible-core 18.0.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 (55) hide show
  1. invisible_core-18.0.0/.gitignore +11 -0
  2. invisible_core-18.0.0/LICENSE +21 -0
  3. invisible_core-18.0.0/PKG-INFO +58 -0
  4. invisible_core-18.0.0/README.md +23 -0
  5. invisible_core-18.0.0/pyproject.toml +88 -0
  6. invisible_core-18.0.0/src/invisible_core/__init__.py +109 -0
  7. invisible_core-18.0.0/src/invisible_core/__main__.py +759 -0
  8. invisible_core-18.0.0/src/invisible_core/_fpforge/__init__.py +26 -0
  9. invisible_core-18.0.0/src/invisible_core/_fpforge/_network.py +144 -0
  10. invisible_core-18.0.0/src/invisible_core/_fpforge/_sampler.py +349 -0
  11. invisible_core-18.0.0/src/invisible_core/_fpforge/data/browsing_pool.json +64 -0
  12. invisible_core-18.0.0/src/invisible_core/_fpforge/data/cpt_audio_given_class.json +61 -0
  13. invisible_core-18.0.0/src/invisible_core/_fpforge/data/cpt_browsing_given_class.json +138 -0
  14. invisible_core-18.0.0/src/invisible_core/_fpforge/data/cpt_codec_given_class.json +78 -0
  15. invisible_core-18.0.0/src/invisible_core/_fpforge/data/cpt_hwc_given_class.json +50 -0
  16. invisible_core-18.0.0/src/invisible_core/_fpforge/data/cpt_hwc_given_class_tier.json +386 -0
  17. invisible_core-18.0.0/src/invisible_core/_fpforge/data/cpt_intra_tier_given_class.json +17 -0
  18. invisible_core-18.0.0/src/invisible_core/_fpforge/data/cpt_msaa_given_class.json +16 -0
  19. invisible_core-18.0.0/src/invisible_core/_fpforge/data/cpt_msaa_given_class_screen.json +47 -0
  20. invisible_core-18.0.0/src/invisible_core/_fpforge/data/cpt_screen_given_class.json +54 -0
  21. invisible_core-18.0.0/src/invisible_core/_fpforge/data/cpt_screen_given_class_tier.json +987 -0
  22. invisible_core-18.0.0/src/invisible_core/_fpforge/data/cpt_storage_given_class.json +60 -0
  23. invisible_core-18.0.0/src/invisible_core/_fpforge/data/cpt_storage_given_class_tier.json +473 -0
  24. invisible_core-18.0.0/src/invisible_core/_fpforge/data/ff_win_distributions.json +650 -0
  25. invisible_core-18.0.0/src/invisible_core/_fpforge/data/prior_audio.json +17 -0
  26. invisible_core-18.0.0/src/invisible_core/_fpforge/data/priors_independent.json +14 -0
  27. invisible_core-18.0.0/src/invisible_core/_fpforge/data/webgl_gpu_pool.json +476 -0
  28. invisible_core-18.0.0/src/invisible_core/_fpforge/data/webgl_renderer_pool.json +1782 -0
  29. invisible_core-18.0.0/src/invisible_core/_fpforge/data/win_hw_marginals.json +469 -0
  30. invisible_core-18.0.0/src/invisible_core/_fpforge/profile.py +257 -0
  31. invisible_core-18.0.0/src/invisible_core/_geo.py +268 -0
  32. invisible_core-18.0.0/src/invisible_core/_headless.py +178 -0
  33. invisible_core-18.0.0/src/invisible_core/_pin.py +844 -0
  34. invisible_core-18.0.0/src/invisible_core/_proxy.py +56 -0
  35. invisible_core-18.0.0/src/invisible_core/_version.py +17 -0
  36. invisible_core-18.0.0/src/invisible_core/_webgl_personas.py +202 -0
  37. invisible_core-18.0.0/src/invisible_core/config.py +112 -0
  38. invisible_core-18.0.0/src/invisible_core/constants.py +98 -0
  39. invisible_core-18.0.0/src/invisible_core/data/font-map.json +1846 -0
  40. invisible_core-18.0.0/src/invisible_core/download.py +558 -0
  41. invisible_core-18.0.0/src/invisible_core/launch.py +153 -0
  42. invisible_core-18.0.0/src/invisible_core/prefs.py +664 -0
  43. invisible_core-18.0.0/src/invisible_core/py.typed +0 -0
  44. invisible_core-18.0.0/src/invisible_core/seal.json +1 -0
  45. invisible_core-18.0.0/src/invisible_core/seal.py +648 -0
  46. invisible_core-18.0.0/tests/test_doctor_fix.py +977 -0
  47. invisible_core-18.0.0/tests/test_launch.py +84 -0
  48. invisible_core-18.0.0/tests/test_pin.py +1095 -0
  49. invisible_core-18.0.0/tests/test_release_gate.py +955 -0
  50. invisible_core-18.0.0/tests/test_release_wiring.py +233 -0
  51. invisible_core-18.0.0/tests/test_seal_cache.py +374 -0
  52. invisible_core-18.0.0/tests/test_seal_download.py +513 -0
  53. invisible_core-18.0.0/tests/test_seal_engine_guard.py +517 -0
  54. invisible_core-18.0.0/tests/test_seal_real_engines.py +197 -0
  55. invisible_core-18.0.0/tests/test_seal_version.py +355 -0
@@ -0,0 +1,11 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ build/
5
+ dist/
6
+ .pytest_cache/
7
+ .venv/
8
+ venv/
9
+ *.bak
10
+ *-bak
11
+ *._backup
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 stealthfox contributors
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,58 @@
1
+ Metadata-Version: 2.4
2
+ Name: invisible-core
3
+ Version: 18.0.0
4
+ Summary: Pure config for a stealth Firefox profile: seed -> fingerprint -> prefs, engine download, proxy, geo. Zero Playwright.
5
+ Project-URL: Homepage, https://github.com/feder-cr/invisible_core
6
+ Project-URL: Repository, https://github.com/feder-cr/invisible_core
7
+ Project-URL: Issues, https://github.com/feder-cr/invisible_core/issues
8
+ Author-email: feder-cr <85809106+feder-cr@users.noreply.github.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: anti-detect,automation,browser,fingerprint,firefox,privacy,stealth
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: MacOS
15
+ Classifier: Operating System :: Microsoft :: Windows
16
+ Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
22
+ Classifier: Topic :: Software Development :: Testing
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.11
25
+ Requires-Dist: maxminddb>=2.2
26
+ Requires-Dist: platformdirs>=4
27
+ Requires-Dist: requests[socks]>=2.31
28
+ Requires-Dist: tzdata>=2024.1
29
+ Provides-Extra: dev
30
+ Requires-Dist: build>=1; extra == 'dev'
31
+ Requires-Dist: pytest-mock>=3; extra == 'dev'
32
+ Requires-Dist: pytest>=7; extra == 'dev'
33
+ Requires-Dist: responses>=0.24; extra == 'dev'
34
+ Description-Content-Type: text/markdown
35
+
36
+ # invisible_core
37
+
38
+ Pure config for a patched Firefox stealth profile - **zero Playwright dependency**.
39
+
40
+ `seed → fingerprint profile → Firefox prefs`, plus patched-binary download,
41
+ proxy config, and geo/timezone resolution. This is the shared foundation used by:
42
+
43
+ - **invisible_playwright** - the Playwright automation wrapper (`InvisiblePlaywright`).
44
+ - **invisible_firefox** - the antidetect profile manager (launches the binary directly).
45
+
46
+ ```bash
47
+ pip install invisible-core
48
+ ```
49
+
50
+ ```python
51
+ from invisible_core import generate_profile, translate_profile_to_prefs, ensure_binary
52
+
53
+ profile = generate_profile(seed=42) # deterministic Bayesian fingerprint
54
+ prefs = translate_profile_to_prefs(profile) # dict of Firefox user prefs
55
+ binary = ensure_binary() # path to the patched Firefox binary
56
+ ```
57
+
58
+ Same seed → same fingerprint, every time.
@@ -0,0 +1,23 @@
1
+ # invisible_core
2
+
3
+ Pure config for a patched Firefox stealth profile - **zero Playwright dependency**.
4
+
5
+ `seed → fingerprint profile → Firefox prefs`, plus patched-binary download,
6
+ proxy config, and geo/timezone resolution. This is the shared foundation used by:
7
+
8
+ - **invisible_playwright** - the Playwright automation wrapper (`InvisiblePlaywright`).
9
+ - **invisible_firefox** - the antidetect profile manager (launches the binary directly).
10
+
11
+ ```bash
12
+ pip install invisible-core
13
+ ```
14
+
15
+ ```python
16
+ from invisible_core import generate_profile, translate_profile_to_prefs, ensure_binary
17
+
18
+ profile = generate_profile(seed=42) # deterministic Bayesian fingerprint
19
+ prefs = translate_profile_to_prefs(profile) # dict of Firefox user prefs
20
+ binary = ensure_binary() # path to the patched Firefox binary
21
+ ```
22
+
23
+ Same seed → same fingerprint, every time.
@@ -0,0 +1,88 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "invisible-core"
7
+ # Derived from the seal (see src/invisible_core/_version.py): the tag number of
8
+ # the engine this core is sealed to, so a binary bump always moves the version
9
+ # string pip compares before it decides whether to reinstall. A core-only fix
10
+ # against the same engine moves CORE_REVISION instead, by hand - and
11
+ # scripts/version_gate.py refuses to publish content that changed under a
12
+ # version string that did not.
13
+ dynamic = ["version"]
14
+ description = "Pure config for a stealth Firefox profile: seed -> fingerprint -> prefs, engine download, proxy, geo. Zero Playwright."
15
+ readme = "README.md"
16
+ requires-python = ">=3.11"
17
+ license = "MIT"
18
+ license-files = ["LICENSE"]
19
+ authors = [{ name = "feder-cr", email = "85809106+feder-cr@users.noreply.github.com" }]
20
+ keywords = [
21
+ "firefox",
22
+ "stealth",
23
+ "anti-detect",
24
+ "fingerprint",
25
+ "browser",
26
+ "automation",
27
+ "privacy",
28
+ ]
29
+ # No `License :: OSI Approved :: MIT License` classifier: PEP 639 says the
30
+ # License-Expression field above is the declaration, and a build tool must not
31
+ # add the classifier beside it.
32
+ classifiers = [
33
+ "Development Status :: 4 - Beta",
34
+ "Intended Audience :: Developers",
35
+ "Operating System :: Microsoft :: Windows",
36
+ "Operating System :: POSIX :: Linux",
37
+ "Operating System :: MacOS",
38
+ "Programming Language :: Python :: 3",
39
+ "Programming Language :: Python :: 3.11",
40
+ "Programming Language :: Python :: 3.12",
41
+ "Programming Language :: Python :: 3.13",
42
+ "Topic :: Internet :: WWW/HTTP :: Browsers",
43
+ "Topic :: Software Development :: Testing",
44
+ "Typing :: Typed",
45
+ ]
46
+ # No direct URL (`name @ git+https://...`) may appear here. A public index
47
+ # rejects an upload whose Requires-Dist carries one, and a direct reference
48
+ # carries no version specifier, so `pip check` has nothing to compare and
49
+ # reports a definitively broken environment as healthy.
50
+ dependencies = [
51
+ "platformdirs>=4",
52
+ "requests[socks]>=2.31",
53
+ "maxminddb>=2.2",
54
+ "tzdata>=2024.1",
55
+ ]
56
+
57
+ [project.optional-dependencies]
58
+ dev = ["pytest>=7", "pytest-mock>=3", "responses>=0.24", "build>=1"]
59
+
60
+ [project.scripts]
61
+ invisible-core = "invisible_core.__main__:main"
62
+
63
+ [project.urls]
64
+ Homepage = "https://github.com/feder-cr/invisible_core"
65
+ Repository = "https://github.com/feder-cr/invisible_core"
66
+ Issues = "https://github.com/feder-cr/invisible_core/issues"
67
+
68
+ [tool.pytest.ini_options]
69
+ markers = [
70
+ "unit: pure-logic tests, no I/O or external deps",
71
+ "integration: multi-module tests, no browser",
72
+ ]
73
+ addopts = "-m 'not slow'"
74
+
75
+ [tool.hatch.version]
76
+ source = "code"
77
+ path = "src/invisible_core/_version.py"
78
+ expression = "__version__"
79
+
80
+ [tool.hatch.build.targets.wheel]
81
+ packages = ["src/invisible_core"]
82
+ exclude = ["*.bak", "*-bak"]
83
+
84
+ # PUBLISHED.json and scripts/ are deliberately absent from both targets. The
85
+ # ledger records a digest of what ships, so it must never be part of what ships:
86
+ # a self-referential ledger would invalidate its own digest on every release.
87
+ [tool.hatch.build.targets.sdist]
88
+ include = ["src/invisible_core", "tests", "README.md", "LICENSE", "pyproject.toml"]
@@ -0,0 +1,109 @@
1
+ """invisible_core - pure config for a patched Firefox stealth profile.
2
+
3
+ Zero Playwright dependency: seed -> fingerprint profile -> Firefox prefs,
4
+ binary download, proxy config, geo/timezone resolution. This is the shared
5
+ foundation used by both:
6
+ - invisible_playwright (the Playwright automation wrapper), and
7
+ - invisible_firefox (the antidetect profile manager, launches the binary directly).
8
+
9
+ Quickstart:
10
+
11
+ from invisible_core import generate_profile, translate_profile_to_prefs, ensure_binary
12
+
13
+ profile = generate_profile(seed=42)
14
+ prefs = translate_profile_to_prefs(profile) # dict for firefox user prefs
15
+ binary = ensure_binary() # path to the patched Firefox
16
+ """
17
+ from ._fpforge import (
18
+ AudioProfile,
19
+ CodecProfile,
20
+ GPUProfile,
21
+ HardwareProfile,
22
+ Profile,
23
+ ScreenProfile,
24
+ WebGLProfile,
25
+ generate_profile,
26
+ )
27
+ from ._webgl_personas import forced_gpu_class, select_persona, render_noise_seed
28
+ from .prefs import translate_profile_to_prefs
29
+ from .download import ensure_binary, ensure_geoip_mmdb
30
+ from ._geo import (
31
+ GeoTimezoneError,
32
+ discover_egress_ip,
33
+ ip_to_timezone,
34
+ prepare_session_geo,
35
+ resolve_session_locale,
36
+ resolve_session_timezone,
37
+ )
38
+ from ._headless import cloak_prefs, make_virtual_display
39
+ from ._proxy import configure_proxy
40
+ from .config import get_default_args, get_default_stealth_prefs
41
+ from .constants import BINARY_VERSION, FIREFOX_UPSTREAM_VERSION
42
+ from .launch import LaunchPlan, build_launch_env, build_launch_plan, write_user_js
43
+
44
+ # One headline version, and it is the honest one.
45
+ #
46
+ # `__version__` is DERIVED from the seal this package ships (invisible_core/
47
+ # seal.json -> _version.py), so it describes the code that is about to run. That
48
+ # is the number to put in a bug report, and the number both consumers pin with
49
+ # `invisible-core==`.
50
+ #
51
+ # `__install_record_version__` is a different fact: what the installer wrote into
52
+ # the .dist-info when the distribution was put there. It can disagree - measured
53
+ # in this tree: record 0.1.0, files 18.0.0 - and when it does, the record is the
54
+ # stale one while the files are what executes. It is kept because `pip`, `pip
55
+ # check` and the doctor's "STALE RECORD" line all read it, and diagnosing that
56
+ # skew needs both numbers. It is named so it cannot be mistaken for the version.
57
+ from ._version import __version__
58
+
59
+ from importlib.metadata import PackageNotFoundError, version as _pkg_version
60
+
61
+ try:
62
+ __install_record_version__ = _pkg_version("invisible-core")
63
+ except PackageNotFoundError:
64
+ # Running from a source checkout with no install record at all.
65
+ __install_record_version__ = ""
66
+
67
+ __all__ = [
68
+ # fingerprint generation
69
+ "generate_profile",
70
+ "Profile",
71
+ "GPUProfile",
72
+ "ScreenProfile",
73
+ "HardwareProfile",
74
+ "AudioProfile",
75
+ "CodecProfile",
76
+ "WebGLProfile",
77
+ # webgl personas
78
+ "forced_gpu_class",
79
+ "select_persona",
80
+ "render_noise_seed",
81
+ # prefs
82
+ "translate_profile_to_prefs",
83
+ "get_default_stealth_prefs",
84
+ "get_default_args",
85
+ # binary + geoip
86
+ "ensure_binary",
87
+ "ensure_geoip_mmdb",
88
+ # geo / timezone
89
+ "resolve_session_timezone",
90
+ "resolve_session_locale",
91
+ "prepare_session_geo",
92
+ "discover_egress_ip",
93
+ "ip_to_timezone",
94
+ "GeoTimezoneError",
95
+ # proxy + headless helpers
96
+ "configure_proxy",
97
+ "cloak_prefs",
98
+ "make_virtual_display",
99
+ # direct-launch helpers (shared by the wrapper + the profile manager)
100
+ "build_launch_plan",
101
+ "LaunchPlan",
102
+ "build_launch_env",
103
+ "write_user_js",
104
+ # constants
105
+ "BINARY_VERSION",
106
+ "FIREFOX_UPSTREAM_VERSION",
107
+ "__version__",
108
+ "__install_record_version__",
109
+ ]