koonjs 0.5.1 → 0.5.3
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/index.d.ts +20 -19
- package/koon.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
- package/koon.linux-arm64-gnu.node +0 -0
- package/koon.linux-x64-gnu.node +0 -0
package/index.d.ts
CHANGED
|
@@ -1,26 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser profile name for impersonation.
|
|
3
|
+
*
|
|
4
|
+
* Format: `{browser}{version?}{-os?}`
|
|
5
|
+
* - browser: chrome, firefox, safari, edge, opera, chrome-mobile, firefox-mobile, safari-mobile, okhttp
|
|
6
|
+
* - version: optional number (e.g. 145, 148)
|
|
7
|
+
* - os: optional suffix with dash (e.g. -windows, -macos, -linux, -android, -ios)
|
|
8
|
+
*
|
|
9
|
+
* Examples: "chrome", "chrome145", "chrome145-macos", "firefox148-linux",
|
|
10
|
+
* "chrome-mobile145", "firefox-mobile148", "safari-mobile183", "okhttp5"
|
|
11
|
+
*/
|
|
1
12
|
export type Browser =
|
|
2
|
-
// Desktop browsers
|
|
3
|
-
| 'chrome' | '
|
|
4
|
-
| 'chrome136' | 'chrome137' | 'chrome138' | 'chrome139' | 'chrome140'
|
|
5
|
-
| 'chrome141' | 'chrome142' | 'chrome143' | 'chrome144' | 'chrome145'
|
|
6
|
-
| 'firefox' | 'firefox135' | 'firefox136' | 'firefox137' | 'firefox138'
|
|
7
|
-
| 'firefox139' | 'firefox140' | 'firefox141' | 'firefox142' | 'firefox143'
|
|
8
|
-
| 'firefox144' | 'firefox145' | 'firefox146' | 'firefox147' | 'firefox148'
|
|
9
|
-
| 'safari' | 'safari156' | 'safari160' | 'safari161' | 'safari170' | 'safari171'
|
|
10
|
-
| 'safari172' | 'safari173' | 'safari180' | 'safari181' | 'safari182' | 'safari183'
|
|
11
|
-
| 'edge' | 'edge131' | 'edge132' | 'edge133' | 'edge134' | 'edge135'
|
|
12
|
-
| 'edge136' | 'edge137' | 'edge138' | 'edge139' | 'edge140'
|
|
13
|
-
| 'edge141' | 'edge142' | 'edge143' | 'edge144' | 'edge145'
|
|
14
|
-
| 'opera' | 'opera124' | 'opera125' | 'opera126' | 'opera127'
|
|
13
|
+
// Desktop browsers (common values for autocomplete)
|
|
14
|
+
| 'chrome' | 'firefox' | 'safari' | 'edge' | 'opera'
|
|
15
15
|
// Mobile browsers
|
|
16
|
-
| 'chrome-mobile' |
|
|
17
|
-
| 'safari-mobile' | `safari-mobile${string}`
|
|
18
|
-
| 'firefox-mobile' | `firefox-mobile${number}`
|
|
16
|
+
| 'chrome-mobile' | 'firefox-mobile' | 'safari-mobile'
|
|
19
17
|
// OkHttp (Android apps)
|
|
20
18
|
| 'okhttp' | 'okhttp4' | 'okhttp5'
|
|
21
|
-
// OS
|
|
22
|
-
|
|
|
23
|
-
| `${string}-android` | `${string}-ios`;
|
|
19
|
+
// Any other valid profile string (version, OS suffix, etc.)
|
|
20
|
+
| (string & {});
|
|
24
21
|
|
|
25
22
|
export interface KoonOptions {
|
|
26
23
|
/** Browser profile to impersonate. */
|
|
@@ -88,6 +85,8 @@ export class KoonResponse {
|
|
|
88
85
|
readonly tlsResumed: boolean;
|
|
89
86
|
/** Whether an existing pooled connection was reused. */
|
|
90
87
|
readonly connectionReused: boolean;
|
|
88
|
+
/** Remote IP address of the peer (e.g. "1.2.3.4" or "::1"), or null for H3/QUIC. */
|
|
89
|
+
readonly remoteAddress: string | null;
|
|
91
90
|
|
|
92
91
|
/** Decode response body as UTF-8 string. */
|
|
93
92
|
text(): string;
|
|
@@ -166,6 +165,8 @@ export class KoonStreamingResponse {
|
|
|
166
165
|
readonly url: string;
|
|
167
166
|
/** Approximate bytes sent for this request. */
|
|
168
167
|
readonly bytesSent: number;
|
|
168
|
+
/** Remote IP address of the peer, or null for H3/QUIC. */
|
|
169
|
+
readonly remoteAddress: string | null;
|
|
169
170
|
|
|
170
171
|
/** Approximate bytes received so far (headers + body chunks consumed). */
|
|
171
172
|
bytesReceived(): number;
|
package/koon.win32-x64-msvc.node
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|
package/koon.linux-x64-gnu.node
DELETED
|
Binary file
|