💠️A coroutine based kotlin library which bypasses the Cloudflare IUAM page.
Inspired by KyranRana/cloudflare-bypass
- HTTP
GET
/POST
- Bypasses regular anti-bot page
- OkHttp 4
- Mozilla Rhino
Add jcenter repository
repositories {
jcenter()
}
And add a dependency code
implementation 'me.marplex.cloudflarebypass:cloudflare-bypass:1.1'
Requesting a cloudflare-protected webpage.
runBlocking {
val client = CloudflareHTTPClient()
//Returns an OkHttp Response object
val url = "https://www.example.com".toHttpUrlOrNull()!!
val response = client.get(url)
}
Requesting a cloudflare-protected webpage with custom headers
runBlocking {
val client = CloudflareHTTPClient()
//Returns an OkHttp Response object
val url = "https://www.example.com".toHttpUrlOrNull()!!
val response = client.get(url) {
addHeader("X-Custom", "1")
}
}
Performing a post request to a cloudflare-protected webpage
runBlocking {
val client = CloudflareHTTPClient()
val formBody = FormBody.Builder()
.add("testParams", "itWorks")
.build()
//Returns an OkHttp Response object
val url = "https://www.example.com".toHttpUrlOrNull()!!
val response = client.post(url, formBody)
}
Create a custom HTTP client
val client = CloudflareHTTPClient() {
delay = 8000
httpClient = {
//cookieJar(...)
//connectionSpecs(...)
}
}
- Implement every HTTP methods
- Make this library more portable (Android)
- Try to bypass captcha