browsermob-proxy-api-client 0.0.4 → 0.0.5

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.
@@ -0,0 +1,221 @@
1
+ export interface ProxyListItem {
2
+ port: number;
3
+ }
4
+ export interface ProxyList {
5
+ proxyList: ProxyListItem[];
6
+ }
7
+ export interface StartProxyArgs {
8
+ /**
9
+ * The specific port to start the proxy service on.
10
+ * Optional, default is generated and returned in response.
11
+ */
12
+ port?: number;
13
+ /**
14
+ * The username to use to authenticate with the chained proxy.
15
+ * Optional, default to null.
16
+ */
17
+ proxyUsername?: string;
18
+ /**
19
+ * The password to use to authenticate with the chained proxy.
20
+ * Optional, default to null.
21
+ */
22
+ proxyPassword?: string;
23
+ /**
24
+ * If running BrowserMob Proxy in a multi-homed environment,
25
+ * specify a desired bind address. Optional, default to "0.0.0.0".
26
+ */
27
+ bindAddress?: string;
28
+ /**
29
+ * If running BrowserMob Proxy in a multi-homed environment,
30
+ * specify a desired server bind address. Optional, default to "0.0.0.0".
31
+ */
32
+ serverBindAddress?: string;
33
+ /**
34
+ * Uses Elliptic Curve Cryptography for certificate impersonation.
35
+ * Optional, default to "false".
36
+ */
37
+ useEcc?: boolean;
38
+ /**
39
+ * Disables verification of all upstream servers' SSL certificates.
40
+ * All upstream servers will be trusted,
41
+ * even if they do not present valid certificates
42
+ * signed by certification authorities in the JDK's trust store.
43
+ * Optional, default to "false".
44
+ */
45
+ trustAllServers?: boolean;
46
+ }
47
+ export interface StartHarArgs {
48
+ /**
49
+ * capture headers or not
50
+ * Optional, default to "false".
51
+ */
52
+ captureHeaders?: boolean;
53
+ /**
54
+ * capture cookies or not
55
+ * Optional, default to "false"
56
+ */
57
+ captureCookies?: boolean;
58
+ /**
59
+ * capture content bodies or not
60
+ * Optional, default to "false"
61
+ */
62
+ captureContent?: boolean;
63
+ /**
64
+ * capture binary content or not
65
+ * Optional, default to "false"
66
+ */
67
+ captureBinaryContent?: boolean;
68
+ /**
69
+ * The string name of The first page ref that should be used in the HAR.
70
+ * Optional, default to "Page 1".
71
+ */
72
+ initialPageRef?: string;
73
+ /**
74
+ * The title of first HAR page. Optional, default to initialPageRef.
75
+ */
76
+ initialPageTitle?: string;
77
+ }
78
+ export interface NewHarPageArgs {
79
+ /**
80
+ * The string name of the first page ref that should be used in the HAR.
81
+ * Optional, default to "Page N" where N is the next page number.
82
+ */
83
+ pageRef?: string;
84
+ /**
85
+ * The title of new HAR page.
86
+ * Optional, default to pageRef.
87
+ */
88
+ pageTitle?: string;
89
+ }
90
+ export interface SetWhitelistArgs {
91
+ /**
92
+ * A comma separated list of regular expressions
93
+ */
94
+ regex: string;
95
+ /**
96
+ * The HTTP status code to return for URLs that do not match the whitelist.
97
+ * Optional, default to 200
98
+ */
99
+ status?: number;
100
+ }
101
+ export interface SetBlacklistArgs {
102
+ /**
103
+ * The blacklist regular expression
104
+ */
105
+ regex: string;
106
+ /**
107
+ * The HTTP status code to return for URLs that are blacklisted
108
+ */
109
+ status?: number;
110
+ /**
111
+ * The regular expression for matching HTTP method (GET, POST, PUT, etc).
112
+ * Optional, by default processing all HTTP method.
113
+ */
114
+ method?: string;
115
+ }
116
+ export interface BlacklistItem {
117
+ urlPattern: string;
118
+ statusCode: number;
119
+ httpMethodPattern: string | null;
120
+ responseCode: number;
121
+ pattern: string;
122
+ method: string | null;
123
+ }
124
+ export interface SetBandwidthLimitArgs {
125
+ /**
126
+ * Sets the downstream bandwidth limit in kbps
127
+ */
128
+ downstreamKbps?: number;
129
+ /**
130
+ * Sets the upstream bandwidth limit kbps
131
+ * by default unlimited
132
+ */
133
+ upstreamKbps?: number;
134
+ /**
135
+ * Specifies how many kilobytes in total the client is allowed to download through the proxy
136
+ * by default unlimited
137
+ */
138
+ downstreamMaxKB?: number;
139
+ /**
140
+ * Specifies how many kilobytes in total the client is allowed to upload through the proxy
141
+ * by default unlimited
142
+ */
143
+ upstreamMaxKB?: number;
144
+ /**
145
+ * Add the given latency to each HTTP request
146
+ * by default all requests are invoked without latency
147
+ */
148
+ latency?: number;
149
+ /**
150
+ * A boolean that enable bandwidth limiter.
151
+ * by default to "false", but setting any of the properties above will implicitly enable throttling
152
+ */
153
+ enable?: boolean;
154
+ /**
155
+ * Specifying what percentage of data sent is payload, e.g. use this to take into account overhead due to tcp/ip
156
+ */
157
+ payloadPercentage?: number;
158
+ /**
159
+ * The max bits per seconds you want this instance of StreamManager to respect
160
+ */
161
+ maxBitsPerSecond?: number;
162
+ }
163
+ export interface BandwidthLimitsResponse {
164
+ maxUpstreamKB: number;
165
+ remainingUpstreamKB: number;
166
+ maxDownstreamKB: number;
167
+ remainingDownstreamKB: number;
168
+ }
169
+ export interface SetRewriteArgs {
170
+ /**
171
+ * A matching URL regular expression
172
+ */
173
+ matchRegex: string;
174
+ /**
175
+ * replacement URL
176
+ */
177
+ replace: string;
178
+ }
179
+ export interface SetRetryCountArgs {
180
+ /**
181
+ * The number of times a method will be retried.
182
+ */
183
+ retrycount: number;
184
+ }
185
+ export interface WaitArgs {
186
+ /**
187
+ * Wait till all request are being made
188
+ */
189
+ quietPeriodInMs: number;
190
+ /**
191
+ * Sets quiet period in milliseconds
192
+ */
193
+ timeoutInMs: number;
194
+ }
195
+ export interface SetTimeoutsArgs {
196
+ /**
197
+ * Request timeout in milliseconds.
198
+ * A timeout value of -1 is interpreted as infinite timeout.
199
+ * default to "-1".
200
+ */
201
+ requestTimeout?: number;
202
+ /**
203
+ * Read timeout in milliseconds. Which is the timeout for waiting for data or,
204
+ * put differently, a maximum period inactivity between two consecutive data packets.
205
+ * A timeout value of zero is interpreted as an infinite timeout.
206
+ * default to "60000".
207
+ */
208
+ readTimeout?: number;
209
+ /**
210
+ * Determines the timeout in milliseconds until a connection is established.
211
+ * A timeout value of zero is interpreted as an infinite timeout.
212
+ * default to "60000".
213
+ */
214
+ connectionTimeout?: number;
215
+ /**
216
+ * Sets the maximum length of time that records will be stored in this Cache.
217
+ * A nonpositive value disables this feature (that is, sets no limit).
218
+ * default to "0".
219
+ */
220
+ dnsCacheTimeout?: number;
221
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=proxy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../typings/proxy.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browsermob-proxy-api-client",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "license": "MIT",