go-rod / stealth

anti-bot-detection with rod
https://pkg.go.dev/github.com/go-rod/stealth
MIT License
253 stars 33 forks source link

stealth can not bypass cloudflare bot detection #27

Closed ipfans closed 1 year ago

ipfans commented 1 year ago

Description

I want to use stealth to bypass Cloudflare's latest bot detection. This feature was great last year, but recently when I wanted to use stealth, it didn't work like it used to. Stealth cannot bypass Cloudflare's bot detection mechanism.

How to reproduce

package main

import (
    "context"
    "os"
    "time"

    "github.com/go-rod/rod"
    "github.com/go-rod/rod/lib/launcher"
    "github.com/go-rod/stealth"
)

func main() {
    l := launcher.NewUserMode().
        Leakless(true).
        UserDataDir("tmp/t").
        Set("disable-default-apps").
        Set("no-first-run").
        Headless(false)
    defer l.Kill()

    browser := rod.New().ControlURL(l.MustLaunch()).MustConnect()
    defer browser.MustClose()

    page := stealth.MustPage(browser)
    page.MustNavigate("https://nowsecure.nl").MustWaitLoad()

    time.Sleep(time.Minute)
}

What I want

I want to see the actual pages behind Cloudflare protection.

What I got

The page is stuck on the Cloudflare bot detection page.

ysmood commented 1 year ago

duplicated with https://github.com/go-rod/rod/issues/744