arn-browser 0.1.8 → 0.1.11

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arn-browser",
3
- "version": "0.1.8",
3
+ "version": "0.1.11",
4
4
  "description": "A lightweight, browser autmation helper.",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
package/src/index.d.ts CHANGED
@@ -1,29 +1,59 @@
1
1
  // src/index.d.ts
2
2
 
3
- export * from "./utility/proxy-utility/custom-proxy";
4
- export * from "./utility/proxy-utility/proxy-chain";
5
- export * from "./utility/playwright/routes/pwRoute";
6
- export * from "./utility/puppeteer/routes/ppRoute";
7
- export {
8
- type CamoufoxOptions,
9
- type MultiloginOptions,
10
- type PwLaunchOptions as LaunchOptions, // Keeping backward compatibility if needed, though we should probably switch them out in tests
11
- type PwBrowserController as BrowserController,
12
- pwLaunch
13
- // ProxyConfig is excluded - already exported from "./utility/proxy-utility/proxy-chain"
14
- } from "./utility/playwright/pwLaunch";
15
- export * from "./utility/proxy-utility/proxy-helper";
3
+ import { ppLaunch } from "./utility/puppeteer/ppLaunch";
4
+ import { ppRoute, ppCacheLogs } from "./utility/puppeteer/routes/ppRoute";
5
+ import { pwLaunch } from "./utility/playwright/pwLaunch";
6
+ import { pwRoute, pwCacheLogs } from "./utility/playwright/routes/pwRoute";
7
+ import { retryNavigation, retryClick, checkPageConditions } from "./utility/playwright/playwright-helper";
8
+ import { startProxyServer, fetchPublicIP, fetchProxyDetails } from "./utility/proxy-utility/proxy-chain";
9
+ import {
10
+ fetchAwsProxy, getInstanceStatus, getPublicIpAddress,
11
+ manageInstanceStop, manageInstanceStart, AssociateAddress,
12
+ DisassociateAddress, DeleteUnassociatedElasticIPs, resetServersAndIp,
13
+ getActiveProxy, getActiveProxyWithStartStop, getActiveProxyConditional,
14
+ isProxyAlive
15
+ } from "./utility/proxy-utility/custom-proxy";
16
+ import { get_multilogin_proxy, get_packetstream_proxy, get_x_proxy, fetchNextProxy } from "./utility/proxy-utility/proxy-helper";
17
+ import { generateOTP } from "./others/totp-generator";
16
18
 
17
- export * from "./others/totp-generator";
19
+ export declare const ppBrowser: {
20
+ launch: typeof ppLaunch;
21
+ route: typeof ppRoute;
22
+ cacheLogs: typeof ppCacheLogs;
23
+ };
18
24
 
19
- export * from "./utility/playwright/playwright-helper";
25
+ export declare const pwBrowser: {
26
+ launch: typeof pwLaunch;
27
+ route: typeof pwRoute;
28
+ cacheLogs: typeof pwCacheLogs;
29
+ pwGoto: typeof retryNavigation;
30
+ pwClick: typeof retryClick;
31
+ pwConditions: typeof checkPageConditions;
32
+ };
20
33
 
21
- export {
22
- type PpLaunchOptions as LaunchPuppeteerOptions,
23
- type PpBrowserController as PuppeteerController,
24
- type PpBrowserControllerSuccess as PuppeteerControllerSuccess,
25
- type PpBrowserControllerError as PuppeteerControllerError,
26
- type PpMultiloginOptions as PuppeteerMultiloginOptions,
27
- ppLaunch
28
- } from "./utility/puppeteer/ppLaunch";
29
- //
34
+ export declare const proxy: {
35
+ startServer: typeof startProxyServer;
36
+ fetchPublicIP: typeof fetchPublicIP;
37
+ fetchDetails: typeof fetchProxyDetails;
38
+ fetchAwsProxy: typeof fetchAwsProxy;
39
+ get_multilogin_proxy: typeof get_multilogin_proxy;
40
+ get_packetstream_proxy: typeof get_packetstream_proxy;
41
+ get_x_proxy: typeof get_x_proxy;
42
+ fetchNextProxy: typeof fetchNextProxy;
43
+ getInstanceStatus: typeof getInstanceStatus;
44
+ getPublicIpAddress: typeof getPublicIpAddress;
45
+ manageInstanceStop: typeof manageInstanceStop;
46
+ manageInstanceStart: typeof manageInstanceStart;
47
+ AssociateAddress: typeof AssociateAddress;
48
+ DisassociateAddress: typeof DisassociateAddress;
49
+ DeleteUnassociatedElasticIPs: typeof DeleteUnassociatedElasticIPs;
50
+ resetServersAndIp: typeof resetServersAndIp;
51
+ getActiveProxy: typeof getActiveProxy;
52
+ getActiveProxyWithStartStop: typeof getActiveProxyWithStartStop;
53
+ getActiveProxyConditional: typeof getActiveProxyConditional;
54
+ isProxyAlive: typeof isProxyAlive;
55
+ };
56
+
57
+ export declare const others: {
58
+ generateOTP: typeof generateOTP;
59
+ };
package/src/index.js CHANGED
@@ -1,18 +1,76 @@
1
- export * from "./utility/playwright/pwLaunch.js";
1
+ // ==========================================================================
2
+ // Namespace exports — grouped, clean API
3
+ // ==========================================================================
2
4
 
3
- // Export the routing/request interception logic
4
- export * from "./utility/playwright/routes/pwRoute.js";
5
+ // --- Puppeteer ---
6
+ import { ppLaunch } from "./utility/puppeteer/ppLaunch.js";
7
+ import { ppRoute, ppCacheLogs } from "./utility/puppeteer/routes/ppRoute.js";
5
8
 
6
- export * from "./utility/proxy-utility/proxy-chain.js";
9
+ export const ppBrowser = {
10
+ launch: ppLaunch,
11
+ route: ppRoute,
12
+ cacheLogs: ppCacheLogs,
13
+ };
7
14
 
8
- export * from "./utility/proxy-utility/custom-proxy.js";
15
+ // --- Playwright ---
16
+ import { pwLaunch } from "./utility/playwright/pwLaunch.js";
17
+ import { pwRoute, pwCacheLogs } from "./utility/playwright/routes/pwRoute.js";
18
+ import { retryNavigation, retryClick, checkPageConditions } from "./utility/playwright/playwright-helper.js";
9
19
 
10
- export * from "./utility/proxy-utility/proxy-helper.js";
20
+ export const pwBrowser = {
21
+ launch: pwLaunch,
22
+ route: pwRoute,
23
+ cacheLogs: pwCacheLogs,
24
+ pwGoto: retryNavigation,
25
+ pwClick: retryClick,
26
+ pwConditions: checkPageConditions,
27
+ };
11
28
 
12
- export * from "./others/totp-generator.js";
29
+ // --- Proxy ---
30
+ import { startProxyServer, fetchPublicIP, fetchProxyDetails } from "./utility/proxy-utility/proxy-chain.js";
31
+ import {
32
+ fetchAwsProxy,
33
+ getInstanceStatus,
34
+ getPublicIpAddress,
35
+ manageInstanceStop,
36
+ manageInstanceStart,
37
+ AssociateAddress,
38
+ DisassociateAddress,
39
+ DeleteUnassociatedElasticIPs,
40
+ resetServersAndIp,
41
+ getActiveProxy,
42
+ getActiveProxyWithStartStop,
43
+ getActiveProxyConditional,
44
+ isProxyAlive,
45
+ } from "./utility/proxy-utility/custom-proxy.js";
46
+ import { get_multilogin_proxy, get_packetstream_proxy, get_x_proxy, fetchNextProxy } from "./utility/proxy-utility/proxy-helper.js";
13
47
 
14
- export * from "./utility/playwright/playwright-helper.js";
48
+ export const proxy = {
49
+ startServer: startProxyServer,
50
+ fetchPublicIP,
51
+ fetchDetails: fetchProxyDetails,
52
+ fetchAwsProxy,
53
+ get_multilogin_proxy,
54
+ get_packetstream_proxy,
55
+ get_x_proxy,
56
+ fetchNextProxy,
57
+ getInstanceStatus,
58
+ getPublicIpAddress,
59
+ manageInstanceStop,
60
+ manageInstanceStart,
61
+ AssociateAddress,
62
+ DisassociateAddress,
63
+ DeleteUnassociatedElasticIPs,
64
+ resetServersAndIp,
65
+ getActiveProxy,
66
+ getActiveProxyWithStartStop,
67
+ getActiveProxyConditional,
68
+ isProxyAlive,
69
+ };
15
70
 
16
- export * from "./utility/puppeteer/ppLaunch.js";
71
+ // --- TOTP ---
72
+ import { generateOTP } from "./others/totp-generator.js";
17
73
 
18
- export * from "./utility/puppeteer/routes/ppRoute.js";
74
+ export const others = {
75
+ generateOTP,
76
+ };
@@ -727,8 +727,9 @@ async function braveLauncher({ profilePath, proxy, CapSolver, timezoneId, humani
727
727
  "--disable-client-side-phishing-detection",
728
728
 
729
729
  // --- Brave Specific Silence ---
730
- "--disable-features=Translate,BraveRewards,BraveWallet,BraveNews,Sidebar,SidePanel",
730
+ "--disable-features=Translate,BraveRewards,BraveWallet,BraveNews,Sidebar,SidePanel,BraveNTPBrandedWallpaper,NTPBackgroundImages",
731
731
  "--disable-infobars",
732
+ "about:blank",
732
733
  ];
733
734
  const ignoreDefaultArgs = ["--enable-automation"];
734
735
  if (CapSolver) {
@@ -355,8 +355,9 @@ async function braveLauncher({ profilePath, proxy, extraArgs, spoof_fingerprint,
355
355
 
356
356
  const binaryPath = getBinaryPath("brave");
357
357
  const braveArgs = [
358
- "--disable-features=Translate,BraveRewards,BraveWallet,BraveNews,Sidebar,SidePanel",
358
+ "--disable-features=Translate,BraveRewards,BraveWallet,BraveNews,Sidebar,SidePanel,BraveNTPBrandedWallpaper,NTPBackgroundImages",
359
359
  "--homepage=about:blank",
360
+ "about:blank",
360
361
  ];
361
362
 
362
363
  return await spawnAndConnect({
@@ -390,7 +391,8 @@ async function spawnAndConnect({ binaryPath, profilePath, isPersistent, proxy, e
390
391
  "--no-first-run",
391
392
  "--no-default-browser-check",
392
393
  "--start-maximized",
393
-
394
+ // Very Important for Vps
395
+ "--no-sandbox",
394
396
  // --- Stealth & Anti-Detection ---
395
397
  "--test-type",
396
398
  "--disable-blink-features=AutomationControlled",