itd-api 0.0.7 → 0.0.8
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/README.md +20 -0
- package/dist/{chunk-3RNNZJZ4.cjs → chunk-ATCZ4T2K.cjs} +1055 -971
- package/dist/chunk-ATCZ4T2K.cjs.map +1 -0
- package/dist/{chunk-CG4SERVM.js → chunk-JIYN33FG.js} +1055 -971
- package/dist/chunk-JIYN33FG.js.map +1 -0
- package/dist/{index-DNFPX_Z1.d.cts → index-Duh31Wnx.d.cts} +362 -329
- package/dist/{index-DNFPX_Z1.d.ts → index-Duh31Wnx.d.ts} +362 -329
- package/dist/index.cjs +89 -89
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/node.cjs +116 -95
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.cts +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/node.js +30 -9
- package/dist/node.js.map +1 -1
- package/package.json +8 -4
- package/dist/chunk-3RNNZJZ4.cjs.map +0 -1
- package/dist/chunk-CG4SERVM.js.map +0 -1
package/README.md
CHANGED
|
@@ -456,6 +456,26 @@ rateLimit: { retryDelays: [1000, 5000, 30_000, 60_000, 90_000] } // по умо
|
|
|
456
456
|
Поэтому в браузерном приложении укажите в `baseUrl` адрес своего прокси. В Node, Bun,
|
|
457
457
|
Deno и React Native ограничение не действует.
|
|
458
458
|
|
|
459
|
+
### Прокси (HTTP/SOCKS5)
|
|
460
|
+
|
|
461
|
+
Чтобы направить запросы клиента через прокси, возьмите `fetch` из пакета
|
|
462
|
+
[`itd-api-proxy`](./proxy):
|
|
463
|
+
|
|
464
|
+
```sh
|
|
465
|
+
npm i itd-api-proxy
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
```ts
|
|
469
|
+
import { ItdClient } from 'itd-api';
|
|
470
|
+
import { proxyFetch } from 'itd-api-proxy';
|
|
471
|
+
|
|
472
|
+
const itd = new ItdClient({ fetch: proxyFetch('socks5://127.0.0.1:1080') });
|
|
473
|
+
// http://…, https://…, socks5://… — можно с user:pass@
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
Через тот же `fetch` пойдут авторизация, cookie, очередь, повторы и поток уведомлений.
|
|
477
|
+
Только для Node/Bun/Deno. Подробности — в [README пакета](./proxy).
|
|
478
|
+
|
|
459
479
|
---
|
|
460
480
|
|
|
461
481
|
## Плагины
|