camoufox-js 0.3.5 → 0.3.6
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/dist/__main__.js +0 -0
- package/dist/ip.js +6 -2
- package/package.json +2 -2
package/dist/__main__.js
CHANGED
|
File without changes
|
package/dist/ip.js
CHANGED
|
@@ -64,6 +64,7 @@ export async function publicIP(proxy) {
|
|
|
64
64
|
"https://ifconfig.co/ip",
|
|
65
65
|
"https://ipecho.net/plain",
|
|
66
66
|
];
|
|
67
|
+
const errors = [];
|
|
67
68
|
for (const url of URLS) {
|
|
68
69
|
try {
|
|
69
70
|
const impit = new Impit({
|
|
@@ -79,8 +80,11 @@ export async function publicIP(proxy) {
|
|
|
79
80
|
return ip;
|
|
80
81
|
}
|
|
81
82
|
catch (error) {
|
|
82
|
-
|
|
83
|
+
errors.push(error);
|
|
84
|
+
if (process.env.CAMOUFOX_DEBUG) {
|
|
85
|
+
console.warn(new InvalidProxy(`camoufox-js(warn): Failed to fetch public proxy IP from ${url}, retrying with another URL...`, { cause: error }));
|
|
86
|
+
}
|
|
83
87
|
}
|
|
84
88
|
}
|
|
85
|
-
throw new InvalidIP("Failed to get IP address");
|
|
89
|
+
throw new InvalidIP("Failed to get a public proxy IP address from any API endpoint.", { cause: errors });
|
|
86
90
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "camoufox-js",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"adm-zip": "^0.5.16",
|
|
23
23
|
"commander": "^13.1.0",
|
|
24
24
|
"fingerprint-generator": "^2.1.66",
|
|
25
|
-
"impit": "^0.
|
|
25
|
+
"impit": "^0.4.6",
|
|
26
26
|
"js-yaml": "^4.1.0",
|
|
27
27
|
"language-tags": "^2.0.1",
|
|
28
28
|
"maxmind": "^4.3.24",
|