jumpy-lion 0.1.6-beta.7 → 1.0.0-beta.0

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 (232) hide show
  1. package/README.md +1 -607
  2. package/browser/fonts/macos-bundle/40-macos-aliases.conf +515 -0
  3. package/browser/fonts/macos-bundle/README.md +24 -0
  4. package/browser/fonts/macos-bundle/install.sh +83 -0
  5. package/dist/browser-controller.d.ts +47 -4
  6. package/dist/browser-controller.d.ts.map +1 -1
  7. package/dist/browser-controller.js +219 -278
  8. package/dist/browser-controller.js.map +1 -1
  9. package/dist/browser-plugin.d.ts +82 -110
  10. package/dist/browser-plugin.d.ts.map +1 -1
  11. package/dist/browser-plugin.js +376 -379
  12. package/dist/browser-plugin.js.map +1 -1
  13. package/dist/browser-process/align-fingerprint-config.d.ts +36 -0
  14. package/dist/browser-process/align-fingerprint-config.d.ts.map +1 -0
  15. package/dist/browser-process/align-fingerprint-config.js +74 -0
  16. package/dist/browser-process/align-fingerprint-config.js.map +1 -0
  17. package/dist/browser-process/anti-detect-browser.d.ts +2 -2
  18. package/dist/browser-process/anti-detect-browser.js +7 -7
  19. package/dist/browser-process/anti-detect-config.d.ts +131 -2
  20. package/dist/browser-process/anti-detect-config.d.ts.map +1 -1
  21. package/dist/browser-process/anti-detect-config.js +337 -127
  22. package/dist/browser-process/anti-detect-config.js.map +1 -1
  23. package/dist/browser-process/browser.d.ts +25 -92
  24. package/dist/browser-process/browser.d.ts.map +1 -1
  25. package/dist/browser-process/browser.js +429 -73
  26. package/dist/browser-process/browser.js.map +1 -1
  27. package/dist/browser-process/fingerprint-config.d.ts +146 -0
  28. package/dist/browser-process/fingerprint-config.d.ts.map +1 -0
  29. package/dist/browser-process/fingerprint-config.js +308 -0
  30. package/dist/browser-process/fingerprint-config.js.map +1 -0
  31. package/dist/browser-process/get-chrome-executable.d.ts +6 -0
  32. package/dist/browser-process/get-chrome-executable.d.ts.map +1 -1
  33. package/dist/browser-process/get-chrome-executable.js +79 -4
  34. package/dist/browser-process/get-chrome-executable.js.map +1 -1
  35. package/dist/browser-process/gpu-family-profiles.d.ts +58 -0
  36. package/dist/browser-process/gpu-family-profiles.d.ts.map +1 -0
  37. package/dist/browser-process/gpu-family-profiles.js +480 -0
  38. package/dist/browser-process/gpu-family-profiles.js.map +1 -0
  39. package/dist/browser-process/launch-options.d.ts +301 -0
  40. package/dist/browser-process/launch-options.d.ts.map +1 -0
  41. package/dist/browser-process/launch-options.js +2 -0
  42. package/dist/browser-process/launch-options.js.map +1 -0
  43. package/dist/browser-process/port-allocator.d.ts +64 -0
  44. package/dist/browser-process/port-allocator.d.ts.map +1 -0
  45. package/dist/browser-process/port-allocator.js +198 -0
  46. package/dist/browser-process/port-allocator.js.map +1 -0
  47. package/dist/browser-process/process.d.ts +85 -0
  48. package/dist/browser-process/process.d.ts.map +1 -1
  49. package/dist/browser-process/process.js +235 -19
  50. package/dist/browser-process/process.js.map +1 -1
  51. package/dist/browser-process/signal-cleanup.d.ts +40 -0
  52. package/dist/browser-process/signal-cleanup.d.ts.map +1 -0
  53. package/dist/browser-process/signal-cleanup.js +105 -0
  54. package/dist/browser-process/signal-cleanup.js.map +1 -0
  55. package/dist/browser-process/widevine-cdm.d.ts +144 -0
  56. package/dist/browser-process/widevine-cdm.d.ts.map +1 -0
  57. package/dist/browser-process/widevine-cdm.js +298 -0
  58. package/dist/browser-process/widevine-cdm.js.map +1 -0
  59. package/dist/browser-profiles/chrome/populate-profile.d.ts.map +1 -1
  60. package/dist/browser-profiles/chrome/populate-profile.js +21 -22
  61. package/dist/browser-profiles/chrome/populate-profile.js.map +1 -1
  62. package/dist/connection/cdp-reconnection.d.ts +50 -0
  63. package/dist/connection/cdp-reconnection.d.ts.map +1 -0
  64. package/dist/connection/cdp-reconnection.js +75 -0
  65. package/dist/connection/cdp-reconnection.js.map +1 -0
  66. package/dist/connection/page-session.d.ts +114 -0
  67. package/dist/connection/page-session.d.ts.map +1 -0
  68. package/dist/connection/page-session.js +237 -0
  69. package/dist/connection/page-session.js.map +1 -0
  70. package/dist/connection/session-client.d.ts +34 -0
  71. package/dist/connection/session-client.d.ts.map +1 -0
  72. package/dist/connection/session-client.js +129 -0
  73. package/dist/connection/session-client.js.map +1 -0
  74. package/dist/crawler.d.ts +9 -88
  75. package/dist/crawler.d.ts.map +1 -1
  76. package/dist/crawler.js +157 -8
  77. package/dist/crawler.js.map +1 -1
  78. package/dist/fingerprinting/fingerprint-injector.d.ts +24 -114
  79. package/dist/fingerprinting/fingerprint-injector.d.ts.map +1 -1
  80. package/dist/fingerprinting/fingerprint-injector.js +305 -611
  81. package/dist/fingerprinting/fingerprint-injector.js.map +1 -1
  82. package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.d.ts +1 -1
  83. package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.d.ts.map +1 -1
  84. package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.js +16 -14
  85. package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.js.map +1 -1
  86. package/dist/fingerprinting/fingerprint-overrides/index.d.ts +6 -2
  87. package/dist/fingerprinting/fingerprint-overrides/index.d.ts.map +1 -1
  88. package/dist/fingerprinting/fingerprint-overrides/index.js +6 -2
  89. package/dist/fingerprinting/fingerprint-overrides/index.js.map +1 -1
  90. package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.d.ts +1 -1
  91. package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.js +4 -4
  92. package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.js.map +1 -1
  93. package/dist/fingerprinting/fingerprint-overrides/locale-spoofing.js +4 -4
  94. package/dist/fingerprinting/fingerprint-overrides/navigator-override.d.ts +18 -0
  95. package/dist/fingerprinting/fingerprint-overrides/navigator-override.d.ts.map +1 -0
  96. package/dist/fingerprinting/fingerprint-overrides/navigator-override.js +136 -0
  97. package/dist/fingerprinting/fingerprint-overrides/navigator-override.js.map +1 -0
  98. package/dist/fingerprinting/fingerprint-overrides/override.d.ts +151 -0
  99. package/dist/fingerprinting/fingerprint-overrides/override.d.ts.map +1 -0
  100. package/dist/fingerprinting/fingerprint-overrides/override.js +14 -0
  101. package/dist/fingerprinting/fingerprint-overrides/override.js.map +1 -0
  102. package/dist/fingerprinting/fingerprint-overrides/platform-consistency.d.ts.map +1 -1
  103. package/dist/fingerprinting/fingerprint-overrides/platform-consistency.js +46 -15
  104. package/dist/fingerprinting/fingerprint-overrides/platform-consistency.js.map +1 -1
  105. package/dist/fingerprinting/fingerprint-overrides/registry.d.ts +43 -0
  106. package/dist/fingerprinting/fingerprint-overrides/registry.d.ts.map +1 -0
  107. package/dist/fingerprinting/fingerprint-overrides/registry.js +342 -0
  108. package/dist/fingerprinting/fingerprint-overrides/registry.js.map +1 -0
  109. package/dist/fingerprinting/fingerprint-overrides/screen-override.d.ts +16 -0
  110. package/dist/fingerprinting/fingerprint-overrides/screen-override.d.ts.map +1 -0
  111. package/dist/fingerprinting/fingerprint-overrides/screen-override.js +175 -0
  112. package/dist/fingerprinting/fingerprint-overrides/screen-override.js.map +1 -0
  113. package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.d.ts +1 -1
  114. package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.js +4 -4
  115. package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.js.map +1 -1
  116. package/dist/fingerprinting/fingerprint-overrides/stealth-script.d.ts.map +1 -1
  117. package/dist/fingerprinting/fingerprint-overrides/stealth-script.js +75 -9
  118. package/dist/fingerprinting/fingerprint-overrides/stealth-script.js.map +1 -1
  119. package/dist/fingerprinting/fingerprint-overrides/ua-ch.d.ts +1 -1
  120. package/dist/fingerprinting/fingerprint-overrides/ua-ch.d.ts.map +1 -1
  121. package/dist/fingerprinting/fingerprint-overrides/ua-ch.js +34 -20
  122. package/dist/fingerprinting/fingerprint-overrides/ua-ch.js.map +1 -1
  123. package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.d.ts.map +1 -1
  124. package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.js +25 -6
  125. package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.js.map +1 -1
  126. package/dist/fingerprinting/fingerprint-overrides/webrtc-spoofing.js +1 -1
  127. package/dist/fingerprinting/hardware-realism.d.ts +83 -0
  128. package/dist/fingerprinting/hardware-realism.d.ts.map +1 -0
  129. package/dist/fingerprinting/hardware-realism.js +156 -0
  130. package/dist/fingerprinting/hardware-realism.js.map +1 -0
  131. package/dist/fingerprinting/injection-planner.d.ts +133 -0
  132. package/dist/fingerprinting/injection-planner.d.ts.map +1 -0
  133. package/dist/fingerprinting/injection-planner.js +497 -0
  134. package/dist/fingerprinting/injection-planner.js.map +1 -0
  135. package/dist/fingerprinting/locale-resolver.d.ts +8 -1
  136. package/dist/fingerprinting/locale-resolver.d.ts.map +1 -1
  137. package/dist/fingerprinting/locale-resolver.js +26 -3
  138. package/dist/fingerprinting/locale-resolver.js.map +1 -1
  139. package/dist/fingerprinting/non-apify-fingerprint-generator.d.ts +4 -4
  140. package/dist/fingerprinting/non-apify-fingerprint-generator.d.ts.map +1 -1
  141. package/dist/fingerprinting/non-apify-fingerprint-generator.js +24 -58
  142. package/dist/fingerprinting/non-apify-fingerprint-generator.js.map +1 -1
  143. package/dist/fingerprinting/non-apify-profiles.json +10515 -8494
  144. package/dist/fingerprinting/os-consistency.d.ts +28 -0
  145. package/dist/fingerprinting/os-consistency.d.ts.map +1 -0
  146. package/dist/fingerprinting/os-consistency.js +45 -0
  147. package/dist/fingerprinting/os-consistency.js.map +1 -0
  148. package/dist/fingerprinting/profile-quality.d.ts +25 -0
  149. package/dist/fingerprinting/profile-quality.d.ts.map +1 -0
  150. package/dist/fingerprinting/profile-quality.js +310 -0
  151. package/dist/fingerprinting/profile-quality.js.map +1 -0
  152. package/dist/fingerprinting/profile-selector.d.ts +102 -0
  153. package/dist/fingerprinting/profile-selector.d.ts.map +1 -0
  154. package/dist/fingerprinting/profile-selector.js +168 -0
  155. package/dist/fingerprinting/profile-selector.js.map +1 -0
  156. package/dist/fingerprinting/ua-alignment.d.ts +83 -0
  157. package/dist/fingerprinting/ua-alignment.d.ts.map +1 -0
  158. package/dist/fingerprinting/ua-alignment.js +197 -0
  159. package/dist/fingerprinting/ua-alignment.js.map +1 -0
  160. package/dist/fingerprinting/ua-ch-brands.d.ts +88 -0
  161. package/dist/fingerprinting/ua-ch-brands.d.ts.map +1 -0
  162. package/dist/fingerprinting/ua-ch-brands.js +174 -0
  163. package/dist/fingerprinting/ua-ch-brands.js.map +1 -0
  164. package/dist/index.d.ts +5 -0
  165. package/dist/index.d.ts.map +1 -1
  166. package/dist/index.js +6 -0
  167. package/dist/index.js.map +1 -1
  168. package/dist/input/dropdown-selector.d.ts +90 -0
  169. package/dist/input/dropdown-selector.d.ts.map +1 -0
  170. package/dist/input/dropdown-selector.js +394 -0
  171. package/dist/input/dropdown-selector.js.map +1 -0
  172. package/dist/input/element-target.d.ts +152 -0
  173. package/dist/input/element-target.d.ts.map +1 -0
  174. package/dist/input/element-target.js +461 -0
  175. package/dist/input/element-target.js.map +1 -0
  176. package/dist/input/input-emulator.d.ts +85 -0
  177. package/dist/input/input-emulator.d.ts.map +1 -0
  178. package/dist/input/input-emulator.js +325 -0
  179. package/dist/input/input-emulator.js.map +1 -0
  180. package/dist/input/input-transport.d.ts +60 -0
  181. package/dist/input/input-transport.d.ts.map +1 -0
  182. package/dist/input/input-transport.js +28 -0
  183. package/dist/input/input-transport.js.map +1 -0
  184. package/dist/input/recording-transport.d.ts +32 -0
  185. package/dist/input/recording-transport.d.ts.map +1 -0
  186. package/dist/input/recording-transport.js +43 -0
  187. package/dist/input/recording-transport.js.map +1 -0
  188. package/dist/keyboard-layout.d.ts +2 -2
  189. package/dist/keyboard-layout.js +2 -2
  190. package/dist/navigation/page-navigation.d.ts +67 -0
  191. package/dist/navigation/page-navigation.d.ts.map +1 -0
  192. package/dist/navigation/page-navigation.js +122 -0
  193. package/dist/navigation/page-navigation.js.map +1 -0
  194. package/dist/network/network-watch.d.ts +110 -0
  195. package/dist/network/network-watch.d.ts.map +1 -0
  196. package/dist/network/network-watch.js +223 -0
  197. package/dist/network/network-watch.js.map +1 -0
  198. package/dist/page.d.ts +118 -104
  199. package/dist/page.d.ts.map +1 -1
  200. package/dist/page.js +311 -1130
  201. package/dist/page.js.map +1 -1
  202. package/dist/session/inject-hook.d.ts +24 -0
  203. package/dist/session/inject-hook.d.ts.map +1 -0
  204. package/dist/session/inject-hook.js +80 -0
  205. package/dist/session/inject-hook.js.map +1 -0
  206. package/dist/session/save.d.ts +21 -0
  207. package/dist/session/save.d.ts.map +1 -0
  208. package/dist/session/save.js +163 -0
  209. package/dist/session/save.js.map +1 -0
  210. package/dist/session/tar-data-dir.d.ts +18 -0
  211. package/dist/session/tar-data-dir.d.ts.map +1 -0
  212. package/dist/session/tar-data-dir.js +105 -0
  213. package/dist/session/tar-data-dir.js.map +1 -0
  214. package/dist/session/types.d.ts +80 -0
  215. package/dist/session/types.d.ts.map +1 -0
  216. package/dist/session/types.js +29 -0
  217. package/dist/session/types.js.map +1 -0
  218. package/dist/session-profile.d.ts +102 -0
  219. package/dist/session-profile.d.ts.map +1 -0
  220. package/dist/session-profile.js +163 -0
  221. package/dist/session-profile.js.map +1 -0
  222. package/dist/tsconfig.build.tsbuildinfo +1 -1
  223. package/package.json +17 -6
  224. package/scripts/postinstall.cjs +58 -0
  225. package/dist/fingerprinting/custom-fingerprint-injector.d.ts +0 -87
  226. package/dist/fingerprinting/custom-fingerprint-injector.d.ts.map +0 -1
  227. package/dist/fingerprinting/custom-fingerprint-injector.js +0 -342
  228. package/dist/fingerprinting/custom-fingerprint-injector.js.map +0 -1
  229. package/dist/launcher-wrap.d.ts +0 -10
  230. package/dist/launcher-wrap.d.ts.map +0 -1
  231. package/dist/launcher-wrap.js +0 -11
  232. package/dist/launcher-wrap.js.map +0 -1
@@ -0,0 +1,515 @@
1
+ <?xml version="1.0"?>
2
+ <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
3
+ <!--
4
+ macOS family-name aliases for Linux hosts running with a macOS fingerprint.
5
+
6
+ Why: Skia consults fontconfig when resolving font family names. On a Linux
7
+ host without these aliases, "Helvetica" would silently substitute to
8
+ DejaVu Sans / Liberation Sans, producing different glyph rasters and
9
+ measureText() widths than real macOS. That delta survives any pixel-noise
10
+ patch and is the dominant signal anti-bot vendors use to detect the
11
+ Linux-host-spoofing-Mac case.
12
+
13
+ How it works: fontconfig reads files in /etc/fonts/conf.d/ in numeric order.
14
+ When a process asks for "Helvetica", the <prefer> chain below redirects to
15
+ the freely-licensed clone .ttf bundled in the host system, and Skia
16
+ rasterizes from THAT file — producing glyph metrics close to (though never
17
+ identical to) CoreText's output for the same name.
18
+
19
+ Prerequisites (install via apt-get on Debian/Ubuntu):
20
+ fonts-texgyre (TeX Gyre Heros, Pagella, Bonum)
21
+ fonts-croscore (Arimo, Tinos, Cousine — Apache 2.0 metric clones)
22
+ fonts-inter (Inter — SIL OFL, SF Pro look-alike)
23
+ fonts-jetbrains-mono (JetBrains Mono — Apache 2.0)
24
+ fonts-urw-base35 (Nimbus Sans/Roman/Mono PS, P052, URW Gothic)
25
+ fonts-noto-core (Noto Sans/Serif)
26
+ fonts-noto-cjk (CJK glyph coverage)
27
+ fonts-noto-color-emoji (Apple Color Emoji replacement)
28
+ fonts-liberation (already in g2-test-actor; provides Liberation Sans/Mono/Serif)
29
+ fonts-dejavu-core (already; provides DejaVu Sans Mono / DejaVu Sans)
30
+ -->
31
+ <fontconfig>
32
+
33
+ <!-- ============================================================
34
+ Helvetica family
35
+ ============================================================ -->
36
+ <alias>
37
+ <family>Helvetica</family>
38
+ <prefer>
39
+ <family>TeX Gyre Heros</family>
40
+ <family>Nimbus Sans</family>
41
+ <family>Arimo</family>
42
+ </prefer>
43
+ </alias>
44
+ <alias>
45
+ <family>Helvetica Neue</family>
46
+ <prefer>
47
+ <family>TeX Gyre Heros</family>
48
+ <family>Nimbus Sans</family>
49
+ <family>Arimo</family>
50
+ </prefer>
51
+ </alias>
52
+
53
+ <!-- ============================================================
54
+ Arial / Times / Courier (cross-platform but Skia maps differ)
55
+ ============================================================ -->
56
+ <alias>
57
+ <family>Arial</family>
58
+ <prefer>
59
+ <family>Arimo</family>
60
+ <family>Liberation Sans</family>
61
+ </prefer>
62
+ </alias>
63
+ <alias>
64
+ <family>Arial Narrow</family>
65
+ <prefer>
66
+ <family>Arimo</family>
67
+ </prefer>
68
+ </alias>
69
+ <alias>
70
+ <family>Arial Black</family>
71
+ <prefer>
72
+ <family>Arimo</family>
73
+ </prefer>
74
+ </alias>
75
+ <alias>
76
+ <family>Times</family>
77
+ <prefer>
78
+ <family>Tinos</family>
79
+ <family>Liberation Serif</family>
80
+ <family>Nimbus Roman</family>
81
+ </prefer>
82
+ </alias>
83
+ <alias>
84
+ <family>Times New Roman</family>
85
+ <prefer>
86
+ <family>Tinos</family>
87
+ <family>Liberation Serif</family>
88
+ <family>Nimbus Roman</family>
89
+ </prefer>
90
+ </alias>
91
+ <alias>
92
+ <family>Courier</family>
93
+ <prefer>
94
+ <family>Cousine</family>
95
+ <family>Liberation Mono</family>
96
+ <family>Nimbus Mono PS</family>
97
+ </prefer>
98
+ </alias>
99
+ <alias>
100
+ <family>Courier New</family>
101
+ <prefer>
102
+ <family>Cousine</family>
103
+ <family>Liberation Mono</family>
104
+ </prefer>
105
+ </alias>
106
+
107
+ <!-- ============================================================
108
+ SF Pro family (San Francisco — modern macOS UI font)
109
+ ============================================================ -->
110
+ <alias>
111
+ <family>SF Pro</family>
112
+ <prefer>
113
+ <family>Inter</family>
114
+ </prefer>
115
+ </alias>
116
+ <alias>
117
+ <family>SF Pro Display</family>
118
+ <prefer>
119
+ <family>Inter</family>
120
+ </prefer>
121
+ </alias>
122
+ <alias>
123
+ <family>SF Pro Text</family>
124
+ <prefer>
125
+ <family>Inter</family>
126
+ </prefer>
127
+ </alias>
128
+ <alias>
129
+ <family>SF Mono</family>
130
+ <prefer>
131
+ <family>JetBrains Mono</family>
132
+ <family>DejaVu Sans Mono</family>
133
+ </prefer>
134
+ </alias>
135
+ <alias>
136
+ <family>-apple-system</family>
137
+ <prefer>
138
+ <family>Inter</family>
139
+ </prefer>
140
+ </alias>
141
+ <alias>
142
+ <family>BlinkMacSystemFont</family>
143
+ <prefer>
144
+ <family>Inter</family>
145
+ </prefer>
146
+ </alias>
147
+
148
+ <!-- ============================================================
149
+ Mac monospace family (Menlo / Monaco)
150
+ ============================================================ -->
151
+ <alias>
152
+ <family>Menlo</family>
153
+ <prefer>
154
+ <family>DejaVu Sans Mono</family>
155
+ <family>Liberation Mono</family>
156
+ </prefer>
157
+ </alias>
158
+ <alias>
159
+ <family>Monaco</family>
160
+ <prefer>
161
+ <family>Liberation Mono</family>
162
+ <family>DejaVu Sans Mono</family>
163
+ </prefer>
164
+ </alias>
165
+
166
+ <!-- ============================================================
167
+ Mac sans family (Geneva / Lucida Grande / Charcoal)
168
+ ============================================================ -->
169
+ <alias>
170
+ <family>Geneva</family>
171
+ <prefer>
172
+ <family>Liberation Sans</family>
173
+ <family>DejaVu Sans</family>
174
+ </prefer>
175
+ </alias>
176
+ <alias>
177
+ <family>Lucida Grande</family>
178
+ <prefer>
179
+ <family>DejaVu Sans</family>
180
+ <family>Liberation Sans</family>
181
+ </prefer>
182
+ </alias>
183
+ <alias>
184
+ <family>Charcoal</family>
185
+ <prefer>
186
+ <family>DejaVu Sans</family>
187
+ </prefer>
188
+ </alias>
189
+ <alias>
190
+ <family>Chicago</family>
191
+ <prefer>
192
+ <family>DejaVu Sans</family>
193
+ </prefer>
194
+ </alias>
195
+
196
+ <!-- ============================================================
197
+ Mac serif family (New York / Baskerville / Big Caslon)
198
+ ============================================================ -->
199
+ <alias>
200
+ <family>New York</family>
201
+ <prefer>
202
+ <family>Tinos</family>
203
+ <family>Liberation Serif</family>
204
+ </prefer>
205
+ </alias>
206
+ <alias>
207
+ <family>Baskerville</family>
208
+ <prefer>
209
+ <family>Tinos</family>
210
+ <family>Liberation Serif</family>
211
+ </prefer>
212
+ </alias>
213
+ <alias>
214
+ <family>Big Caslon</family>
215
+ <prefer>
216
+ <family>Tinos</family>
217
+ </prefer>
218
+ </alias>
219
+ <alias>
220
+ <family>Hoefler Text</family>
221
+ <prefer>
222
+ <family>Tinos</family>
223
+ </prefer>
224
+ </alias>
225
+ <alias>
226
+ <family>Charter</family>
227
+ <prefer>
228
+ <family>Tinos</family>
229
+ </prefer>
230
+ </alias>
231
+ <alias>
232
+ <family>Cochin</family>
233
+ <prefer>
234
+ <family>Tinos</family>
235
+ </prefer>
236
+ </alias>
237
+ <alias>
238
+ <family>Didot</family>
239
+ <prefer>
240
+ <family>Tinos</family>
241
+ </prefer>
242
+ </alias>
243
+
244
+ <!-- ============================================================
245
+ Optima / Avenir / Futura / Gill Sans (sans variants)
246
+ ============================================================ -->
247
+ <alias>
248
+ <family>Optima</family>
249
+ <prefer>
250
+ <family>URW Classico</family>
251
+ <family>Liberation Sans</family>
252
+ </prefer>
253
+ </alias>
254
+ <alias>
255
+ <family>Avenir</family>
256
+ <prefer>
257
+ <family>Inter</family>
258
+ <family>Liberation Sans</family>
259
+ </prefer>
260
+ </alias>
261
+ <alias>
262
+ <family>Avenir Next</family>
263
+ <prefer>
264
+ <family>Inter</family>
265
+ </prefer>
266
+ </alias>
267
+ <alias>
268
+ <family>Avenir Next Condensed</family>
269
+ <prefer>
270
+ <family>Inter</family>
271
+ </prefer>
272
+ </alias>
273
+ <alias>
274
+ <family>Futura</family>
275
+ <prefer>
276
+ <family>URW Gothic</family>
277
+ <family>Liberation Sans</family>
278
+ </prefer>
279
+ </alias>
280
+ <alias>
281
+ <family>Gill Sans</family>
282
+ <prefer>
283
+ <family>URW Gothic</family>
284
+ </prefer>
285
+ </alias>
286
+ <alias>
287
+ <family>Trebuchet MS</family>
288
+ <prefer>
289
+ <family>Liberation Sans</family>
290
+ </prefer>
291
+ </alias>
292
+
293
+ <!-- ============================================================
294
+ Palatino / Bookman family
295
+ ============================================================ -->
296
+ <alias>
297
+ <family>Palatino</family>
298
+ <prefer>
299
+ <family>TeX Gyre Pagella</family>
300
+ <family>P052</family>
301
+ </prefer>
302
+ </alias>
303
+ <alias>
304
+ <family>Bookman</family>
305
+ <prefer>
306
+ <family>TeX Gyre Bonum</family>
307
+ <family>URW Bookman</family>
308
+ </prefer>
309
+ </alias>
310
+ <alias>
311
+ <family>Bookman Old Style</family>
312
+ <prefer>
313
+ <family>TeX Gyre Bonum</family>
314
+ <family>URW Bookman</family>
315
+ </prefer>
316
+ </alias>
317
+ <alias>
318
+ <family>American Typewriter</family>
319
+ <prefer>
320
+ <family>Tinos</family>
321
+ </prefer>
322
+ </alias>
323
+
324
+ <!-- ============================================================
325
+ Apple system / fallback families
326
+ ============================================================ -->
327
+ <alias>
328
+ <family>Apple Color Emoji</family>
329
+ <prefer>
330
+ <family>Noto Color Emoji</family>
331
+ </prefer>
332
+ </alias>
333
+ <alias>
334
+ <family>Apple SD Gothic Neo</family>
335
+ <prefer>
336
+ <family>Noto Sans CJK KR</family>
337
+ </prefer>
338
+ </alias>
339
+ <alias>
340
+ <family>AppleGothic</family>
341
+ <prefer>
342
+ <family>Noto Sans CJK KR</family>
343
+ </prefer>
344
+ </alias>
345
+ <alias>
346
+ <family>Hiragino Sans</family>
347
+ <prefer>
348
+ <family>Noto Sans CJK JP</family>
349
+ </prefer>
350
+ </alias>
351
+ <alias>
352
+ <family>Hiragino Mincho ProN</family>
353
+ <prefer>
354
+ <family>Noto Serif CJK JP</family>
355
+ </prefer>
356
+ </alias>
357
+ <alias>
358
+ <family>PingFang SC</family>
359
+ <prefer>
360
+ <family>Noto Sans CJK SC</family>
361
+ </prefer>
362
+ </alias>
363
+ <alias>
364
+ <family>PingFang TC</family>
365
+ <prefer>
366
+ <family>Noto Sans CJK TC</family>
367
+ </prefer>
368
+ </alias>
369
+ <alias>
370
+ <family>Apple Symbols</family>
371
+ <prefer>
372
+ <family>Noto Sans Symbols</family>
373
+ <family>Symbola</family>
374
+ </prefer>
375
+ </alias>
376
+ <alias>
377
+ <family>Andale Mono</family>
378
+ <prefer>
379
+ <family>DejaVu Sans Mono</family>
380
+ </prefer>
381
+ </alias>
382
+ <alias>
383
+ <family>Skia</family>
384
+ <prefer>
385
+ <family>Liberation Sans</family>
386
+ </prefer>
387
+ </alias>
388
+ <alias>
389
+ <family>Marker Felt</family>
390
+ <prefer>
391
+ <family>Liberation Sans</family>
392
+ </prefer>
393
+ </alias>
394
+ <alias>
395
+ <family>Chalkboard</family>
396
+ <prefer>
397
+ <family>Liberation Sans</family>
398
+ </prefer>
399
+ </alias>
400
+ <alias>
401
+ <family>Chalkboard SE</family>
402
+ <prefer>
403
+ <family>Liberation Sans</family>
404
+ </prefer>
405
+ </alias>
406
+ <alias>
407
+ <family>Chalkduster</family>
408
+ <prefer>
409
+ <family>Liberation Sans</family>
410
+ </prefer>
411
+ </alias>
412
+ <alias>
413
+ <family>Brush Script MT</family>
414
+ <prefer>
415
+ <family>Liberation Sans</family>
416
+ </prefer>
417
+ </alias>
418
+ <alias>
419
+ <family>Bradley Hand</family>
420
+ <prefer>
421
+ <family>Liberation Sans</family>
422
+ </prefer>
423
+ </alias>
424
+ <alias>
425
+ <family>Snell Roundhand</family>
426
+ <prefer>
427
+ <family>Liberation Sans</family>
428
+ </prefer>
429
+ </alias>
430
+ <alias>
431
+ <family>Zapfino</family>
432
+ <prefer>
433
+ <family>Liberation Sans</family>
434
+ </prefer>
435
+ </alias>
436
+ <alias>
437
+ <family>Phosphate</family>
438
+ <prefer>
439
+ <family>Liberation Sans</family>
440
+ </prefer>
441
+ </alias>
442
+ <alias>
443
+ <family>Trattatello</family>
444
+ <prefer>
445
+ <family>Liberation Sans</family>
446
+ </prefer>
447
+ </alias>
448
+ <alias>
449
+ <family>SignPainter</family>
450
+ <prefer>
451
+ <family>Liberation Sans</family>
452
+ </prefer>
453
+ </alias>
454
+ <alias>
455
+ <family>Savoye LET</family>
456
+ <prefer>
457
+ <family>Liberation Sans</family>
458
+ </prefer>
459
+ </alias>
460
+ <!-- Apple Chancery is Chrome's DEFAULT cursive family on macOS (see
461
+ chrome/app/resources/locale_settings_mac.grd), so this alias is not a
462
+ nice-to-have for pages that name the font: it decides what every
463
+ `font-family: cursive` on the web resolves to. Mapping it to Liberation
464
+ Sans made the cursive generic measure identical to the sans-serif
465
+ generic, which no Mac does. Z003 is URW's Zapf-Chancery clone - the same
466
+ visual class, and metrically distinct from every other alias here. -->
467
+ <alias>
468
+ <family>Apple Chancery</family>
469
+ <prefer>
470
+ <family>Z003</family>
471
+ </prefer>
472
+ </alias>
473
+ <!-- Papyrus is Chrome's default FANTASY family on macOS, same reasoning.
474
+ There is no free Papyrus clone, so this is an approximation in the same
475
+ way Helvetica -> TeX Gyre Heros is: it makes the (generic -> family)
476
+ relation correct and leaves the glyph metrics different from a real Mac's.
477
+ C059 is chosen because nothing else in this file claims it. -->
478
+ <alias>
479
+ <family>Papyrus</family>
480
+ <prefer>
481
+ <family>C059</family>
482
+ </prefer>
483
+ </alias>
484
+ <alias>
485
+ <family>Bodoni 72</family>
486
+ <prefer>
487
+ <family>Tinos</family>
488
+ </prefer>
489
+ </alias>
490
+ <alias>
491
+ <family>Bodoni 72 Oldstyle</family>
492
+ <prefer>
493
+ <family>Tinos</family>
494
+ </prefer>
495
+ </alias>
496
+ <alias>
497
+ <family>Bodoni 72 Smallcaps</family>
498
+ <prefer>
499
+ <family>Tinos</family>
500
+ </prefer>
501
+ </alias>
502
+ <alias>
503
+ <family>Copperplate</family>
504
+ <prefer>
505
+ <family>Liberation Sans</family>
506
+ </prefer>
507
+ </alias>
508
+ <alias>
509
+ <family>Rockwell</family>
510
+ <prefer>
511
+ <family>Tinos</family>
512
+ </prefer>
513
+ </alias>
514
+
515
+ </fontconfig>
@@ -0,0 +1,24 @@
1
+ # macOS-equivalent font bundle
2
+
3
+ Fontconfig aliases plus an installer that map common macOS font family names
4
+ (Helvetica, SF Pro, Menlo, Lucida Grande, …) to freely-licensed clones, so an
5
+ application rendering with macOS font names on a Linux host resolves to
6
+ visually similar fonts instead of the platform defaults.
7
+
8
+ ## Usage (Docker)
9
+
10
+ ```dockerfile
11
+ COPY browser/fonts/macos-bundle /tmp/macos-bundle
12
+ RUN bash /tmp/macos-bundle/install.sh && rm -rf /tmp/macos-bundle
13
+ ```
14
+
15
+ Verify inside the container:
16
+
17
+ ```bash
18
+ fc-match Helvetica
19
+ ```
20
+
21
+ ## License
22
+
23
+ The bundled clones are all freely licensed (Apache-2.0, SIL OFL 1.1, GUST,
24
+ Bitstream Vera). See `install.sh` for the exact apt packages.
@@ -0,0 +1,83 @@
1
+ #!/usr/bin/env bash
2
+ # install.sh — install Mac-equivalent fonts and apply fontconfig aliases on
3
+ # Debian/Ubuntu Linux hosts running cdp-crawler with a macOS fingerprint.
4
+ #
5
+ # Run as root (typically inside a Docker build). Idempotent — safe to re-run.
6
+ #
7
+ # Usage: bash install.sh [--no-cache]
8
+ #
9
+ # What it does:
10
+ # 1. apt-get installs free-licensed font packages that visually match the
11
+ # macOS system fonts (Helvetica → TeX Gyre Heros, SF Pro → Inter, etc.).
12
+ # 2. Copies the 40-macos-aliases.conf into /etc/fonts/conf.d/ so fontconfig
13
+ # remaps macOS family names to the bundled clones.
14
+ # 3. Runs fc-cache to rebuild the system font cache so Skia (Chromium's
15
+ # font subsystem) sees the aliases immediately.
16
+ #
17
+ # Verify post-install with: fc-match Helvetica → expect "qhvr.otf: ..."
18
+ # (TeX Gyre Heros), NOT "DejaVuSans.ttf".
19
+
20
+ set -euo pipefail
21
+
22
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
23
+ SKIP_CACHE=0
24
+ for arg in "$@"; do
25
+ case "$arg" in
26
+ --no-cache) SKIP_CACHE=1 ;;
27
+ esac
28
+ done
29
+
30
+ # Sanity: must be Debian/Ubuntu-flavored. RHEL/Alpine need a different package set.
31
+ if ! command -v apt-get >/dev/null 2>&1; then
32
+ echo "[macos-bundle] ERROR: apt-get not found — this script targets Debian/Ubuntu." >&2
33
+ echo "[macos-bundle] On other distros, install equivalent packages manually and copy" >&2
34
+ echo "[macos-bundle] 40-macos-aliases.conf into your fontconfig conf.d directory." >&2
35
+ exit 1
36
+ fi
37
+
38
+ # Package list. Most are present in Ubuntu 22.04+ default repos; texlive-fonts
39
+ # packages provide TeX Gyre. We deliberately do not install *-extra packages —
40
+ # every entry is a direct dependency of the alias chain in 40-macos-aliases.conf.
41
+ FONT_PACKAGES=(
42
+ fonts-texgyre # TeX Gyre Heros (Helvetica), Pagella (Palatino), Bonum (Bookman)
43
+ fonts-croscore # Arimo (Arial), Tinos (Times), Cousine (Courier) — Apache 2.0
44
+ fonts-inter # Inter — SF Pro look-alike (OFL)
45
+ fonts-jetbrains-mono # JetBrains Mono — SF Mono replacement (Apache 2.0)
46
+ fonts-urw-base35 # Nimbus Sans/Roman/Mono PS, P052, URW Gothic, URW Bookman
47
+ fonts-noto-core # Noto Sans / Noto Serif (broad Latin coverage)
48
+ fonts-noto-cjk # CJK glyph coverage for Apple SD Gothic Neo / Hiragino / PingFang
49
+ fonts-noto-color-emoji # Apple Color Emoji replacement
50
+ fonts-symbola # Apple Symbols replacement
51
+ fonts-liberation # Liberation Sans/Mono/Serif (cross-platform staple)
52
+ fonts-dejavu-core # DejaVu Sans / DejaVu Sans Mono (Menlo / Lucida Grande)
53
+ fontconfig # provides fc-cache, fc-match
54
+ )
55
+
56
+ echo "[macos-bundle] Installing $((${#FONT_PACKAGES[@]})) font packages via apt-get…"
57
+ export DEBIAN_FRONTEND=noninteractive
58
+ apt-get update -qq
59
+ apt-get install -y --no-install-recommends "${FONT_PACKAGES[@]}"
60
+
61
+ # Drop the alias config into fontconfig's per-system conf.d. The "40-" prefix
62
+ # places these aliases AFTER built-in family resolutions (10-/30-) but BEFORE
63
+ # user customizations (90-).
64
+ DEST_CONF="/etc/fonts/conf.d/40-macos-aliases.conf"
65
+ echo "[macos-bundle] Installing fontconfig aliases → $DEST_CONF"
66
+ install -m 0644 "$SCRIPT_DIR/40-macos-aliases.conf" "$DEST_CONF"
67
+
68
+ if [[ "$SKIP_CACHE" -eq 0 ]]; then
69
+ echo "[macos-bundle] Rebuilding system font cache…"
70
+ fc-cache -f -v >/dev/null
71
+ else
72
+ echo "[macos-bundle] Skipping fc-cache rebuild (--no-cache)"
73
+ fi
74
+
75
+ # Self-check: pick a few high-leverage aliases and confirm the resolution
76
+ # returns the bundled clone, not a Linux substitute.
77
+ echo "[macos-bundle] Verification:"
78
+ for family in "Helvetica" "Helvetica Neue" "Times" "SF Pro" "SF Mono" "Apple Color Emoji"; do
79
+ resolved="$(fc-match "$family" 2>/dev/null || echo 'fc-match unavailable')"
80
+ echo " $family → $resolved"
81
+ done
82
+
83
+ echo "[macos-bundle] Done."
@@ -1,6 +1,5 @@
1
1
  import { BrowserController } from 'crawlee';
2
- import type { LaunchBrowserOptions } from './browser-plugin.js';
3
- import type { CdpLauncher, LaunchReturn } from './launcher-wrap.js';
2
+ import type { CdpLauncher, LaunchBrowserOptions, LaunchReturn } from './browser-plugin.js';
4
3
  import type { Cookie } from './page.js';
5
4
  import CdpPage from './page.js';
6
5
  export type NewPageResult = CdpPage;
@@ -9,11 +8,35 @@ LaunchBrowserOptions, // LaunchOptions
9
8
  LaunchReturn, // LaunchResult (CDP client)
10
9
  {}, // NewPageOptions (empty as there are no specific options)
11
10
  NewPageResult> {
12
- private client?;
13
- private reconnectAttempts;
14
11
  private hasDisconnectListener;
15
12
  private isClosing;
13
+ /**
14
+ * A SINGLE keep-alive ping loop for the whole browser socket. In flatten
15
+ * mode every page shares one websocket, so one ping loop (and one ws 'error'
16
+ * listener) covers them all - a per-page heartbeat would fan N intervals and
17
+ * N listeners onto the same EventEmitter.
18
+ */
19
+ private heartbeat?;
20
+ private heartbeatWs?;
21
+ private heartbeatErrorHandler?;
22
+ private static readonly HEARTBEAT_INTERVAL_MS;
23
+ /**
24
+ * The single browser-level CDP client. This is the ws-endpoint connection
25
+ * the plugin opened at launch (`_connectViaWsEndpoint`) and Crawlee handed us
26
+ * via `assignBrowser` - NOT a second connection. Every page is a flat CDP
27
+ * session multiplexed over this one socket (ADR 0003), so there is no
28
+ * per-page socket and no `CDP({ port })` here.
29
+ */
30
+ private get client();
16
31
  initialize(): Promise<void>;
32
+ /**
33
+ * One keep-alive ping loop for the shared browser socket. Re-bound after a
34
+ * socket reconnect so it follows the live ws. Idempotent.
35
+ * @private
36
+ */
37
+ private _attachHeartbeat;
38
+ /** @private */
39
+ private _clearHeartbeat;
17
40
  /**
18
41
  * Attach a listener to handle WebSocket disconnections.
19
42
  * @private
@@ -39,7 +62,27 @@ NewPageResult> {
39
62
  * @private
40
63
  */
41
64
  protected _newPage(maxRetries?: number): Promise<NewPageResult>;
65
+ /**
66
+ * Thin delegate to the FingerprintConfig module's post-launch path. It
67
+ * reuses the once-per-launch profile selection (stamped by the plugin's
68
+ * pre-launch native path) or selects here for the system-Chrome fallback,
69
+ * then drives the JS fingerprint injection on the new page. The pre-vs-post
70
+ * decision and the PROFILE_SELECTION_KEY handshake live inside that module.
71
+ */
42
72
  private _maybeOverrideFingerprint;
73
+ /**
74
+ * Records the launch-time inputs the saveSession() helper later needs to read
75
+ * off the page - fingerprintConfig, fingerprintOptions, resolvedLocale, fingerprint,
76
+ * userDataDir, proxyUrl, and the sessionBundle (if any).
77
+ * @private
78
+ */
79
+ private _recordLaunchSnapshot;
80
+ /**
81
+ * Replays cookies + per-origin localStorage/sessionStorage from the sessionBundle
82
+ * onto a fresh page before any navigation happens.
83
+ * @private
84
+ */
85
+ private _maybeRestoreSession;
43
86
  /**
44
87
  * Sets cookies on the given page.
45
88
  * @private