rnet 3.0.0rc4__tar.gz → 3.0.0rc6__tar.gz
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.
Potentially problematic release.
This version of rnet might be problematic. Click here for more details.
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/Cargo.lock +40 -86
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/Cargo.toml +6 -8
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/PKG-INFO +5 -6
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/README.md +4 -5
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/benchmark/bench.py +12 -12
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/keylog.py +2 -2
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/rnet/__init__.py +1 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/rnet/__init__.pyi +14 -8
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/rnet/blocking.py +23 -8
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/rnet/exceptions.py +6 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/rnet/tls.py +6 -18
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/buffer.rs +1 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/client/body/mod.rs +3 -1
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/client/body/multipart.rs +5 -4
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/client/mod.rs +8 -11
- rnet-3.0.0rc6/src/client/nogil.rs +91 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/client/req.rs +5 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/client/resp/http.rs +102 -104
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/client/resp/mod.rs +0 -1
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/client/resp/stream.rs +5 -5
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/client/resp/ws/mod.rs +10 -25
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/error.rs +1 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/http/status.rs +1 -1
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/lib.rs +15 -13
- rnet-3.0.0rc6/src/rt/mod.rs +234 -0
- rnet-3.0.0rc6/src/rt/sync.rs +185 -0
- rnet-3.0.0rc6/src/rt/task.rs +141 -0
- rnet-3.0.0rc6/src/rt/util.rs +42 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/tls/keylog.rs +4 -14
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/tls/mod.rs +1 -1
- rnet-3.0.0rc4/src/client/resp/future.rs +0 -102
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/.github/FUNDING.yml +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/.github/assets/capsolver.jpg +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/.github/dependabot.yml +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/.github/musl_build.sh +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/.github/workflows/ci.yml +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/.gitignore +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/LICENSE +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/pyproject.toml +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/benchmark/README.md +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/benchmark/benchmark_multi.jpg +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/benchmark/benchmark_multi_threaded.jpg +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/benchmark/benchmark_results.csv +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/benchmark/chart.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/benchmark/core.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/benchmark/requirements.txt +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/benchmark/server.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/auth.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/basic_auth.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/bearer_auth.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/blocking/auth.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/blocking/basic_auth.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/blocking/bearer_auth.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/blocking/body.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/blocking/client.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/blocking/cookie.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/blocking/emulation.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/blocking/form.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/blocking/get.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/blocking/json.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/blocking/multipart.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/blocking/proxy.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/blocking/query.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/blocking/stream.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/body.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/client.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/emulation.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/exceptions.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/form.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/get.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/header_map.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/http1_websocket.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/http2_websocket.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/json.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/multipart.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/orig_headers.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/proxy.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/query.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/request.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/examples/stream.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/rnet/cookie.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/rnet/emulation.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/rnet/header.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/python/rnet/py.typed +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/client/dns.rs +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/client/resp/history.rs +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/client/resp/ws/cmd.rs +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/client/resp/ws/msg.rs +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/emulation.rs +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/extractor.rs +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/http/cookie.rs +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/http/header.rs +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/http/mod.rs +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/macros.rs +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/proxy.rs +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/tls/identity.rs +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/src/tls/store.rs +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/tests/cookie_test.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/tests/header_test.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/tests/redirect_test.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/tests/request_test.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/tests/response_test.py +0 -0
- {rnet-3.0.0rc4 → rnet-3.0.0rc6}/tests/tls_test.py +0 -0
|
@@ -54,16 +54,10 @@ dependencies = [
|
|
|
54
54
|
]
|
|
55
55
|
|
|
56
56
|
[[package]]
|
|
57
|
-
name = "
|
|
58
|
-
version = "
|
|
57
|
+
name = "arc-swap"
|
|
58
|
+
version = "1.7.1"
|
|
59
59
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
60
|
-
checksum = "
|
|
61
|
-
dependencies = [
|
|
62
|
-
"concurrent-queue",
|
|
63
|
-
"event-listener-strategy",
|
|
64
|
-
"futures-core",
|
|
65
|
-
"pin-project-lite",
|
|
66
|
-
]
|
|
60
|
+
checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457"
|
|
67
61
|
|
|
68
62
|
[[package]]
|
|
69
63
|
name = "async-compression"
|
|
@@ -151,9 +145,9 @@ dependencies = [
|
|
|
151
145
|
|
|
152
146
|
[[package]]
|
|
153
147
|
name = "boring-sys2"
|
|
154
|
-
version = "5.0.0-alpha.
|
|
148
|
+
version = "5.0.0-alpha.9"
|
|
155
149
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
156
|
-
checksum = "
|
|
150
|
+
checksum = "3f93a47b371ec9ec3761fe887ce0d5a2fcb870adf8b4035f9ec593bcfa38db72"
|
|
157
151
|
dependencies = [
|
|
158
152
|
"autocfg",
|
|
159
153
|
"bindgen",
|
|
@@ -164,9 +158,9 @@ dependencies = [
|
|
|
164
158
|
|
|
165
159
|
[[package]]
|
|
166
160
|
name = "boring2"
|
|
167
|
-
version = "5.0.0-alpha.
|
|
161
|
+
version = "5.0.0-alpha.9"
|
|
168
162
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
169
|
-
checksum = "
|
|
163
|
+
checksum = "793883c88b60d6412e3c49369bee9acb970f79b8553e3e5274efcd0ad560f416"
|
|
170
164
|
dependencies = [
|
|
171
165
|
"bitflags",
|
|
172
166
|
"boring-sys2",
|
|
@@ -210,9 +204,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
|
|
|
210
204
|
|
|
211
205
|
[[package]]
|
|
212
206
|
name = "cc"
|
|
213
|
-
version = "1.2.
|
|
207
|
+
version = "1.2.37"
|
|
214
208
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
215
|
-
checksum = "
|
|
209
|
+
checksum = "65193589c6404eb80b450d618eaf9a2cafaaafd57ecce47370519ef674a7bd44"
|
|
216
210
|
dependencies = [
|
|
217
211
|
"find-msvc-tools",
|
|
218
212
|
"jobserver",
|
|
@@ -275,15 +269,6 @@ version = "0.4.29"
|
|
|
275
269
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
276
270
|
checksum = "e47641d3deaf41fb1538ac1f54735925e275eaf3bf4d55c81b137fba797e5cbb"
|
|
277
271
|
|
|
278
|
-
[[package]]
|
|
279
|
-
name = "concurrent-queue"
|
|
280
|
-
version = "2.5.0"
|
|
281
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
282
|
-
checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973"
|
|
283
|
-
dependencies = [
|
|
284
|
-
"crossbeam-utils",
|
|
285
|
-
]
|
|
286
|
-
|
|
287
272
|
[[package]]
|
|
288
273
|
name = "cookie"
|
|
289
274
|
version = "0.18.1"
|
|
@@ -421,27 +406,6 @@ version = "1.0.2"
|
|
|
421
406
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
422
407
|
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
|
423
408
|
|
|
424
|
-
[[package]]
|
|
425
|
-
name = "event-listener"
|
|
426
|
-
version = "5.4.1"
|
|
427
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
428
|
-
checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab"
|
|
429
|
-
dependencies = [
|
|
430
|
-
"concurrent-queue",
|
|
431
|
-
"parking",
|
|
432
|
-
"pin-project-lite",
|
|
433
|
-
]
|
|
434
|
-
|
|
435
|
-
[[package]]
|
|
436
|
-
name = "event-listener-strategy"
|
|
437
|
-
version = "0.5.4"
|
|
438
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
439
|
-
checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93"
|
|
440
|
-
dependencies = [
|
|
441
|
-
"event-listener",
|
|
442
|
-
"pin-project-lite",
|
|
443
|
-
]
|
|
444
|
-
|
|
445
409
|
[[package]]
|
|
446
410
|
name = "find-msvc-tools"
|
|
447
411
|
version = "0.1.1"
|
|
@@ -649,7 +613,7 @@ dependencies = [
|
|
|
649
613
|
"cfg-if",
|
|
650
614
|
"libc",
|
|
651
615
|
"r-efi",
|
|
652
|
-
"wasi 0.14.
|
|
616
|
+
"wasi 0.14.5+wasi-0.2.4",
|
|
653
617
|
]
|
|
654
618
|
|
|
655
619
|
[[package]]
|
|
@@ -896,9 +860,9 @@ dependencies = [
|
|
|
896
860
|
|
|
897
861
|
[[package]]
|
|
898
862
|
name = "indexmap"
|
|
899
|
-
version = "2.11.
|
|
863
|
+
version = "2.11.1"
|
|
900
864
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
901
|
-
checksum = "
|
|
865
|
+
checksum = "206a8042aec68fa4a62e8d3f7aa4ceb508177d9324faf261e1959e495b7a1921"
|
|
902
866
|
dependencies = [
|
|
903
867
|
"equivalent",
|
|
904
868
|
"hashbrown 0.15.5",
|
|
@@ -1210,12 +1174,6 @@ dependencies = [
|
|
|
1210
1174
|
"syn",
|
|
1211
1175
|
]
|
|
1212
1176
|
|
|
1213
|
-
[[package]]
|
|
1214
|
-
name = "parking"
|
|
1215
|
-
version = "2.2.1"
|
|
1216
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1217
|
-
checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba"
|
|
1218
|
-
|
|
1219
1177
|
[[package]]
|
|
1220
1178
|
name = "parking_lot"
|
|
1221
1179
|
version = "0.12.4"
|
|
@@ -1321,20 +1279,6 @@ dependencies = [
|
|
|
1321
1279
|
"unindent",
|
|
1322
1280
|
]
|
|
1323
1281
|
|
|
1324
|
-
[[package]]
|
|
1325
|
-
name = "pyo3-async-runtimes"
|
|
1326
|
-
version = "0.26.0"
|
|
1327
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1328
|
-
checksum = "e6ee6d4cb3e8d5b925f5cdb38da183e0ff18122eb2048d4041c9e7034d026e23"
|
|
1329
|
-
dependencies = [
|
|
1330
|
-
"async-channel",
|
|
1331
|
-
"futures",
|
|
1332
|
-
"once_cell",
|
|
1333
|
-
"pin-project-lite",
|
|
1334
|
-
"pyo3",
|
|
1335
|
-
"tokio",
|
|
1336
|
-
]
|
|
1337
|
-
|
|
1338
1282
|
[[package]]
|
|
1339
1283
|
name = "pyo3-build-config"
|
|
1340
1284
|
version = "0.26.0"
|
|
@@ -1493,10 +1437,12 @@ dependencies = [
|
|
|
1493
1437
|
|
|
1494
1438
|
[[package]]
|
|
1495
1439
|
name = "rnet"
|
|
1496
|
-
version = "3.0.0-
|
|
1440
|
+
version = "3.0.0-rc6"
|
|
1497
1441
|
dependencies = [
|
|
1442
|
+
"arc-swap",
|
|
1498
1443
|
"bytes",
|
|
1499
1444
|
"cookie",
|
|
1445
|
+
"futures",
|
|
1500
1446
|
"futures-util",
|
|
1501
1447
|
"hickory-resolver",
|
|
1502
1448
|
"http",
|
|
@@ -1505,7 +1451,6 @@ dependencies = [
|
|
|
1505
1451
|
"mimalloc",
|
|
1506
1452
|
"pin-project-lite",
|
|
1507
1453
|
"pyo3",
|
|
1508
|
-
"pyo3-async-runtimes",
|
|
1509
1454
|
"serde",
|
|
1510
1455
|
"tikv-jemallocator",
|
|
1511
1456
|
"tokio",
|
|
@@ -1746,9 +1691,9 @@ checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417"
|
|
|
1746
1691
|
|
|
1747
1692
|
[[package]]
|
|
1748
1693
|
name = "target-lexicon"
|
|
1749
|
-
version = "0.13.
|
|
1694
|
+
version = "0.13.3"
|
|
1750
1695
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1751
|
-
checksum = "
|
|
1696
|
+
checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c"
|
|
1752
1697
|
|
|
1753
1698
|
[[package]]
|
|
1754
1699
|
name = "thiserror"
|
|
@@ -1894,9 +1839,9 @@ dependencies = [
|
|
|
1894
1839
|
|
|
1895
1840
|
[[package]]
|
|
1896
1841
|
name = "tokio-boring2"
|
|
1897
|
-
version = "5.0.0-alpha.
|
|
1842
|
+
version = "5.0.0-alpha.9"
|
|
1898
1843
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1899
|
-
checksum = "
|
|
1844
|
+
checksum = "c427c90f7fdd35087e7217428683866140036f66cc6875c66f01b388f73d93b0"
|
|
1900
1845
|
dependencies = [
|
|
1901
1846
|
"boring-sys2",
|
|
1902
1847
|
"boring2",
|
|
@@ -2104,9 +2049,9 @@ checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539"
|
|
|
2104
2049
|
|
|
2105
2050
|
[[package]]
|
|
2106
2051
|
name = "unicode-ident"
|
|
2107
|
-
version = "1.0.
|
|
2052
|
+
version = "1.0.19"
|
|
2108
2053
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2109
|
-
checksum = "
|
|
2054
|
+
checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d"
|
|
2110
2055
|
|
|
2111
2056
|
[[package]]
|
|
2112
2057
|
name = "unindent"
|
|
@@ -2184,9 +2129,18 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
|
|
2184
2129
|
|
|
2185
2130
|
[[package]]
|
|
2186
2131
|
name = "wasi"
|
|
2187
|
-
version = "0.14.
|
|
2132
|
+
version = "0.14.5+wasi-0.2.4"
|
|
2133
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2134
|
+
checksum = "a4494f6290a82f5fe584817a676a34b9d6763e8d9d18204009fb31dceca98fd4"
|
|
2135
|
+
dependencies = [
|
|
2136
|
+
"wasip2",
|
|
2137
|
+
]
|
|
2138
|
+
|
|
2139
|
+
[[package]]
|
|
2140
|
+
name = "wasip2"
|
|
2141
|
+
version = "1.0.0+wasi-0.2.4"
|
|
2188
2142
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2189
|
-
checksum = "
|
|
2143
|
+
checksum = "03fa2761397e5bd52002cd7e73110c71af2109aca4e521a9f40473fe685b0a24"
|
|
2190
2144
|
dependencies = [
|
|
2191
2145
|
"wit-bindgen",
|
|
2192
2146
|
]
|
|
@@ -2623,15 +2577,15 @@ dependencies = [
|
|
|
2623
2577
|
|
|
2624
2578
|
[[package]]
|
|
2625
2579
|
name = "wit-bindgen"
|
|
2626
|
-
version = "0.45.
|
|
2580
|
+
version = "0.45.1"
|
|
2627
2581
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2628
|
-
checksum = "
|
|
2582
|
+
checksum = "5c573471f125075647d03df72e026074b7203790d41351cd6edc96f46bcccd36"
|
|
2629
2583
|
|
|
2630
2584
|
[[package]]
|
|
2631
2585
|
name = "wreq"
|
|
2632
|
-
version = "6.0.0-rc.
|
|
2586
|
+
version = "6.0.0-rc.15"
|
|
2633
2587
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2634
|
-
checksum = "
|
|
2588
|
+
checksum = "b593096128459db7947eb5c2ddbe3b9d12342cf8f795043ae015c82c02e2c47a"
|
|
2635
2589
|
dependencies = [
|
|
2636
2590
|
"ahash",
|
|
2637
2591
|
"boring2",
|
|
@@ -2717,18 +2671,18 @@ dependencies = [
|
|
|
2717
2671
|
|
|
2718
2672
|
[[package]]
|
|
2719
2673
|
name = "zerocopy"
|
|
2720
|
-
version = "0.8.
|
|
2674
|
+
version = "0.8.27"
|
|
2721
2675
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2722
|
-
checksum = "
|
|
2676
|
+
checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c"
|
|
2723
2677
|
dependencies = [
|
|
2724
2678
|
"zerocopy-derive",
|
|
2725
2679
|
]
|
|
2726
2680
|
|
|
2727
2681
|
[[package]]
|
|
2728
2682
|
name = "zerocopy-derive"
|
|
2729
|
-
version = "0.8.
|
|
2683
|
+
version = "0.8.27"
|
|
2730
2684
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2731
|
-
checksum = "
|
|
2685
|
+
checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831"
|
|
2732
2686
|
dependencies = [
|
|
2733
2687
|
"proc-macro2",
|
|
2734
2688
|
"quote",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "rnet"
|
|
3
|
-
version = "3.0.0-
|
|
3
|
+
version = "3.0.0-rc6"
|
|
4
4
|
description = "A blazing-fast Python HTTP client with TLS fingerprint"
|
|
5
5
|
license = "Apache-2.0"
|
|
6
6
|
repository = "https://github.com/0x676e67/rnet"
|
|
@@ -24,25 +24,23 @@ mimalloc = ["dep:mimalloc"]
|
|
|
24
24
|
abi3 = ["pyo3/abi3-py311"]
|
|
25
25
|
|
|
26
26
|
[dependencies]
|
|
27
|
-
tokio = "1.47.1"
|
|
27
|
+
tokio = { version = "1.47.1", features = ["sync", "rt", "rt-multi-thread", "time"]}
|
|
28
28
|
pyo3 = { version = "0.26.0", features = [
|
|
29
29
|
"indexmap",
|
|
30
30
|
"extension-module",
|
|
31
31
|
"multiple-pymethods",
|
|
32
32
|
"generate-import-lib",
|
|
33
33
|
] }
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"unstable-streams",
|
|
37
|
-
] }
|
|
34
|
+
futures = "0.3"
|
|
35
|
+
futures-util = { version = "0.3.31", default-features = false }
|
|
38
36
|
pin-project-lite = "0.2.16"
|
|
39
37
|
serde = { version = "1.0.219", features = ["derive"] }
|
|
40
38
|
indexmap = { version = "2.10.0", features = ["serde"] }
|
|
41
39
|
bytes = "1.10.1"
|
|
42
|
-
|
|
40
|
+
arc-swap = "1.7.0"
|
|
43
41
|
http = "1"
|
|
44
42
|
http-body-util = "0.1.3"
|
|
45
|
-
wreq = { version = "6.0.0-rc.
|
|
43
|
+
wreq = { version = "6.0.0-rc.15", features = [
|
|
46
44
|
"json",
|
|
47
45
|
"socks",
|
|
48
46
|
"stream",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rnet
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.0rc6
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
@@ -44,13 +44,12 @@ A blazing-fast Python HTTP client with advanced browser fingerprinting that accu
|
|
|
44
44
|
- Plain bodies, JSON, urlencoded, multipart
|
|
45
45
|
- Cookie Store
|
|
46
46
|
- Redirect Policy
|
|
47
|
-
- Original
|
|
47
|
+
- Original Headers
|
|
48
48
|
- Rotating Proxies
|
|
49
|
+
- WebSocket Upgrade
|
|
49
50
|
- Connection Pooling
|
|
50
51
|
- Streaming Transfers
|
|
51
52
|
- Zero-Copy Transfers
|
|
52
|
-
- WebSocket Upgrade
|
|
53
|
-
- Async DNS Resolver
|
|
54
53
|
- HTTPS via BoringSSL
|
|
55
54
|
- Free-Threaded Safety
|
|
56
55
|
- Automatic Decompression
|
|
@@ -60,14 +59,14 @@ A blazing-fast Python HTTP client with advanced browser fingerprinting that accu
|
|
|
60
59
|
The following example uses the `asyncio` runtime with `rnet` installed via pip:
|
|
61
60
|
|
|
62
61
|
```bash
|
|
63
|
-
pip install asyncio rnet==3.0.
|
|
62
|
+
pip install asyncio rnet==3.0.0rc6
|
|
64
63
|
```
|
|
65
64
|
|
|
66
65
|
And then the code:
|
|
67
66
|
|
|
68
67
|
```python
|
|
69
68
|
import asyncio
|
|
70
|
-
from rnet import
|
|
69
|
+
from rnet import Client, Emulation
|
|
71
70
|
|
|
72
71
|
|
|
73
72
|
async def main():
|
|
@@ -16,13 +16,12 @@ A blazing-fast Python HTTP client with advanced browser fingerprinting that accu
|
|
|
16
16
|
- Plain bodies, JSON, urlencoded, multipart
|
|
17
17
|
- Cookie Store
|
|
18
18
|
- Redirect Policy
|
|
19
|
-
- Original
|
|
19
|
+
- Original Headers
|
|
20
20
|
- Rotating Proxies
|
|
21
|
+
- WebSocket Upgrade
|
|
21
22
|
- Connection Pooling
|
|
22
23
|
- Streaming Transfers
|
|
23
24
|
- Zero-Copy Transfers
|
|
24
|
-
- WebSocket Upgrade
|
|
25
|
-
- Async DNS Resolver
|
|
26
25
|
- HTTPS via BoringSSL
|
|
27
26
|
- Free-Threaded Safety
|
|
28
27
|
- Automatic Decompression
|
|
@@ -32,14 +31,14 @@ A blazing-fast Python HTTP client with advanced browser fingerprinting that accu
|
|
|
32
31
|
The following example uses the `asyncio` runtime with `rnet` installed via pip:
|
|
33
32
|
|
|
34
33
|
```bash
|
|
35
|
-
pip install asyncio rnet==3.0.
|
|
34
|
+
pip install asyncio rnet==3.0.0rc6
|
|
36
35
|
```
|
|
37
36
|
|
|
38
37
|
And then the code:
|
|
39
38
|
|
|
40
39
|
```python
|
|
41
40
|
import asyncio
|
|
42
|
-
from rnet import
|
|
41
|
+
from rnet import Client, Emulation
|
|
43
42
|
|
|
44
43
|
|
|
45
44
|
async def main():
|
|
@@ -24,43 +24,43 @@ def parse_arguments():
|
|
|
24
24
|
"""Parse command line arguments"""
|
|
25
25
|
parser = argparse.ArgumentParser(
|
|
26
26
|
description="HTTP Client Benchmark Tool",
|
|
27
|
-
formatter_class=argparse.ArgumentDefaultsHelpFormatter
|
|
27
|
+
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
|
28
28
|
)
|
|
29
29
|
|
|
30
30
|
parser.add_argument(
|
|
31
|
-
"--requests", "-r",
|
|
32
|
-
type=int,
|
|
33
|
-
default=400,
|
|
34
|
-
help="Number of requests per test"
|
|
31
|
+
"--requests", "-r", type=int, default=400, help="Number of requests per test"
|
|
35
32
|
)
|
|
36
33
|
|
|
37
34
|
parser.add_argument(
|
|
38
|
-
"--threads",
|
|
35
|
+
"--threads",
|
|
36
|
+
"-t",
|
|
39
37
|
type=int,
|
|
40
38
|
nargs="+",
|
|
41
39
|
default=[1, 4, 8, 16],
|
|
42
|
-
help="Thread counts to test (e.g., --threads 1 2 4 8)"
|
|
40
|
+
help="Thread counts to test (e.g., --threads 1 2 4 8)",
|
|
43
41
|
)
|
|
44
42
|
|
|
45
43
|
parser.add_argument(
|
|
46
|
-
"--output",
|
|
44
|
+
"--output",
|
|
45
|
+
"-o",
|
|
47
46
|
type=str,
|
|
48
47
|
default="benchmark_results.csv",
|
|
49
|
-
help="Output CSV file name"
|
|
48
|
+
help="Output CSV file name",
|
|
50
49
|
)
|
|
51
50
|
|
|
52
51
|
parser.add_argument(
|
|
53
|
-
"--chart",
|
|
52
|
+
"--chart",
|
|
53
|
+
"-c",
|
|
54
54
|
type=str,
|
|
55
55
|
default="benchmark_multi.jpg",
|
|
56
|
-
help="Output chart file name"
|
|
56
|
+
help="Output chart file name",
|
|
57
57
|
)
|
|
58
58
|
|
|
59
59
|
parser.add_argument(
|
|
60
60
|
"--base-url",
|
|
61
61
|
type=str,
|
|
62
62
|
default="http://127.0.0.1:8000",
|
|
63
|
-
help="Base URL for the benchmark server"
|
|
63
|
+
help="Base URL for the benchmark server",
|
|
64
64
|
)
|
|
65
65
|
|
|
66
66
|
return parser.parse_args()
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import asyncio
|
|
2
2
|
from rnet import Client
|
|
3
|
-
from rnet.tls import
|
|
3
|
+
from rnet.tls import KeyLog
|
|
4
4
|
from rnet.emulation import Emulation
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
async def main():
|
|
8
8
|
client = Client(
|
|
9
9
|
emulation=Emulation.Firefox139,
|
|
10
|
-
keylog=
|
|
10
|
+
keylog=KeyLog.file("keylog.log"),
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
resp = await client.get("https://www.google.com")
|
|
@@ -10,15 +10,16 @@ from typing import (
|
|
|
10
10
|
Dict,
|
|
11
11
|
List,
|
|
12
12
|
TypedDict,
|
|
13
|
+
Unpack,
|
|
14
|
+
NotRequired,
|
|
13
15
|
)
|
|
14
16
|
from pathlib import Path
|
|
15
17
|
from enum import Enum, auto
|
|
16
|
-
from typing import Unpack, NotRequired
|
|
17
18
|
|
|
18
19
|
from .cookie import Cookie, Jar
|
|
19
20
|
from .header import HeaderMap, OrigHeaderMap
|
|
20
21
|
from .emulation import Emulation, EmulationOption
|
|
21
|
-
from .tls import TlsVersion, Identity,
|
|
22
|
+
from .tls import TlsVersion, Identity, KeyLog, CertStore
|
|
22
23
|
|
|
23
24
|
class Method(Enum):
|
|
24
25
|
r"""
|
|
@@ -464,6 +465,16 @@ class Response:
|
|
|
464
465
|
Get the DER encoded leaf certificate of the response.
|
|
465
466
|
"""
|
|
466
467
|
|
|
468
|
+
def raise_for_status(self) -> None:
|
|
469
|
+
r"""
|
|
470
|
+
Turn a response into an error if the server returned an error.
|
|
471
|
+
"""
|
|
472
|
+
|
|
473
|
+
def stream(self) -> Streamer:
|
|
474
|
+
r"""
|
|
475
|
+
Get the response into a `Streamer` of `bytes` from the body.
|
|
476
|
+
"""
|
|
477
|
+
|
|
467
478
|
async def text(self) -> str:
|
|
468
479
|
r"""
|
|
469
480
|
Get the text content of the response.
|
|
@@ -484,11 +495,6 @@ class Response:
|
|
|
484
495
|
Get the bytes content of the response.
|
|
485
496
|
"""
|
|
486
497
|
|
|
487
|
-
def stream(self) -> Streamer:
|
|
488
|
-
r"""
|
|
489
|
-
Get the response into a `Stream` of `Bytes` from the body.
|
|
490
|
-
"""
|
|
491
|
-
|
|
492
498
|
async def close(self) -> None:
|
|
493
499
|
r"""
|
|
494
500
|
Close the response connection.
|
|
@@ -661,7 +667,7 @@ class ClientParams(TypedDict):
|
|
|
661
667
|
identity: NotRequired[Identity]
|
|
662
668
|
"""Represents a private key and X509 cert as a client certificate."""
|
|
663
669
|
|
|
664
|
-
keylog: NotRequired[
|
|
670
|
+
keylog: NotRequired[KeyLog]
|
|
665
671
|
"""Key logging policy (environment or file)."""
|
|
666
672
|
|
|
667
673
|
tls_info: NotRequired[bool]
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import datetime
|
|
2
|
-
from rnet import
|
|
2
|
+
from rnet import (
|
|
3
|
+
ClientParams,
|
|
4
|
+
History,
|
|
5
|
+
Message,
|
|
6
|
+
Request,
|
|
7
|
+
Streamer,
|
|
8
|
+
WebSocketRequest,
|
|
9
|
+
Version,
|
|
10
|
+
Method,
|
|
11
|
+
SocketAddr,
|
|
12
|
+
StatusCode,
|
|
13
|
+
)
|
|
3
14
|
from typing import (
|
|
4
15
|
Optional,
|
|
5
16
|
Any,
|
|
@@ -7,7 +18,6 @@ from typing import (
|
|
|
7
18
|
Unpack,
|
|
8
19
|
)
|
|
9
20
|
|
|
10
|
-
from rnet import Version, Method, SocketAddr, StatusCode
|
|
11
21
|
from rnet.header import HeaderMap
|
|
12
22
|
from rnet.cookie import Cookie
|
|
13
23
|
|
|
@@ -67,6 +77,17 @@ class Response:
|
|
|
67
77
|
Get the DER encoded leaf certificate of the response.
|
|
68
78
|
"""
|
|
69
79
|
|
|
80
|
+
def raise_for_status(self) -> None:
|
|
81
|
+
r"""
|
|
82
|
+
Turn a response into an error if the server returned an error.
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
def stream(self) -> Streamer:
|
|
86
|
+
r"""
|
|
87
|
+
Get the response into a `Streamer` of `bytes` from the body.
|
|
88
|
+
"""
|
|
89
|
+
...
|
|
90
|
+
|
|
70
91
|
def text(self) -> str:
|
|
71
92
|
r"""
|
|
72
93
|
Get the text content of the response.
|
|
@@ -90,12 +111,6 @@ class Response:
|
|
|
90
111
|
"""
|
|
91
112
|
...
|
|
92
113
|
|
|
93
|
-
def stream(self) -> Streamer:
|
|
94
|
-
r"""
|
|
95
|
-
Get the response into a `Stream` of `Bytes` from the body.
|
|
96
|
-
"""
|
|
97
|
-
...
|
|
98
|
-
|
|
99
114
|
def close(self) -> None:
|
|
100
115
|
r"""
|
|
101
116
|
Close the response connection.
|
|
@@ -28,6 +28,12 @@ __all__ = [
|
|
|
28
28
|
# ========================================
|
|
29
29
|
|
|
30
30
|
|
|
31
|
+
class RustPanic(Exception):
|
|
32
|
+
r"""
|
|
33
|
+
A panic occurred in the underlying Rust code.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
|
|
31
37
|
class DNSResolverError(RuntimeError):
|
|
32
38
|
r"""
|
|
33
39
|
An error occurred while resolving a DNS name.
|
|
@@ -10,7 +10,7 @@ from enum import Enum, auto
|
|
|
10
10
|
from pathlib import Path
|
|
11
11
|
from typing import List
|
|
12
12
|
|
|
13
|
-
__all__ = ["TlsVersion", "Identity", "CertStore", "
|
|
13
|
+
__all__ = ["TlsVersion", "Identity", "CertStore", "KeyLog"]
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class TlsVersion(Enum):
|
|
@@ -111,7 +111,7 @@ class CertStore:
|
|
|
111
111
|
...
|
|
112
112
|
|
|
113
113
|
|
|
114
|
-
class
|
|
114
|
+
class KeyLog:
|
|
115
115
|
"""
|
|
116
116
|
Specifies the intent for a (TLS) keylogger to be used in a client or server configuration.
|
|
117
117
|
|
|
@@ -121,9 +121,9 @@ class KeyLogPolicy:
|
|
|
121
121
|
with the correct session keys.
|
|
122
122
|
|
|
123
123
|
Static Methods:
|
|
124
|
-
environment() ->
|
|
124
|
+
environment() -> KeyLog
|
|
125
125
|
Use the SSLKEYLOGFILE environment variable for key logging.
|
|
126
|
-
file(path: Path) ->
|
|
126
|
+
file(path: Path) -> KeyLog
|
|
127
127
|
Log keys to the specified file path.
|
|
128
128
|
|
|
129
129
|
Methods:
|
|
@@ -134,14 +134,14 @@ class KeyLogPolicy:
|
|
|
134
134
|
"""
|
|
135
135
|
|
|
136
136
|
@staticmethod
|
|
137
|
-
def environment() -> "
|
|
137
|
+
def environment() -> "KeyLog":
|
|
138
138
|
"""
|
|
139
139
|
Use the SSLKEYLOGFILE environment variable for key logging.
|
|
140
140
|
"""
|
|
141
141
|
...
|
|
142
142
|
|
|
143
143
|
@staticmethod
|
|
144
|
-
def file(path: Path) -> "
|
|
144
|
+
def file(path: Path) -> "KeyLog":
|
|
145
145
|
"""
|
|
146
146
|
Log keys to the specified file path.
|
|
147
147
|
|
|
@@ -149,15 +149,3 @@ class KeyLogPolicy:
|
|
|
149
149
|
path: The file path to log TLS keys to.
|
|
150
150
|
"""
|
|
151
151
|
...
|
|
152
|
-
|
|
153
|
-
def is_environment(self) -> bool:
|
|
154
|
-
"""
|
|
155
|
-
Returns True if this policy uses the environment variable.
|
|
156
|
-
"""
|
|
157
|
-
...
|
|
158
|
-
|
|
159
|
-
def is_file(self) -> bool:
|
|
160
|
-
"""
|
|
161
|
-
Returns True if this policy logs to a specific file.
|
|
162
|
-
"""
|
|
163
|
-
...
|
|
@@ -34,6 +34,7 @@ impl<'a> IntoPyObject<'a> for PyBuffer {
|
|
|
34
34
|
type Output = Bound<'a, Self::Target>;
|
|
35
35
|
type Error = PyErr;
|
|
36
36
|
|
|
37
|
+
#[inline(always)]
|
|
37
38
|
fn into_pyobject(self, py: Python<'a>) -> Result<Self::Output, Self::Error> {
|
|
38
39
|
let buffer = self.0.into_py_any(py)?;
|
|
39
40
|
unsafe { Bound::from_owned_ptr_or_err(py, ffi::PyBytes_FromObject(buffer.as_ptr())) }
|
|
@@ -18,6 +18,8 @@ use pyo3::{
|
|
|
18
18
|
};
|
|
19
19
|
use serde::{Deserialize, Serialize};
|
|
20
20
|
|
|
21
|
+
use crate::rt::Runtime;
|
|
22
|
+
|
|
21
23
|
/// Represents the body of an HTTP request.
|
|
22
24
|
/// Supports text, bytes, synchronous and asynchronous streaming bodies.
|
|
23
25
|
pub enum Body {
|
|
@@ -51,7 +53,7 @@ impl FromPyObject<'_> for Body {
|
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
if ob.hasattr("asend")? {
|
|
54
|
-
|
|
56
|
+
Runtime::into_stream(ob.to_owned())
|
|
55
57
|
.map(AsyncStream::new)
|
|
56
58
|
.map(Self::AsyncStream)
|
|
57
59
|
} else {
|