forked from 0x676e67/rquest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
334 lines (262 loc) · 8.07 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
[package]
name = "rquest"
version = "1.0.1"
description = "Asynchronous Rust HTTP client with TLS, JA3/JA4, and HTTP2 fingerprint spoof"
keywords = ["http", "client", "websocket", "ja3", "ja4"]
categories = ["web-programming::http-client"]
repository = "https://github.com/penumbra-x/rquest"
documentation = "https://docs.rs/rquest"
authors = ["0x676e67 <[email protected]>"]
readme = "README.md"
license = "Apache-2.0"
edition = "2021"
rust-version = "1.80"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
targets = ["x86_64-unknown-linux-gnu"]
[features]
default = ["webpki-roots", "charset"]
full = [
"json",
"stream",
"cookies",
"socks",
"gzip",
"brotli",
"zstd",
"deflate"
]
websocket = ["dep:async-tungstenite", "tokio-util/compat"]
charset = ["dep:encoding_rs"]
cookies = ["dep:cookie_crate", "dep:cookie_store"]
gzip = ["dep:async-compression", "async-compression?/gzip", "dep:tokio-util"]
brotli = ["dep:async-compression", "async-compression?/brotli", "dep:tokio-util"]
zstd = ["dep:async-compression", "async-compression?/zstd", "dep:tokio-util"]
deflate = ["dep:async-compression", "async-compression?/zlib", "dep:tokio-util"]
json = ["dep:serde_json"]
multipart = ["dep:mime_guess"]
hickory-dns = ["dep:hickory-resolver"]
stream = ["tokio/fs", "dep:tokio-util"]
socks = ["dep:tokio-socks"]
native-roots = ["dep:rustls-native-certs"]
webpki-roots = ["dep:webpki-root-certs"]
# Optional disable internal proxy cache
internal_proxy_sys_no_cache = []
# Optional enable impersonate from str
impersonate_str = []
# Optional enable impersonate from settings
impersonate_settings = []
# Internal (PRIVATE!) features used to aid testing.
# Don't rely on these whatsoever. They may disappear at anytime.
[dependencies]
base64 = "0.22"
http = "1"
url = "2.5"
bytes = "1.0"
serde = "1.0"
serde_urlencoded = "0.7.1"
tower = { version = "0.5.0", default-features = false, features = ["timeout", "util"] }
tower-service = "0.3"
futures-core = { version = "0.3.0", default-features = false }
futures-util = { version = "0.3.0", default-features = false }
sync_wrapper = { version = "1.0", features = ["futures"] }
antidote = { version = "1" }
# Optional deps...
## json
serde_json = { version = "1.0", optional = true }
## multipart
mime_guess = { version = "2.0", default-features = false, optional = true }
## common
encoding_rs = { version = "0.8", optional = true }
http-body = "1"
http-body-util = "0.1"
hyper2 = { version = "1", features = ["http1", "http2", "client"] }
log = "0.4"
mime = "0.3.17"
percent-encoding = "2.3"
tokio = { version = "1", default-features = false, features = ["net", "time", "rt"] }
pin-project-lite = "0.2.0"
ipnet = "2.10.0"
# hyper util
socket2 = { version = "0.5", features = ["all"] }
futures-channel = { version = "0.3" }
lru = { version = "0.12", default-features = false }
# Optional deps...
## boring-tls
boring = { package = "boring2", version = "4", features = ["pq-experimental"]}
boring-sys = { package = "boring-sys2", version = "4" }
tokio-boring = { package = "tokio-boring2", version = "4" }
foreign-types = { version = "0.5.0" }
typed-builder = { version = "0.20.0" }
# boring-tls session cache
linked_hash_set = { version = "0.1" }
tower-layer = { version = "0.3" }
# cert compression
brotli = { version = "7" }
flate2 = { version = "1" }
zstd = { version = "0.13" }
# tls root certs
rustls-native-certs = { version = "0.8.0", optional = true }
webpki-root-certs = { version = "0.26.0", optional = true }
## cookies
cookie_crate = { version = "0.18", package = "cookie", optional = true }
cookie_store = { version = "0.21", optional = true }
## compression
async-compression = { version = "0.4.0", default-features = false, features = ["tokio"], optional = true }
tokio-util = { version = "0.7.0", default-features = false, features = ["codec", "io"], optional = true }
## socks
tokio-socks = { version = "0.5.2", optional = true }
## websocket
async-tungstenite = { version = "0.28.0", optional = true }
## hickory-dns
hickory-resolver = { version = "0.24", optional = true }
[target.'cfg(windows)'.dependencies]
windows-registry = "0.3.0"
[target.'cfg(target_os = "macos")'.dependencies]
system-configuration = "0.6.0"
[dev-dependencies]
hyper = { version = "1.1.0", default-features = false, features = ["http1", "http2", "client", "server"] }
hyper-util = { version = "0.1.10", features = ["http1", "http2", "client", "client-legacy", "server-auto", "tokio"] }
env_logger = "0.10.0"
serde = { version = "1.0", features = ["derive"] }
libflate = "2.0.0"
zstd = { version = "0.13" }
doc-comment = "0.3"
tokio = { version = "1.0", default-features = false, features = [
"macros",
"rt-multi-thread",
] }
futures = { version = "0.3.0", default-features = false, features = ["std"] }
tower = { version = "0.5.2", default-features = false, features = ["limit"] }
num_cpus = "1.0"
libc = "0"
[[example]]
name = "json_dynamic"
path = "examples/json_dynamic.rs"
required-features = ["json"]
[[example]]
name = "json_typed"
path = "examples/json_typed.rs"
required-features = ["json"]
[[example]]
name = "tor_socks"
path = "examples/tor_socks.rs"
required-features = ["socks"]
[[example]]
name = "form"
path = "examples/form.rs"
[[example]]
name = "simple"
path = "examples/simple.rs"
[[example]]
name = "impersonate"
path = "examples/impersonate.rs"
[[example]]
name = "hickory_dns"
path = "examples/hickory_dns.rs"
required-features = ["hickory-dns"]
[[example]]
name = "headers_order"
path = "examples/headers_order.rs"
required-features = ["cookies"]
[[example]]
name = "impersonate_skip_headers"
path = "examples/impersonate_skip_headers.rs"
[[example]]
name = "impersonate_psk"
path = "examples/impersonate_psk.rs"
[[example]]
name = "set_headers"
path = "examples/set_headers.rs"
[[example]]
name = "set_cookies"
path = "examples/set_cookies.rs"
required-features = ["cookies"]
[[example]]
name = "set_cookie_provider"
path = "examples/set_cookie_provider.rs"
required-features = ["cookies"]
[[example]]
name = "set_proxies"
path = "examples/set_proxies.rs"
required-features = ["socks", "brotli"]
[[example]]
name = "set_local_address"
path = "examples/set_local_address.rs"
required-features = ["brotli"]
[[example]]
name = "set_interface"
path = "examples/set_interface.rs"
required-features = ["brotli"]
[[example]]
name = "set_native_root_cert"
path = "examples/set_native_root_cert.rs"
required-features = ["native-roots"]
[[example]]
name = "set_webpki_root_cert"
path = "examples/set_webpki_root_cert.rs"
required-features = ["webpki-roots"]
[[example]]
name = "websocket"
path = "examples/websocket.rs"
required-features = ["websocket", "futures-util/std"]
[[example]]
name = "websocket_via_proxy"
path = "examples/websocket_via_proxy.rs"
required-features = ["websocket", "futures-util/std", "socks"]
[[test]]
name = "cookie"
path = "tests/cookie.rs"
required-features = ["cookies"]
[[test]]
name = "gzip"
path = "tests/gzip.rs"
required-features = ["gzip"]
[[test]]
name = "brotli"
path = "tests/brotli.rs"
required-features = ["brotli"]
[[test]]
name = "deflate"
path = "tests/deflate.rs"
required-features = ["deflate"]
[[test]]
name = "zstd"
path = "tests/zstd.rs"
required-features = ["zstd", "stream"]
[[test]]
name = "multipart"
path = "tests/multipart.rs"
required-features = ["multipart"]
[[example]]
name = "client"
path = "examples/client.rs"
required-features = ["full"]
[[example]]
name = "request_with_redirect"
path = "examples/request_with_redirect.rs"
required-features = ["full"]
[[example]]
name = "set_redirect"
path = "examples/set_redirect.rs"
required-features = ["full"]
[[example]]
name = "base_url"
path = "examples/base_url.rs"
[[example]]
name = "request_with_cookie_store"
path = "examples/request_with_cookie_store.rs"
required-features = ["cookies"]
[[example]]
name = "request_with_version"
path = "examples/request_with_version.rs"
required-features = ["full"]
[[example]]
name = "request_with_proxy"
path = "examples/request_with_proxy.rs"
required-features = ["full"]
[[example]]
name = "connect_via_lower_priority_tokio_runtime"
path = "examples/connect_via_lower_priority_tokio_runtime.rs"
required-features = ["full"]