koon 1.2.2__tar.gz → 2.0.0__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.
- {koon-1.2.2 → koon-2.0.0}/Cargo.lock +70 -8
- {koon-1.2.2 → koon-2.0.0}/Cargo.toml +1 -1
- {koon-1.2.2 → koon-2.0.0}/PKG-INFO +75 -36
- {koon-1.2.2 → koon-2.0.0}/README.md +73 -32
- {koon-1.2.2 → koon-2.0.0}/crates/core/Cargo.toml +9 -4
- koon-2.0.0/crates/core/data/references.toml +414 -0
- koon-2.0.0/crates/core/data/releases.toml +351 -0
- koon-2.0.0/crates/core/data/update.py +195 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/blocked.rs +54 -9
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/body.rs +21 -7
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/client_hints.rs +10 -8
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/connection.rs +29 -9
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/cookies.rs +26 -11
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/execute.rs +134 -20
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/h1.rs +4 -0
- koon-2.0.0/crates/core/src/client/headers/context.rs +91 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/headers/fetch_metadata.rs +109 -28
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/headers/mod.rs +37 -47
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/headers/tests/basic.rs +1 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/headers/tests/client_hints.rs +31 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/headers/tests/safari.rs +1 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/headers/tests/subresource.rs +33 -1
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/headers/tests/support.rs +18 -1
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/mod.rs +153 -29
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/response.rs +145 -57
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/cookie.rs +708 -77
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/dns/native.rs +8 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/error.rs +121 -17
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/lib.rs +2 -1
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/multipart.rs +83 -9
- koon-2.0.0/crates/core/src/options/doc.rs +118 -0
- koon-2.0.0/crates/core/src/options/mod.rs +749 -0
- koon-2.0.0/crates/core/src/options/table.rs +421 -0
- koon-2.0.0/crates/core/src/options/tests.rs +298 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/pool.rs +92 -11
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/brave.rs +2 -8
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/chrome/client_hints.rs +1 -233
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/chrome/headers.rs +5 -1
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/chrome/mod.rs +1 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/chrome/tls.rs +22 -3
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/edge.rs +39 -38
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/firefox.rs +4 -2
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/mod.rs +9 -3
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/okhttp.rs +7 -2
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/opera.rs +2 -18
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/opera_mobile.rs +2 -12
- koon-2.0.0/crates/core/src/profile/releases.rs +106 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/safari/headers.rs +10 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/safari/mod.rs +18 -269
- koon-2.0.0/crates/core/src/profile/safari/versions.rs +28 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/samsung.rs +2 -7
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/proxy/ca.rs +4 -9
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/proxy/config.rs +48 -7
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/streaming.rs +18 -10
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/tls/config.rs +14 -4
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/tls/connector.rs +23 -4
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/tls/root_store/chrome_root_store.rs +124 -122
- koon-2.0.0/crates/core/src/util.rs +91 -0
- koon-2.0.0/crates/core/src/verify/references.rs +514 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/verify.rs +30 -678
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/websocket.rs +38 -26
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/chrome_root_store.rs +10 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/clienthello.rs +2 -1
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/common/h3.rs +54 -5
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/common/mod.rs +1 -0
- koon-2.0.0/crates/core/tests/common/routes.rs +243 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/cookies.rs +1 -0
- koon-2.0.0/crates/core/tests/generated.rs +1156 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/http_plain.rs +158 -4
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/https_proxy.rs +7 -3
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/https_rr.rs +57 -3
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/local_tls.rs +41 -0
- koon-2.0.0/crates/core/tests/network_freshness.rs +189 -0
- koon-2.0.0/crates/core/tests/options_matrix.rs +378 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/quic_initial.rs +2 -1
- {koon-1.2.2 → koon-2.0.0}/crates/python/Cargo.toml +2 -2
- {koon-1.2.2 → koon-2.0.0}/crates/python/src/lib.rs +259 -320
- {koon-1.2.2 → koon-2.0.0}/crates/python/tests/test_cookies.py +28 -6
- {koon-1.2.2 → koon-2.0.0}/crates/python/tests/test_offline.py +41 -2
- {koon-1.2.2 → koon-2.0.0}/crates/python/tests/test_proxy.py +16 -0
- {koon-1.2.2 → koon-2.0.0}/crates/python/tests/test_stub.py +17 -25
- {koon-1.2.2 → koon-2.0.0}/pyproject.toml +2 -4
- {koon-1.2.2 → koon-2.0.0}/python/koon/__init__.py +34 -15
- {koon-1.2.2 → koon-2.0.0}/python/koon/__init__.pyi +273 -163
- {koon-1.2.2 → koon-2.0.0}/python/koon/httpx.pyi +3 -1
- {koon-1.2.2 → koon-2.0.0}/python/koon/requests.pyi +4 -1
- koon-1.2.2/crates/core/src/util.rs +0 -27
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/alt_svc.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/blink_header_map.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/h2.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/h3.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/headers/order.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/headers/order_tables.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/headers/tests/mod.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/headers/util.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/headers/websocket.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/options.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/request_body.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/client/ws.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/dns/cache.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/dns/mod.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/dns/resolver.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/http1.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/http2/config.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/http2/mod.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/accept_language/mod.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/accept_language/tables.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/accept_language/tests.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/chrome/http2.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/chrome/quic.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/safari/http2.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/safari/quic.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/profile/safari/tls.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/proxy/mod.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/proxy/server.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/quic/config.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/quic/mod.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/quic/transport.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/tls/cert_compression.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/tls/ech_grease.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/tls/keylog.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/tls/mod.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/tls/root_store/mod.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/tls/session_cache.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/src/tls/sigalgs.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/client_hints.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/fingerprint.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/h2_frames.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/h3_local.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/keylog.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/network_browser_ua.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/network_doh.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/network_google_client_hints.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/network_http.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/network_pool.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/network_redirects.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/network_root_store.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/network_sessions.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/network_streaming.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/network_websocket.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/profile_roundtrip.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/proxy_server.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/transport.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/core/tests/websocket_h2.rs +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/python/tests/conftest.py +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/python/tests/test_adapter_httpx.py +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/python/tests/test_adapter_requests.py +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/python/tests/test_https_proxy.py +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/python/tests/test_network.py +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/python/tests/test_streaming.py +0 -0
- {koon-1.2.2 → koon-2.0.0}/crates/python/tests/test_sync.py +0 -0
- {koon-1.2.2 → koon-2.0.0}/python/koon/_adapter.py +0 -0
- {koon-1.2.2 → koon-2.0.0}/python/koon/httpx.py +0 -0
- {koon-1.2.2 → koon-2.0.0}/python/koon/py.typed +0 -0
- {koon-1.2.2 → koon-2.0.0}/python/koon/requests.py +0 -0
|
@@ -174,7 +174,7 @@ dependencies = [
|
|
|
174
174
|
[[package]]
|
|
175
175
|
name = "btls"
|
|
176
176
|
version = "0.5.5"
|
|
177
|
-
source = "git+https://github.com/scrape-hub/btls.git?tag=koon-
|
|
177
|
+
source = "git+https://github.com/scrape-hub/btls.git?tag=koon-2.0.0#90905f3f655f0e6cbda31605b445ec24c9832808"
|
|
178
178
|
dependencies = [
|
|
179
179
|
"bitflags",
|
|
180
180
|
"btls-sys",
|
|
@@ -186,7 +186,7 @@ dependencies = [
|
|
|
186
186
|
[[package]]
|
|
187
187
|
name = "btls-sys"
|
|
188
188
|
version = "0.5.5"
|
|
189
|
-
source = "git+https://github.com/scrape-hub/btls.git?tag=koon-
|
|
189
|
+
source = "git+https://github.com/scrape-hub/btls.git?tag=koon-2.0.0#90905f3f655f0e6cbda31605b445ec24c9832808"
|
|
190
190
|
dependencies = [
|
|
191
191
|
"bindgen",
|
|
192
192
|
"cmake",
|
|
@@ -1028,7 +1028,7 @@ dependencies = [
|
|
|
1028
1028
|
|
|
1029
1029
|
[[package]]
|
|
1030
1030
|
name = "koon-cli"
|
|
1031
|
-
version = "
|
|
1031
|
+
version = "2.0.0"
|
|
1032
1032
|
dependencies = [
|
|
1033
1033
|
"bytes",
|
|
1034
1034
|
"clap",
|
|
@@ -1042,7 +1042,7 @@ dependencies = [
|
|
|
1042
1042
|
|
|
1043
1043
|
[[package]]
|
|
1044
1044
|
name = "koon-core"
|
|
1045
|
-
version = "
|
|
1045
|
+
version = "2.0.0"
|
|
1046
1046
|
dependencies = [
|
|
1047
1047
|
"base64",
|
|
1048
1048
|
"brotli",
|
|
@@ -1060,6 +1060,7 @@ dependencies = [
|
|
|
1060
1060
|
"httparse",
|
|
1061
1061
|
"koon-core",
|
|
1062
1062
|
"lru",
|
|
1063
|
+
"percent-encoding",
|
|
1063
1064
|
"psl",
|
|
1064
1065
|
"quinn",
|
|
1065
1066
|
"quinn-btls",
|
|
@@ -1072,6 +1073,7 @@ dependencies = [
|
|
|
1072
1073
|
"tokio-btls",
|
|
1073
1074
|
"tokio-socks",
|
|
1074
1075
|
"tokio-tungstenite",
|
|
1076
|
+
"toml",
|
|
1075
1077
|
"tungstenite",
|
|
1076
1078
|
"url",
|
|
1077
1079
|
"webpki-root-certs",
|
|
@@ -1080,7 +1082,7 @@ dependencies = [
|
|
|
1080
1082
|
|
|
1081
1083
|
[[package]]
|
|
1082
1084
|
name = "koon-node"
|
|
1083
|
-
version = "
|
|
1085
|
+
version = "2.0.0"
|
|
1084
1086
|
dependencies = [
|
|
1085
1087
|
"http",
|
|
1086
1088
|
"indexmap",
|
|
@@ -1093,7 +1095,7 @@ dependencies = [
|
|
|
1093
1095
|
|
|
1094
1096
|
[[package]]
|
|
1095
1097
|
name = "koon-python"
|
|
1096
|
-
version = "
|
|
1098
|
+
version = "2.0.0"
|
|
1097
1099
|
dependencies = [
|
|
1098
1100
|
"koon-core",
|
|
1099
1101
|
"pyo3",
|
|
@@ -1503,7 +1505,7 @@ dependencies = [
|
|
|
1503
1505
|
[[package]]
|
|
1504
1506
|
name = "quinn-btls"
|
|
1505
1507
|
version = "0.1.0"
|
|
1506
|
-
source = "git+https://github.com/scrape-hub/btls.git?tag=koon-
|
|
1508
|
+
source = "git+https://github.com/scrape-hub/btls.git?tag=koon-2.0.0#90905f3f655f0e6cbda31605b445ec24c9832808"
|
|
1507
1509
|
dependencies = [
|
|
1508
1510
|
"btls",
|
|
1509
1511
|
"btls-sys",
|
|
@@ -1794,6 +1796,15 @@ dependencies = [
|
|
|
1794
1796
|
"zmij",
|
|
1795
1797
|
]
|
|
1796
1798
|
|
|
1799
|
+
[[package]]
|
|
1800
|
+
name = "serde_spanned"
|
|
1801
|
+
version = "1.1.2"
|
|
1802
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1803
|
+
checksum = "4e7523beb55eece201a2356bee0bbca0d1ab466c14c07703b2e0ee6d42cb0c2c"
|
|
1804
|
+
dependencies = [
|
|
1805
|
+
"serde_core",
|
|
1806
|
+
]
|
|
1807
|
+
|
|
1797
1808
|
[[package]]
|
|
1798
1809
|
name = "sha1"
|
|
1799
1810
|
version = "0.10.6"
|
|
@@ -2004,7 +2015,7 @@ dependencies = [
|
|
|
2004
2015
|
[[package]]
|
|
2005
2016
|
name = "tokio-btls"
|
|
2006
2017
|
version = "0.5.5"
|
|
2007
|
-
source = "git+https://github.com/scrape-hub/btls.git?tag=koon-
|
|
2018
|
+
source = "git+https://github.com/scrape-hub/btls.git?tag=koon-2.0.0#90905f3f655f0e6cbda31605b445ec24c9832808"
|
|
2008
2019
|
dependencies = [
|
|
2009
2020
|
"btls",
|
|
2010
2021
|
"tokio",
|
|
@@ -2058,6 +2069,45 @@ dependencies = [
|
|
|
2058
2069
|
"tokio",
|
|
2059
2070
|
]
|
|
2060
2071
|
|
|
2072
|
+
[[package]]
|
|
2073
|
+
name = "toml"
|
|
2074
|
+
version = "0.9.12+spec-1.1.0"
|
|
2075
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2076
|
+
checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863"
|
|
2077
|
+
dependencies = [
|
|
2078
|
+
"indexmap",
|
|
2079
|
+
"serde_core",
|
|
2080
|
+
"serde_spanned",
|
|
2081
|
+
"toml_datetime",
|
|
2082
|
+
"toml_parser",
|
|
2083
|
+
"toml_writer",
|
|
2084
|
+
"winnow 0.7.15",
|
|
2085
|
+
]
|
|
2086
|
+
|
|
2087
|
+
[[package]]
|
|
2088
|
+
name = "toml_datetime"
|
|
2089
|
+
version = "0.7.5+spec-1.1.0"
|
|
2090
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2091
|
+
checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347"
|
|
2092
|
+
dependencies = [
|
|
2093
|
+
"serde_core",
|
|
2094
|
+
]
|
|
2095
|
+
|
|
2096
|
+
[[package]]
|
|
2097
|
+
name = "toml_parser"
|
|
2098
|
+
version = "1.1.5+spec-1.1.0"
|
|
2099
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2100
|
+
checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c"
|
|
2101
|
+
dependencies = [
|
|
2102
|
+
"winnow 1.0.4",
|
|
2103
|
+
]
|
|
2104
|
+
|
|
2105
|
+
[[package]]
|
|
2106
|
+
name = "toml_writer"
|
|
2107
|
+
version = "1.1.3+spec-1.1.0"
|
|
2108
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2109
|
+
checksum = "06bdbd8cfc056b8d2e2e85f29b56a3bdbecb527cef81eb39e3e7b98af4652770"
|
|
2110
|
+
|
|
2061
2111
|
[[package]]
|
|
2062
2112
|
name = "tracing"
|
|
2063
2113
|
version = "0.1.44"
|
|
@@ -2525,6 +2575,18 @@ version = "0.53.1"
|
|
|
2525
2575
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2526
2576
|
checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
|
|
2527
2577
|
|
|
2578
|
+
[[package]]
|
|
2579
|
+
name = "winnow"
|
|
2580
|
+
version = "0.7.15"
|
|
2581
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2582
|
+
checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"
|
|
2583
|
+
|
|
2584
|
+
[[package]]
|
|
2585
|
+
name = "winnow"
|
|
2586
|
+
version = "1.0.4"
|
|
2587
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2588
|
+
checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81"
|
|
2589
|
+
|
|
2528
2590
|
[[package]]
|
|
2529
2591
|
name = "wit-bindgen"
|
|
2530
2592
|
version = "0.51.0"
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: koon
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Classifier: Development Status :: 5 - Production/Stable
|
|
5
5
|
Classifier: Programming Language :: Rust
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
7
7
|
Classifier: Programming Language :: Python :: 3
|
|
8
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
9
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
10
8
|
Classifier: Programming Language :: Python :: 3.11
|
|
11
9
|
Classifier: Programming Language :: Python :: 3.12
|
|
12
10
|
Classifier: Programming Language :: Python :: 3.13
|
|
@@ -30,7 +28,7 @@ Summary: Browser-impersonating HTTP client: TLS, HTTP/2 and HTTP/3 fingerprints
|
|
|
30
28
|
Keywords: tls-fingerprint,browser-impersonation,http2-fingerprint,anti-bot,web-scraping,akamai,cloudflare,ja3,ja4,http-client,proxy,scraping,stealth,curl-impersonate,boringssl
|
|
31
29
|
Author: scrape-hub
|
|
32
30
|
License: MIT
|
|
33
|
-
Requires-Python: >=3.
|
|
31
|
+
Requires-Python: >=3.11
|
|
34
32
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
35
33
|
Project-URL: Changelog, https://github.com/scrape-hub/koon/blob/master/CHANGELOG.md
|
|
36
34
|
Project-URL: Documentation, https://github.com/scrape-hub/koon#quick-start
|
|
@@ -58,7 +56,7 @@ Every binding uses the same fingerprint engine, so a profile behaves the same fr
|
|
|
58
56
|
npm install koonjs
|
|
59
57
|
```
|
|
60
58
|
|
|
61
|
-
**Python**
|
|
59
|
+
**Python** (3.11 or newer)
|
|
62
60
|
```bash
|
|
63
61
|
pip install koon
|
|
64
62
|
pip install "koon[httpx]" # with the httpx transport's dependency
|
|
@@ -68,17 +66,17 @@ pip install "koon[requests]" # with the requests adapter's dependency
|
|
|
68
66
|
**R**
|
|
69
67
|
```r
|
|
70
68
|
# Windows, or macOS on Apple silicon, with R 4.6: the prebuilt package of the release
|
|
71
|
-
install.packages("https://github.com/scrape-hub/koon/releases/download/
|
|
72
|
-
install.packages("https://github.com/scrape-hub/koon/releases/download/
|
|
69
|
+
install.packages("https://github.com/scrape-hub/koon/releases/download/v2.0.0/koon_2.0.0.zip", repos = NULL) # Windows
|
|
70
|
+
install.packages("https://github.com/scrape-hub/koon/releases/download/v2.0.0/koon_2.0.0.tgz", repos = NULL) # macOS
|
|
73
71
|
|
|
74
|
-
# Other platforms and R versions build from source: Rust 1.85+ and CMake, on
|
|
75
|
-
#
|
|
72
|
+
# Other platforms and R versions build from source: Rust 1.85+ and CMake, on Windows
|
|
73
|
+
# also Rtools and `rustup target add x86_64-pc-windows-gnu`
|
|
76
74
|
remotes::install_github("scrape-hub/koon", subdir = "crates/r")
|
|
77
75
|
```
|
|
78
76
|
|
|
79
77
|
**CLI**: download from [Releases](https://github.com/scrape-hub/koon/releases), or:
|
|
80
78
|
```bash
|
|
81
|
-
cargo install --git https://github.com/scrape-hub/koon koon-cli
|
|
79
|
+
cargo install --locked --git https://github.com/scrape-hub/koon koon-cli
|
|
82
80
|
```
|
|
83
81
|
|
|
84
82
|
**Claude Code**: [koon-mcp](https://github.com/scrape-hub/koon-mcp) fetches web pages and PDFs for Claude through koon.
|
|
@@ -149,7 +147,6 @@ Every fingerprint change of every browser is checked against captures from the r
|
|
|
149
147
|
|---|---|---|---|
|
|
150
148
|
| indeed.com | 403 | 403 | 200 |
|
|
151
149
|
| bloomberg.com | 403 | 403 | 200 |
|
|
152
|
-
| reuters.com | 401 | 401 | 200 |
|
|
153
150
|
| tripadvisor.com | 403 | 403 | 200 |
|
|
154
151
|
| expedia.com | 429 | 429 | 200 |
|
|
155
152
|
| stockx.com | 403 | 403 | 200 |
|
|
@@ -170,28 +167,28 @@ Match the language to the IP as well. koon asks for English pages unless you set
|
|
|
170
167
|
|
|
171
168
|
| Browser | Versions | Platforms | Profiles |
|
|
172
169
|
|---------|----------|-----------|----------|
|
|
173
|
-
| Chrome | 131-
|
|
174
|
-
| Firefox | 135-
|
|
170
|
+
| Chrome | 131-157 | Windows, macOS, Linux, Android | 108 |
|
|
171
|
+
| Firefox | 135-159 | Windows, macOS, Linux, Android | 100 |
|
|
175
172
|
| Safari | 15.6-27.0 | macOS, iOS | 41 |
|
|
176
|
-
| Edge | 131-
|
|
177
|
-
| Opera | 124-
|
|
173
|
+
| Edge | 131-156 | Windows, macOS, Android | 78 |
|
|
174
|
+
| Opera | 124-139 | Windows, macOS, Linux | 48 |
|
|
178
175
|
| Opera Mobile | 102 | Android | 1 |
|
|
179
|
-
| Brave | 153-
|
|
176
|
+
| Brave | 153-156 (1.95 to 1.98) | Windows, macOS, Linux, Android | 16 |
|
|
180
177
|
| Samsung Internet | 29-30 | Android | 2 |
|
|
181
178
|
| OkHttp | 4, 5 | Android | 2 |
|
|
182
179
|
|
|
183
|
-
**
|
|
180
|
+
**396 profiles** total. `koon --list-browsers`, `Koon.browsers()` (Node), `koon.browsers()` (Python) and `koon_browsers()` (R) list them all.
|
|
184
181
|
|
|
185
182
|
### Profile naming
|
|
186
183
|
|
|
187
|
-
Format: `{browser}{version}{-os}`. All parts but the browser name are optional, dash included (`chrome154-macos` or `chrome154macos`). Omit the version for the latest of any browser. Without an OS, desktop browsers default to Windows except Safari (macOS); Brave is named by the Chromium version it reports (`
|
|
184
|
+
Format: `{browser}{version}{-os}`. All parts but the browser name are optional, dash included (`chrome154-macos` or `chrome154macos`). Omit the version for the latest of any browser. Without an OS, desktop browsers default to Windows except Safari (macOS); Brave is named by the Chromium version it reports (`brave156` = Brave 1.98).
|
|
188
185
|
|
|
189
186
|
| Browser | Example profiles |
|
|
190
187
|
|---------|-------------------|
|
|
191
|
-
| Chrome, Firefox, Opera | `
|
|
192
|
-
| Edge, Brave | `
|
|
188
|
+
| Chrome, Firefox, Opera | `chrome157`, `-windows`, `-macos`, `-linux` |
|
|
189
|
+
| Edge, Brave | `edge156`, `-windows`, `-macos` (Brave also `-linux`) |
|
|
193
190
|
| Safari | `safari270-macos` |
|
|
194
|
-
| Chrome/Firefox/Edge/Brave Mobile (Android) | `chrome-
|
|
191
|
+
| Chrome/Firefox/Edge/Brave Mobile (Android) | `chrome-mobile157`, `firefox-mobile159`, `edge-mobile156`, `brave-mobile156` |
|
|
195
192
|
| Safari Mobile (iOS) | `safari-mobile270` |
|
|
196
193
|
| Samsung Internet, Opera Mobile (Android) | `samsung30`, `opera-mobile102` |
|
|
197
194
|
| OkHttp | `okhttp4`, `okhttp5` (`-android` suffix optional) |
|
|
@@ -204,15 +201,15 @@ Chrome Mobile and Firefox Mobile send their desktop counterpart's fingerprint wi
|
|
|
204
201
|
|
|
205
202
|
- **Fingerprints on every layer**: TLS, HTTP/2 and HTTP/3 as in the table above; header order, casing and values of navigations, form posts, fetch() calls and WebSocket handshakes, with cookie, referer, origin and your own headers where the browser puts them; the client hints Chromium sends when a site asks for them
|
|
206
203
|
- **HTTP/3 like the browser**: found through Alt-Svc or, on the first connection, the DNS HTTPS record; racing TCP like Chrome or straight to QUIC like Safari, with fallback to TCP; 0-RTT on resumed connections
|
|
207
|
-
- **Encrypted Client Hello and DNS**: real ECH from DNS HTTPS records over TCP and QUIC, read over DNS-over-HTTPS (Cloudflare, Google) or, as Chrome and Firefox do by default, with a plain query to the system's nameserver; ECH GREASE in the browser's shape otherwise
|
|
208
|
-
- **Chrome's field trials**:
|
|
204
|
+
- **Encrypted Client Hello and DNS**: real ECH from DNS HTTPS records over TCP and QUIC, read over DNS-over-HTTPS (Cloudflare, Google) or, as Chrome and Firefox do by default, with a plain query to the system's nameserver; ECH GREASE in the browser's shape otherwise
|
|
205
|
+
- **Chrome's field trials**: while a Chrome field trial runs, a client may be enrolled like a slice of real Chrome installations; the handshake-padding trial ran until 2026-10-30, and `serverPadding`, `server_padding` or `--server-padding` still pin one of its groups
|
|
209
206
|
- **Fingerprint self-test**: `koon verify` checks your installed koon against the real browsers' fingerprints (see [below](#fingerprint-self-test))
|
|
210
207
|
- **TLS sessions and certificates**: session tickets per origin, used once, over TCP and QUIC; certificates verified against Mozilla's roots plus every trust anchor of the Chrome Root Store
|
|
211
208
|
- **Cookies and sessions**: a jar with domain, path, expiry, Secure, HttpOnly, SameSite, `__Host-`/`__Secure-` prefixes and public-suffix protection; import and export as Playwright/CDP cookie objects; save and load cookies and TLS tickets as JSON
|
|
212
|
-
- **Proxies**: HTTP, HTTPS and SOCKS5, round-robin rotation, custom CONNECT headers; retries switch the proxy and never send a POST twice; HTTP/3
|
|
209
|
+
- **Proxies**: HTTP, HTTPS and SOCKS5 (`socks5://` or `socks5h://`, both resolved by the proxy), round-robin rotation, custom CONNECT headers; retries switch the proxy and never send a POST twice; through a proxy, koon does not use HTTP/3
|
|
213
210
|
- **MITM proxy server**: re-sends any program's traffic through koon; loopback only unless allowed, optional authentication, capped connections
|
|
214
211
|
- **WebSocket**: `wss://` and `ws://` with the browser's handshake, over HTTP/2 where the browser uses it; send and receive concurrently
|
|
215
|
-
- **Streaming**: response bodies read on demand with backpressure, uploads from a stream, multipart forms with the browser's boundary format
|
|
212
|
+
- **Streaming**: response bodies read on demand with backpressure, uploads from a stream (Rust, and the CLI for files over 16 MiB), multipart forms with the browser's boundary format
|
|
216
213
|
- **Hooks**: `onRequest`, `onResponse` and `onRedirect` for logging, guards and stopping a redirect to a captcha, per client or per request
|
|
217
214
|
- **Per-request options**: headers, timeout, proxy and redirect following without touching the client
|
|
218
215
|
- **Response body cap**: 100 MiB by default, decompression bombs included
|
|
@@ -223,7 +220,7 @@ Chrome Mobile and Firefox Mobile send their desktop counterpart's fingerprint wi
|
|
|
223
220
|
- **Key logging**: `SSLKEYLOGFILE` writes the TLS secrets (TCP, QUIC and DoH) for Wireshark
|
|
224
221
|
- **Custom profiles**: export a profile as JSON, change it and load it back (see [Custom profiles](#custom-profiles))
|
|
225
222
|
- **Drop-in adapters**: an httpx transport, a requests adapter and a `fetch()` for Node; `KoonSync`, a blocking Python client
|
|
226
|
-
- **Structured errors**: a machine-readable code on every error (`TIMEOUT`, `TLS_ERROR`, `PROXY_ERROR`, ...)
|
|
223
|
+
- **Structured errors**: a machine-readable code on every error (`TIMEOUT`, `TLS_ERROR`, `PROXY_ERROR`, ...), and for a request's transport failure the phase it failed in (`connect`, `request` or `body`)
|
|
227
224
|
|
|
228
225
|
## Usage
|
|
229
226
|
|
|
@@ -587,10 +584,39 @@ resp <- client$get("https://httpbin.org/cookies")
|
|
|
587
584
|
# Clear cookies (keeps TLS sessions and connection pool)
|
|
588
585
|
client$clear_cookies()
|
|
589
586
|
|
|
590
|
-
# Session save/load
|
|
587
|
+
# Session save/load, as JSON or to a file
|
|
591
588
|
json <- client$save_session()
|
|
592
589
|
client2 <- Koon$new("chrome")
|
|
593
590
|
client2$load_session(json)
|
|
591
|
+
client$save_session_to_file("session.json")
|
|
592
|
+
client2$load_session_from_file("session.json")
|
|
593
|
+
|
|
594
|
+
# Multipart upload
|
|
595
|
+
resp <- client$post_multipart("https://httpbin.org/post", list(
|
|
596
|
+
list(name = "field", value = "text"),
|
|
597
|
+
list(name = "file", file_data = as.raw(c(0x89, 0x50, 0x4e, 0x47)),
|
|
598
|
+
filename = "photo.png", content_type = "image/png")
|
|
599
|
+
))
|
|
600
|
+
|
|
601
|
+
# Streaming: the head first, then the body chunk by chunk (raw vectors)
|
|
602
|
+
resp <- client$request_streaming("GET", "https://httpbin.org/stream/5")
|
|
603
|
+
while (!is.null(chunk <- resp$stream$next_chunk())) cat(rawToChar(chunk))
|
|
604
|
+
|
|
605
|
+
# WebSocket
|
|
606
|
+
ws <- client$websocket("wss://ws.postman-echo.com/raw")
|
|
607
|
+
ws$send("hello")
|
|
608
|
+
ws$receive() # list(type = "text", data = "hello")
|
|
609
|
+
ws$close()
|
|
610
|
+
|
|
611
|
+
# A request's transport failure names how far it got
|
|
612
|
+
err <- tryCatch(client$get("https://10.255.255.1/", timeout = 1), koon_error = identity)
|
|
613
|
+
err$code # "TIMEOUT"
|
|
614
|
+
err$phase # "connect": nothing was sent, so sending it again cannot repeat it
|
|
615
|
+
|
|
616
|
+
# Local MITM proxy for other programs
|
|
617
|
+
proxy <- KoonProxy$start(browser = "firefox", listen_addr = "127.0.0.1:8080")
|
|
618
|
+
proxy$url() # "http://127.0.0.1:8080"
|
|
619
|
+
proxy$shutdown()
|
|
594
620
|
|
|
595
621
|
# Export profile as JSON
|
|
596
622
|
client$export_profile()
|
|
@@ -688,8 +714,9 @@ one fits (6 host not resolved, 7 connection failed, 22 HTTP error with
|
|
|
688
714
|
```toml
|
|
689
715
|
[dependencies]
|
|
690
716
|
koon-core = { git = "https://github.com/scrape-hub/koon.git" }
|
|
691
|
-
#
|
|
692
|
-
#
|
|
717
|
+
# Without the default `doh` feature, profiles find neither HTTP/3 nor real ECH
|
|
718
|
+
# from DNS HTTPS records:
|
|
719
|
+
# koon-core = { git = "https://github.com/scrape-hub/koon.git", default-features = false, features = ["socks"] }
|
|
693
720
|
```
|
|
694
721
|
|
|
695
722
|
BoringSSL is built with the optimisation level of your profile. Debug builds
|
|
@@ -756,17 +783,18 @@ async fn main() -> Result<(), koon_core::Error> {
|
|
|
756
783
|
fingerprints of the real browsers. Each profile connects to
|
|
757
784
|
[tls.browserleaks.com](https://tls.browserleaks.com/json) (tls.peet.ws if that
|
|
758
785
|
fails), which reports the JA4, JA3N, JA3 and Akamai HTTP/2 fingerprint it sees.
|
|
759
|
-
Where a QUIC reference exists (Chrome 134-
|
|
760
|
-
Firefox and the Safari releases whose transport
|
|
786
|
+
Where a QUIC reference exists (Chrome 134-157, Edge 153-156, Opera 136-139, Brave, Opera Mobile,
|
|
787
|
+
Firefox 155-159 on the desktop and 146-159 on Android, and the Safari releases whose transport
|
|
788
|
+
parameters were captured;
|
|
761
789
|
Samsung Internet uses no HTTP/3), the
|
|
762
790
|
check also goes over HTTP/3 to quic.browserleaks.com for the QUIC JA4. Every
|
|
763
791
|
field is compared with the value captured from the real browser.
|
|
764
792
|
|
|
765
793
|
```
|
|
766
794
|
$ koon verify -b firefox
|
|
767
|
-
firefox ->
|
|
768
|
-
reference firefox-156: Firefox 156-
|
|
769
|
-
reference firefox-quic: QUIC JA4 of real Firefox 155.0.1, 157.0 beta
|
|
795
|
+
firefox -> firefox159-windows: match
|
|
796
|
+
reference firefox-156: Firefox 156-159 (without ffdhe groups): real Firefox 156.0.1 and 159.0.1 captures; 157 and 158 from the 157.0 and 158.0b5 betas (ClientHello capture and tls.browserleaks.com)
|
|
797
|
+
reference firefox-quic: QUIC JA4 of real Firefox 155.0.1, 157.0 beta, 158.0b5 and 159.0.1 QUIC ClientHellos (157 to 159 also from quic.browserleaks.com)
|
|
770
798
|
service https://tls.browserleaks.com/json
|
|
771
799
|
http3 https://quic.browserleaks.com/?minify=1
|
|
772
800
|
ja4 match t13d1517h2_8daaf6152771_3cbfd9057e0d
|
|
@@ -816,6 +844,11 @@ report = koon.verify("firefox")
|
|
|
816
844
|
print(report["outcome"], [f for f in report["fields"] if f["status"] == "mismatch"])
|
|
817
845
|
```
|
|
818
846
|
|
|
847
|
+
```r
|
|
848
|
+
report <- koon_verify("safari", doh = "cloudflare")
|
|
849
|
+
report$outcome
|
|
850
|
+
```
|
|
851
|
+
|
|
819
852
|
In Rust, `koon_core::verify::verify("chrome", None)` returns a `VerifyReport`;
|
|
820
853
|
`verify_with` checks with a client you built (proxy, DNS, local address), and
|
|
821
854
|
`references_for` gives the reference values of a profile.
|
|
@@ -842,6 +875,7 @@ proxy takes a profile the same way (`koon proxy --profile`).
|
|
|
842
875
|
| `quic` | Optional; without it the profile does not use HTTP/3. The QUIC stack whose wire behaviour it follows (`chromium`, `neqo` or `apple`), transport parameters, HTTP/3 SETTINGS and an optional QUIC ClientHello (`tls`) |
|
|
843
876
|
| `headers` | The headers of a navigation and their values |
|
|
844
877
|
| `header_family` | Optional: `chromium`, `firefox`, `safari`, `okhttp` or `other`, whose header order and browser rules requests follow; detected from the headers when missing |
|
|
878
|
+
| `multipart` | Optional: `webkit`, `gecko`, `okhttp4` or `okhttp5`, how the client encodes multipart bodies; follows `header_family` when missing |
|
|
845
879
|
| `ua_client_hints` | Optional, for Chromium profiles: the high-entropy client hint values (`full_version`, `full_version_list`, `platform_version`, `architecture`, `bitness`, `model`, `wow64`, `form_factors`) and the device's `device_memory_mib`, `device_pixel_ratio` and `viewport_px` (`[width, height]` in device pixels), sent when a site asks for them |
|
|
846
880
|
|
|
847
881
|
The optional `http2` keys reproduce a browser's frame layout; a key left out
|
|
@@ -889,10 +923,15 @@ Key dependencies:
|
|
|
889
923
|
Only needed if you want to build koon yourself instead of using the published packages.
|
|
890
924
|
|
|
891
925
|
**Requirements:**
|
|
892
|
-
- Rust 1.85+
|
|
926
|
+
- Rust 1.85+ (1.88+ for the Node.js addon)
|
|
893
927
|
- CMake
|
|
894
|
-
- NASM
|
|
928
|
+
- NASM on Windows x64 (or `BORING_BSSL_NO_ASM=1` for BoringSSL's slower portable C)
|
|
895
929
|
- C compiler: MSVC (Windows), GCC or Clang (Linux/macOS)
|
|
930
|
+
- libclang only on a platform without prebuilt BoringSSL bindings (other than Linux, macOS and
|
|
931
|
+
Windows on x64 and arm64), for bindgen
|
|
932
|
+
|
|
933
|
+
The same applies to `pip install koon` on a platform without a prebuilt wheel, which builds from
|
|
934
|
+
the source distribution.
|
|
896
935
|
|
|
897
936
|
```bash
|
|
898
937
|
# Core library
|
|
@@ -18,7 +18,7 @@ Every binding uses the same fingerprint engine, so a profile behaves the same fr
|
|
|
18
18
|
npm install koonjs
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
**Python**
|
|
21
|
+
**Python** (3.11 or newer)
|
|
22
22
|
```bash
|
|
23
23
|
pip install koon
|
|
24
24
|
pip install "koon[httpx]" # with the httpx transport's dependency
|
|
@@ -28,17 +28,17 @@ pip install "koon[requests]" # with the requests adapter's dependency
|
|
|
28
28
|
**R**
|
|
29
29
|
```r
|
|
30
30
|
# Windows, or macOS on Apple silicon, with R 4.6: the prebuilt package of the release
|
|
31
|
-
install.packages("https://github.com/scrape-hub/koon/releases/download/
|
|
32
|
-
install.packages("https://github.com/scrape-hub/koon/releases/download/
|
|
31
|
+
install.packages("https://github.com/scrape-hub/koon/releases/download/v2.0.0/koon_2.0.0.zip", repos = NULL) # Windows
|
|
32
|
+
install.packages("https://github.com/scrape-hub/koon/releases/download/v2.0.0/koon_2.0.0.tgz", repos = NULL) # macOS
|
|
33
33
|
|
|
34
|
-
# Other platforms and R versions build from source: Rust 1.85+ and CMake, on
|
|
35
|
-
#
|
|
34
|
+
# Other platforms and R versions build from source: Rust 1.85+ and CMake, on Windows
|
|
35
|
+
# also Rtools and `rustup target add x86_64-pc-windows-gnu`
|
|
36
36
|
remotes::install_github("scrape-hub/koon", subdir = "crates/r")
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
**CLI**: download from [Releases](https://github.com/scrape-hub/koon/releases), or:
|
|
40
40
|
```bash
|
|
41
|
-
cargo install --git https://github.com/scrape-hub/koon koon-cli
|
|
41
|
+
cargo install --locked --git https://github.com/scrape-hub/koon koon-cli
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
**Claude Code**: [koon-mcp](https://github.com/scrape-hub/koon-mcp) fetches web pages and PDFs for Claude through koon.
|
|
@@ -109,7 +109,6 @@ Every fingerprint change of every browser is checked against captures from the r
|
|
|
109
109
|
|---|---|---|---|
|
|
110
110
|
| indeed.com | 403 | 403 | 200 |
|
|
111
111
|
| bloomberg.com | 403 | 403 | 200 |
|
|
112
|
-
| reuters.com | 401 | 401 | 200 |
|
|
113
112
|
| tripadvisor.com | 403 | 403 | 200 |
|
|
114
113
|
| expedia.com | 429 | 429 | 200 |
|
|
115
114
|
| stockx.com | 403 | 403 | 200 |
|
|
@@ -130,28 +129,28 @@ Match the language to the IP as well. koon asks for English pages unless you set
|
|
|
130
129
|
|
|
131
130
|
| Browser | Versions | Platforms | Profiles |
|
|
132
131
|
|---------|----------|-----------|----------|
|
|
133
|
-
| Chrome | 131-
|
|
134
|
-
| Firefox | 135-
|
|
132
|
+
| Chrome | 131-157 | Windows, macOS, Linux, Android | 108 |
|
|
133
|
+
| Firefox | 135-159 | Windows, macOS, Linux, Android | 100 |
|
|
135
134
|
| Safari | 15.6-27.0 | macOS, iOS | 41 |
|
|
136
|
-
| Edge | 131-
|
|
137
|
-
| Opera | 124-
|
|
135
|
+
| Edge | 131-156 | Windows, macOS, Android | 78 |
|
|
136
|
+
| Opera | 124-139 | Windows, macOS, Linux | 48 |
|
|
138
137
|
| Opera Mobile | 102 | Android | 1 |
|
|
139
|
-
| Brave | 153-
|
|
138
|
+
| Brave | 153-156 (1.95 to 1.98) | Windows, macOS, Linux, Android | 16 |
|
|
140
139
|
| Samsung Internet | 29-30 | Android | 2 |
|
|
141
140
|
| OkHttp | 4, 5 | Android | 2 |
|
|
142
141
|
|
|
143
|
-
**
|
|
142
|
+
**396 profiles** total. `koon --list-browsers`, `Koon.browsers()` (Node), `koon.browsers()` (Python) and `koon_browsers()` (R) list them all.
|
|
144
143
|
|
|
145
144
|
### Profile naming
|
|
146
145
|
|
|
147
|
-
Format: `{browser}{version}{-os}`. All parts but the browser name are optional, dash included (`chrome154-macos` or `chrome154macos`). Omit the version for the latest of any browser. Without an OS, desktop browsers default to Windows except Safari (macOS); Brave is named by the Chromium version it reports (`
|
|
146
|
+
Format: `{browser}{version}{-os}`. All parts but the browser name are optional, dash included (`chrome154-macos` or `chrome154macos`). Omit the version for the latest of any browser. Without an OS, desktop browsers default to Windows except Safari (macOS); Brave is named by the Chromium version it reports (`brave156` = Brave 1.98).
|
|
148
147
|
|
|
149
148
|
| Browser | Example profiles |
|
|
150
149
|
|---------|-------------------|
|
|
151
|
-
| Chrome, Firefox, Opera | `
|
|
152
|
-
| Edge, Brave | `
|
|
150
|
+
| Chrome, Firefox, Opera | `chrome157`, `-windows`, `-macos`, `-linux` |
|
|
151
|
+
| Edge, Brave | `edge156`, `-windows`, `-macos` (Brave also `-linux`) |
|
|
153
152
|
| Safari | `safari270-macos` |
|
|
154
|
-
| Chrome/Firefox/Edge/Brave Mobile (Android) | `chrome-
|
|
153
|
+
| Chrome/Firefox/Edge/Brave Mobile (Android) | `chrome-mobile157`, `firefox-mobile159`, `edge-mobile156`, `brave-mobile156` |
|
|
155
154
|
| Safari Mobile (iOS) | `safari-mobile270` |
|
|
156
155
|
| Samsung Internet, Opera Mobile (Android) | `samsung30`, `opera-mobile102` |
|
|
157
156
|
| OkHttp | `okhttp4`, `okhttp5` (`-android` suffix optional) |
|
|
@@ -164,15 +163,15 @@ Chrome Mobile and Firefox Mobile send their desktop counterpart's fingerprint wi
|
|
|
164
163
|
|
|
165
164
|
- **Fingerprints on every layer**: TLS, HTTP/2 and HTTP/3 as in the table above; header order, casing and values of navigations, form posts, fetch() calls and WebSocket handshakes, with cookie, referer, origin and your own headers where the browser puts them; the client hints Chromium sends when a site asks for them
|
|
166
165
|
- **HTTP/3 like the browser**: found through Alt-Svc or, on the first connection, the DNS HTTPS record; racing TCP like Chrome or straight to QUIC like Safari, with fallback to TCP; 0-RTT on resumed connections
|
|
167
|
-
- **Encrypted Client Hello and DNS**: real ECH from DNS HTTPS records over TCP and QUIC, read over DNS-over-HTTPS (Cloudflare, Google) or, as Chrome and Firefox do by default, with a plain query to the system's nameserver; ECH GREASE in the browser's shape otherwise
|
|
168
|
-
- **Chrome's field trials**:
|
|
166
|
+
- **Encrypted Client Hello and DNS**: real ECH from DNS HTTPS records over TCP and QUIC, read over DNS-over-HTTPS (Cloudflare, Google) or, as Chrome and Firefox do by default, with a plain query to the system's nameserver; ECH GREASE in the browser's shape otherwise
|
|
167
|
+
- **Chrome's field trials**: while a Chrome field trial runs, a client may be enrolled like a slice of real Chrome installations; the handshake-padding trial ran until 2026-10-30, and `serverPadding`, `server_padding` or `--server-padding` still pin one of its groups
|
|
169
168
|
- **Fingerprint self-test**: `koon verify` checks your installed koon against the real browsers' fingerprints (see [below](#fingerprint-self-test))
|
|
170
169
|
- **TLS sessions and certificates**: session tickets per origin, used once, over TCP and QUIC; certificates verified against Mozilla's roots plus every trust anchor of the Chrome Root Store
|
|
171
170
|
- **Cookies and sessions**: a jar with domain, path, expiry, Secure, HttpOnly, SameSite, `__Host-`/`__Secure-` prefixes and public-suffix protection; import and export as Playwright/CDP cookie objects; save and load cookies and TLS tickets as JSON
|
|
172
|
-
- **Proxies**: HTTP, HTTPS and SOCKS5, round-robin rotation, custom CONNECT headers; retries switch the proxy and never send a POST twice; HTTP/3
|
|
171
|
+
- **Proxies**: HTTP, HTTPS and SOCKS5 (`socks5://` or `socks5h://`, both resolved by the proxy), round-robin rotation, custom CONNECT headers; retries switch the proxy and never send a POST twice; through a proxy, koon does not use HTTP/3
|
|
173
172
|
- **MITM proxy server**: re-sends any program's traffic through koon; loopback only unless allowed, optional authentication, capped connections
|
|
174
173
|
- **WebSocket**: `wss://` and `ws://` with the browser's handshake, over HTTP/2 where the browser uses it; send and receive concurrently
|
|
175
|
-
- **Streaming**: response bodies read on demand with backpressure, uploads from a stream, multipart forms with the browser's boundary format
|
|
174
|
+
- **Streaming**: response bodies read on demand with backpressure, uploads from a stream (Rust, and the CLI for files over 16 MiB), multipart forms with the browser's boundary format
|
|
176
175
|
- **Hooks**: `onRequest`, `onResponse` and `onRedirect` for logging, guards and stopping a redirect to a captcha, per client or per request
|
|
177
176
|
- **Per-request options**: headers, timeout, proxy and redirect following without touching the client
|
|
178
177
|
- **Response body cap**: 100 MiB by default, decompression bombs included
|
|
@@ -183,7 +182,7 @@ Chrome Mobile and Firefox Mobile send their desktop counterpart's fingerprint wi
|
|
|
183
182
|
- **Key logging**: `SSLKEYLOGFILE` writes the TLS secrets (TCP, QUIC and DoH) for Wireshark
|
|
184
183
|
- **Custom profiles**: export a profile as JSON, change it and load it back (see [Custom profiles](#custom-profiles))
|
|
185
184
|
- **Drop-in adapters**: an httpx transport, a requests adapter and a `fetch()` for Node; `KoonSync`, a blocking Python client
|
|
186
|
-
- **Structured errors**: a machine-readable code on every error (`TIMEOUT`, `TLS_ERROR`, `PROXY_ERROR`, ...)
|
|
185
|
+
- **Structured errors**: a machine-readable code on every error (`TIMEOUT`, `TLS_ERROR`, `PROXY_ERROR`, ...), and for a request's transport failure the phase it failed in (`connect`, `request` or `body`)
|
|
187
186
|
|
|
188
187
|
## Usage
|
|
189
188
|
|
|
@@ -547,10 +546,39 @@ resp <- client$get("https://httpbin.org/cookies")
|
|
|
547
546
|
# Clear cookies (keeps TLS sessions and connection pool)
|
|
548
547
|
client$clear_cookies()
|
|
549
548
|
|
|
550
|
-
# Session save/load
|
|
549
|
+
# Session save/load, as JSON or to a file
|
|
551
550
|
json <- client$save_session()
|
|
552
551
|
client2 <- Koon$new("chrome")
|
|
553
552
|
client2$load_session(json)
|
|
553
|
+
client$save_session_to_file("session.json")
|
|
554
|
+
client2$load_session_from_file("session.json")
|
|
555
|
+
|
|
556
|
+
# Multipart upload
|
|
557
|
+
resp <- client$post_multipart("https://httpbin.org/post", list(
|
|
558
|
+
list(name = "field", value = "text"),
|
|
559
|
+
list(name = "file", file_data = as.raw(c(0x89, 0x50, 0x4e, 0x47)),
|
|
560
|
+
filename = "photo.png", content_type = "image/png")
|
|
561
|
+
))
|
|
562
|
+
|
|
563
|
+
# Streaming: the head first, then the body chunk by chunk (raw vectors)
|
|
564
|
+
resp <- client$request_streaming("GET", "https://httpbin.org/stream/5")
|
|
565
|
+
while (!is.null(chunk <- resp$stream$next_chunk())) cat(rawToChar(chunk))
|
|
566
|
+
|
|
567
|
+
# WebSocket
|
|
568
|
+
ws <- client$websocket("wss://ws.postman-echo.com/raw")
|
|
569
|
+
ws$send("hello")
|
|
570
|
+
ws$receive() # list(type = "text", data = "hello")
|
|
571
|
+
ws$close()
|
|
572
|
+
|
|
573
|
+
# A request's transport failure names how far it got
|
|
574
|
+
err <- tryCatch(client$get("https://10.255.255.1/", timeout = 1), koon_error = identity)
|
|
575
|
+
err$code # "TIMEOUT"
|
|
576
|
+
err$phase # "connect": nothing was sent, so sending it again cannot repeat it
|
|
577
|
+
|
|
578
|
+
# Local MITM proxy for other programs
|
|
579
|
+
proxy <- KoonProxy$start(browser = "firefox", listen_addr = "127.0.0.1:8080")
|
|
580
|
+
proxy$url() # "http://127.0.0.1:8080"
|
|
581
|
+
proxy$shutdown()
|
|
554
582
|
|
|
555
583
|
# Export profile as JSON
|
|
556
584
|
client$export_profile()
|
|
@@ -648,8 +676,9 @@ one fits (6 host not resolved, 7 connection failed, 22 HTTP error with
|
|
|
648
676
|
```toml
|
|
649
677
|
[dependencies]
|
|
650
678
|
koon-core = { git = "https://github.com/scrape-hub/koon.git" }
|
|
651
|
-
#
|
|
652
|
-
#
|
|
679
|
+
# Without the default `doh` feature, profiles find neither HTTP/3 nor real ECH
|
|
680
|
+
# from DNS HTTPS records:
|
|
681
|
+
# koon-core = { git = "https://github.com/scrape-hub/koon.git", default-features = false, features = ["socks"] }
|
|
653
682
|
```
|
|
654
683
|
|
|
655
684
|
BoringSSL is built with the optimisation level of your profile. Debug builds
|
|
@@ -716,17 +745,18 @@ async fn main() -> Result<(), koon_core::Error> {
|
|
|
716
745
|
fingerprints of the real browsers. Each profile connects to
|
|
717
746
|
[tls.browserleaks.com](https://tls.browserleaks.com/json) (tls.peet.ws if that
|
|
718
747
|
fails), which reports the JA4, JA3N, JA3 and Akamai HTTP/2 fingerprint it sees.
|
|
719
|
-
Where a QUIC reference exists (Chrome 134-
|
|
720
|
-
Firefox and the Safari releases whose transport
|
|
748
|
+
Where a QUIC reference exists (Chrome 134-157, Edge 153-156, Opera 136-139, Brave, Opera Mobile,
|
|
749
|
+
Firefox 155-159 on the desktop and 146-159 on Android, and the Safari releases whose transport
|
|
750
|
+
parameters were captured;
|
|
721
751
|
Samsung Internet uses no HTTP/3), the
|
|
722
752
|
check also goes over HTTP/3 to quic.browserleaks.com for the QUIC JA4. Every
|
|
723
753
|
field is compared with the value captured from the real browser.
|
|
724
754
|
|
|
725
755
|
```
|
|
726
756
|
$ koon verify -b firefox
|
|
727
|
-
firefox ->
|
|
728
|
-
reference firefox-156: Firefox 156-
|
|
729
|
-
reference firefox-quic: QUIC JA4 of real Firefox 155.0.1, 157.0 beta
|
|
757
|
+
firefox -> firefox159-windows: match
|
|
758
|
+
reference firefox-156: Firefox 156-159 (without ffdhe groups): real Firefox 156.0.1 and 159.0.1 captures; 157 and 158 from the 157.0 and 158.0b5 betas (ClientHello capture and tls.browserleaks.com)
|
|
759
|
+
reference firefox-quic: QUIC JA4 of real Firefox 155.0.1, 157.0 beta, 158.0b5 and 159.0.1 QUIC ClientHellos (157 to 159 also from quic.browserleaks.com)
|
|
730
760
|
service https://tls.browserleaks.com/json
|
|
731
761
|
http3 https://quic.browserleaks.com/?minify=1
|
|
732
762
|
ja4 match t13d1517h2_8daaf6152771_3cbfd9057e0d
|
|
@@ -776,6 +806,11 @@ report = koon.verify("firefox")
|
|
|
776
806
|
print(report["outcome"], [f for f in report["fields"] if f["status"] == "mismatch"])
|
|
777
807
|
```
|
|
778
808
|
|
|
809
|
+
```r
|
|
810
|
+
report <- koon_verify("safari", doh = "cloudflare")
|
|
811
|
+
report$outcome
|
|
812
|
+
```
|
|
813
|
+
|
|
779
814
|
In Rust, `koon_core::verify::verify("chrome", None)` returns a `VerifyReport`;
|
|
780
815
|
`verify_with` checks with a client you built (proxy, DNS, local address), and
|
|
781
816
|
`references_for` gives the reference values of a profile.
|
|
@@ -802,6 +837,7 @@ proxy takes a profile the same way (`koon proxy --profile`).
|
|
|
802
837
|
| `quic` | Optional; without it the profile does not use HTTP/3. The QUIC stack whose wire behaviour it follows (`chromium`, `neqo` or `apple`), transport parameters, HTTP/3 SETTINGS and an optional QUIC ClientHello (`tls`) |
|
|
803
838
|
| `headers` | The headers of a navigation and their values |
|
|
804
839
|
| `header_family` | Optional: `chromium`, `firefox`, `safari`, `okhttp` or `other`, whose header order and browser rules requests follow; detected from the headers when missing |
|
|
840
|
+
| `multipart` | Optional: `webkit`, `gecko`, `okhttp4` or `okhttp5`, how the client encodes multipart bodies; follows `header_family` when missing |
|
|
805
841
|
| `ua_client_hints` | Optional, for Chromium profiles: the high-entropy client hint values (`full_version`, `full_version_list`, `platform_version`, `architecture`, `bitness`, `model`, `wow64`, `form_factors`) and the device's `device_memory_mib`, `device_pixel_ratio` and `viewport_px` (`[width, height]` in device pixels), sent when a site asks for them |
|
|
806
842
|
|
|
807
843
|
The optional `http2` keys reproduce a browser's frame layout; a key left out
|
|
@@ -849,10 +885,15 @@ Key dependencies:
|
|
|
849
885
|
Only needed if you want to build koon yourself instead of using the published packages.
|
|
850
886
|
|
|
851
887
|
**Requirements:**
|
|
852
|
-
- Rust 1.85+
|
|
888
|
+
- Rust 1.85+ (1.88+ for the Node.js addon)
|
|
853
889
|
- CMake
|
|
854
|
-
- NASM
|
|
890
|
+
- NASM on Windows x64 (or `BORING_BSSL_NO_ASM=1` for BoringSSL's slower portable C)
|
|
855
891
|
- C compiler: MSVC (Windows), GCC or Clang (Linux/macOS)
|
|
892
|
+
- libclang only on a platform without prebuilt BoringSSL bindings (other than Linux, macOS and
|
|
893
|
+
Windows on x64 and arm64), for bindgen
|
|
894
|
+
|
|
895
|
+
The same applies to `pip install koon` on a platform without a prebuilt wheel, which builds from
|
|
896
|
+
the source distribution.
|
|
856
897
|
|
|
857
898
|
```bash
|
|
858
899
|
# Core library
|