arn-browser 0.1.9 → 0.1.12
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 +1 -1
- package/src/index.d.ts +54 -24
- package/src/index.js +68 -10
- package/src/utility/playwright/pwLaunch.js +2 -1
- package/src/utility/puppeteer/ppLaunch.js +2 -1
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -1,29 +1,59 @@
|
|
|
1
1
|
// src/index.d.ts
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
|
19
|
+
export declare const ppBrowser: {
|
|
20
|
+
launch: typeof ppLaunch;
|
|
21
|
+
route: typeof ppRoute;
|
|
22
|
+
cacheLogs: typeof ppCacheLogs;
|
|
23
|
+
};
|
|
18
24
|
|
|
19
|
-
export
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
export declare const proxyUtil: {
|
|
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
|
-
|
|
1
|
+
// ==========================================================================
|
|
2
|
+
// Namespace exports — grouped, clean API
|
|
3
|
+
// ==========================================================================
|
|
2
4
|
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
+
// --- Puppeteer ---
|
|
6
|
+
import { ppLaunch } from "./utility/puppeteer/ppLaunch.js";
|
|
7
|
+
import { ppRoute, ppCacheLogs } from "./utility/puppeteer/routes/ppRoute.js";
|
|
5
8
|
|
|
6
|
-
export
|
|
9
|
+
export const ppBrowser = {
|
|
10
|
+
launch: ppLaunch,
|
|
11
|
+
route: ppRoute,
|
|
12
|
+
cacheLogs: ppCacheLogs,
|
|
13
|
+
};
|
|
7
14
|
|
|
8
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
48
|
+
export const proxyUtil = {
|
|
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
|
-
|
|
71
|
+
// --- TOTP ---
|
|
72
|
+
import { generateOTP } from "./others/totp-generator.js";
|
|
17
73
|
|
|
18
|
-
export
|
|
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({
|