manga-py icon indicating copy to clipboard operation
manga-py copied to clipboard

cloudflare

Open 1271 opened this issue 3 years ago • 9 comments

Unfortunately, all sites using cloudflare will be removed from support. If anyone has a desire to solve this problem, welcome. Unfortunately, I do not have the time and desire to do this.

P.S. manga-py heroku flare solver point: https://safe-tundra-66835.herokuapp.com (I recommend using your own for you (for example run this on localhost or your own vps)

1271 avatar Jul 03 '21 16:07 1271

Unfortunately, all sites using cloudflare will be removed from support. If anyone has a desire to solve this problem, welcome. Unfortunately, I do not have the time and desire to do this.

Jackett , HDoujinDownloader and many other scrapping tools use FlareSolverr as a plugin/add-on to bypass cloudflare protection. It may help (?)

SonaliBendre avatar Jul 05 '21 09:07 SonaliBendre

All of this is based on the launch of the browser. I would not want to do this, because this creates a lot of problems for the user. Now manga-py can even be run on a phone (it's not easy, but real) If you add a browser dependency, some users will simply not be able to run manga-py. I understand that this is a choice between two evils, so I still think about this situation.

1271 avatar Jul 06 '21 07:07 1271

how about deploying Flaresolverr on heroku and just use its API ? it'll be kinda server-side. and yes it can be deployed on heroku. see- https://flaresolverr.herokuapp.com (Not Mine) To deploy flaresolverr on heroku just make Dockerfile and push it to heroku, and be sure to use this buildpack

SonaliBendre avatar Jul 08 '21 21:07 SonaliBendre

Cloudflare protection includes IP. Most likely I'll just add a client-side browser launch. I think this weekend should be pretty productive.

1271 avatar Jul 08 '21 22:07 1271

The reason for the inaccessible cloudflare pages seem to be the used TLS version & ciphers.

import (
	"crypto/tls"
	"net/http"
)

// ...

conf := &tls.Config{
	MinVersion:               tls.VersionTLS13,
	CurvePreferences:         []tls.CurveID{tls.CurveP521, tls.CurveP384, tls.CurveP256},
	PreferServerCipherSuites: true,
	CipherSuites: []uint16{
		tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
		tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
		tls.TLS_RSA_WITH_AES_256_GCM_SHA384,
		tls.TLS_RSA_WITH_AES_256_CBC_SHA,
	},
}

client := &http.Client{
	Transport: &http.Transport{
		TLSClientConfig: conf,
	},
}

With the above settings (for the go programming language) I can easily access e.g. this site protected by cloudflare: https://mangasee123.com (as mentioned in issue #407). This does not help with cloudflare javascript challenges. Not sure if this helps you with the issue in general, but it worked for me.

d-Rickyy-b avatar Sep 18 '21 18:09 d-Rickyy-b

Also check this example from Postman where I disabled certain TLS versions:

https://user-images.githubusercontent.com/5798157/133898448-f2baac0c-62d1-48d1-b601-414676d67fd5.mp4

d-Rickyy-b avatar Sep 18 '21 18:09 d-Rickyy-b

hmmm... interesting. Unfortunately, this will not help in this case.

Coming soon to update with CF support via proxy :eyes:

I was gone for quite a long time. There were some problems to solve. Thank you for understanding.

1271 avatar Sep 20 '21 06:09 1271

https://github.com/VeNoMouS/cloudscraper/

SonaliBendre avatar Oct 02 '21 21:10 SonaliBendre

cloudscraper currently requires a purchase. Therefore (most likely tomorrow) proxying support will be added via https://github.com/FlareSolverr/FlareSolverr

1271 avatar Oct 02 '21 21:10 1271