@tiktool/live 2.5.1 → 2.5.2

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
@@ -119,7 +119,7 @@ live.on('event', (event) => {
119
119
  | `uniqueId` | `string` | — | TikTok username (without @) |
120
120
  | `apiKey` | `string` | — | **Required.** API key from [tik.tools](https://tik.tools) |
121
121
  | `signServerUrl` | `string` | `https://api.tik.tools` | Sign server URL |
122
- | `proxyUrl` | `string` | — | HTTP proxy for all connections (`http://user:pass@host:port`) |
122
+ | `agent` | `http.Agent` | — | HTTP agent for proxying connections |
123
123
  | `autoReconnect` | `boolean` | `true` | Auto-reconnect on disconnect |
124
124
  | `maxReconnectAttempts` | `number` | `5` | Max reconnect attempts |
125
125
  | `heartbeatInterval` | `number` | `10000` | Heartbeat interval (ms) |
@@ -260,11 +260,14 @@ Route all connections through an HTTP proxy. Works with any HTTPS proxy provider
260
260
 
261
261
  ```typescript
262
262
  import { TikTokLive } from '@tiktool/live';
263
+ import { HttpsProxyAgent } from 'https-proxy-agent';
264
+
265
+ const agent = new HttpsProxyAgent('http://user:pass@proxy.example.com:1234');
263
266
 
264
267
  const live = new TikTokLive({
265
268
  uniqueId: 'streamer_name',
266
269
  apiKey: 'YOUR_API_KEY',
267
- proxyUrl: 'http://user:pass@proxy.example.com:1234',
270
+ agent,
268
271
  });
269
272
 
270
273
  await live.connect(); // Both HTTP and WebSocket go through the proxy