Giter Club home page Giter Club logo

cloudflare-bp-go's Introduction

Go CloudFlare ByPass

tests Coverage Status GitHub Go Report Card

small round tripper to avoid triggering the "attention required" status of CloudFlare for HTTP requests. It'll add required/validated headers on requests and update the client TLS configuration to pass the CloudFlare validation.

This is (at least so far) NOT intended to solve challenges provided by CloudFlare, only to prevent CloudFlare from directly displaying you a challenge on the first request.

The bypass is tested on a schedule everyday at 3 AM in case CloudFlare updated their detection, so the badge is always displaying if the bypass still works.

Dependencies

  • eddycjy/fake-useragent - for setting a believable request user agent. CloudFlare is relatively forgiving with the user agents anyways but it'll add some variety for the long term.

Usage

You can add the round tripper as any other round tripper:

client := &http.Client{}
client.Transport = cloudflarebp.AddCloudFlareByPass(client.Transport)

small notice:
Using the http.DefaultTransport will currently still fail, nil or empty &http.Transport works. Didn't have the time to check what exactly is different causing the CloudFlare validation to fail though.

Development

Want to contribute? Great!
I'm always glad hearing about bugs or pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details

cloudflare-bp-go's People

Contributors

darealfreak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.