itd-api 0.0.6 → 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 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
  ## Плагины