GithubHelp home page GithubHelp logo

korkutduzay / cloudproxysharp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbou/cloudproxysharp

0.0 0.0 0.0 37 KB

CloudProxy .Net / Proxy server to bypass Cloudflare protection

License: MIT License

C# 100.00%

cloudproxysharp's Introduction

CloudProxySharp

NuGet

CloudProxySharp .Net DelegatingHandler / interceptor.

CloudProxySharp is a proxy server to bypass Cloudflare protection.

โš ๏ธ This project is in beta state. Some things may not work and the API can change at any time.

Installation

Full-Featured library:

PM> Install-Package CloudProxySharp

Dependencies

You need a running CloudProxy service.

Issues

Cloudflare regularly modifies their protection challenge and improves their bot detection capabilities.

If you notice that the anti-bot page has changed, or if library suddenly stops working, please create a GitHub issue so that I can update the code accordingly.

Before submitting an issue, just be sure that you have the latest version of the library.

Usage

A DelegatingHandler that handles the challenge solution automatically.

A type for HTTP handlers that delegate the processing of HTTP response messages to another handler, called the inner handler.

It checks on every request if the clearance is required or not, if required, it solves the challenge in background then returns the response.

Websites not using Cloudflare will be treated normally. You don't need to configure or call anything further, and you can effectively treat all websites as if they're not protected with anything.

var handler = new ClearanceHandler("http://localhost:8191/")
{
    UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
    MaxTimeout = 60000
};

var client = new HttpClient(handler);
var content = await client.GetStringAsync("https://uam.hitmehard.fun/HIT");
Console.WriteLine(content);

Full example here

Options

CloudProxy Service API

You have to set the CloudProxy service API in the ClearanceHandler constructor. If you set an empty or null endpoint, CloudProxySharp will be able to detect challenges, but it will not be able to solve them.

Example: http://localhost:8191/

UserAgent

The User-Agent which will be used across this session. If you didn't set it, the default CloudProxy User-Agent will be used.

User-Agent must be the same as the one used to solve the challenge, otherwise Cloudflare will flag you as a bot.

Example: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36

MaxTimeout

Max timeout to solve the challenge.

MaxTimeout should be greater than 15000 (15 seconds) because starting the web browser and solving the challenge takes time.

Example: 60000

Proxy

Proxy server to use for solving the challenge.

More information and examples can be found here.

Examples: 192.168.1.1, proxy.com, example.com:80

Credits

This work is based on FlareSolverrSharp by Diego Heras (ngosang)
Huge thanks go out to him!

cloudproxysharp's People

Contributors

jbou avatar ngosang 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.