An open API service indexing awesome lists of open source software.

https://github.com/rushiimachine/ktor-impersonate

KMP Ktor engine bindings to reqwest-impersonate for spoofing JA3/JA4/H2 fingerprints.
https://github.com/rushiimachine/ktor-impersonate

android ja3 ja4 kmp kotlin ktor

Last synced: about 1 month ago
JSON representation

KMP Ktor engine bindings to reqwest-impersonate for spoofing JA3/JA4/H2 fingerprints.

Awesome Lists containing this project

README

        

# ktor-impersonate (WIP)

### This project is currently under development and is not ready for usage!

A Kotlin-Multiplatform (KMP)1 Ktor client engine that binds to the [rquest]
(aka. reqwest-impersonate) Rust crate, allowing configuring the TLS `ClientHello` and HTTP/2 options
at a low level.

This allows impersonating browsers and other HTTP clients with ease, and spoofing
JA3/JA4/Akamai HTTP/2 fingerprints. Presets are provided for convenience of Chrome, Safari, Edge,
and OkHTTP.

1:
Currently only Android (x86, x86_64, armeabi-v7a, arm64-v8a) is supported.
More platforms, including JVM, Desktop native, and iOS, will be supported at a later date.


# Usage

`build.gradle.kts`:

```kts
val version = "1.0.0"

// Without KMP
dependencies {
implementation("dev.rushii.ktor-impersonate:ktor-impersonate:$version")
}

// KMP
kotlin {
sourceSets {
commonMain.dependencies {
implementation("dev.rushii.ktor-impersonate:ktor-impersonate:$version")
}
}
}
```

Quick start:

```kotlin
import dev.rushii.ktor_impersonate.*
import io.ktor.client.*
import io.ktor.client.request.*

val client = HttpClient(Impersonate) {
engine {
preset = ImpersonatePreset.Chrome129
}
}

client.get("https://google.com")
```

[rquest]: https://github.com/penumbra-x/rquest