@blockrun/clawrouter 0.12.306 → 0.12.307
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/cli.js +8 -1
- package/dist/index.js +8 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -122278,12 +122278,19 @@ function isBlockedSsrfHost(hostname3) {
|
|
|
122278
122278
|
}
|
|
122279
122279
|
const embedded = h.match(/^64:ff9b::(.+)$/) ?? h.match(/::ffff:(.+)$/);
|
|
122280
122280
|
if (embedded) {
|
|
122281
|
-
const
|
|
122281
|
+
const rawTail = embedded[1];
|
|
122282
|
+
const tail = rawTail.startsWith("0:") && (rawTail.includes(".") || rawTail.split(":").length > 2) ? rawTail.slice(2) : rawTail;
|
|
122282
122283
|
if (tail.includes(".")) return isBlockedSsrfHost(tail);
|
|
122283
122284
|
const seg = tail.split(":");
|
|
122284
122285
|
if (seg.length === 2)
|
|
122285
122286
|
return isBlockedSsrfHost(v4FromHex(parseInt(seg[0], 16), parseInt(seg[1], 16)));
|
|
122286
122287
|
}
|
|
122288
|
+
const compat = h.match(/^::(?:0:)?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/);
|
|
122289
|
+
if (compat) return isBlockedSsrfHost(compat[1]);
|
|
122290
|
+
const compatHex = h.match(/^::([0-9a-f]{1,4}):([0-9a-f]{1,4})$/);
|
|
122291
|
+
if (compatHex) {
|
|
122292
|
+
return isBlockedSsrfHost(v4FromHex(parseInt(compatHex[1], 16), parseInt(compatHex[2], 16)));
|
|
122293
|
+
}
|
|
122287
122294
|
return false;
|
|
122288
122295
|
}
|
|
122289
122296
|
const m = h.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);
|
package/dist/index.js
CHANGED
|
@@ -288842,12 +288842,19 @@ function isBlockedSsrfHost(hostname3) {
|
|
|
288842
288842
|
}
|
|
288843
288843
|
const embedded = h.match(/^64:ff9b::(.+)$/) ?? h.match(/::ffff:(.+)$/);
|
|
288844
288844
|
if (embedded) {
|
|
288845
|
-
const
|
|
288845
|
+
const rawTail = embedded[1];
|
|
288846
|
+
const tail = rawTail.startsWith("0:") && (rawTail.includes(".") || rawTail.split(":").length > 2) ? rawTail.slice(2) : rawTail;
|
|
288846
288847
|
if (tail.includes(".")) return isBlockedSsrfHost(tail);
|
|
288847
288848
|
const seg = tail.split(":");
|
|
288848
288849
|
if (seg.length === 2)
|
|
288849
288850
|
return isBlockedSsrfHost(v4FromHex(parseInt(seg[0], 16), parseInt(seg[1], 16)));
|
|
288850
288851
|
}
|
|
288852
|
+
const compat = h.match(/^::(?:0:)?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/);
|
|
288853
|
+
if (compat) return isBlockedSsrfHost(compat[1]);
|
|
288854
|
+
const compatHex = h.match(/^::([0-9a-f]{1,4}):([0-9a-f]{1,4})$/);
|
|
288855
|
+
if (compatHex) {
|
|
288856
|
+
return isBlockedSsrfHost(v4FromHex(parseInt(compatHex[1], 16), parseInt(compatHex[2], 16)));
|
|
288857
|
+
}
|
|
288851
288858
|
return false;
|
|
288852
288859
|
}
|
|
288853
288860
|
const m = h.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockrun/clawrouter",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.307",
|
|
4
4
|
"description": "Smart LLM router — save 84% on inference costs. 90 models (7 free). Pay by credit card (API key) or USDC (x402 wallet).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|