shadowsocks / shadowsocks-android

A shadowsocks client for Android
Other
35.23k stars 11.57k forks source link

Changing test url from cp.cloudflare.com #2950

Closed akajaber closed 2 years ago

akajaber commented 2 years ago

Hi, Due to the fact that a large part of the requests sent to cloudflare.com are blocked in some countries such as Iran, in many cases it is not possible to test the connection for users and thus it is not possible to connect to the server.

One of the most suitable URLs, which practically cannot be limited due to the use of a huge amount of users, is :

http://detectportal.firefox.com/success.txt.

Therefore, most of the users' problems will be solved through

Mygod commented 2 years ago

It is crucial that we use https to reflect "real Internet access". Firefox's server is instead used to detect captive portals which is a different purpose.

akajaber commented 2 years ago

It is crucial that we use https to reflect "real Internet access". Firefox's server is instead used to detect captive portals which is a different purpose.

Thanks for your reply, You made the right point

The main issue here is that countries that have internet censorship systems block many CDN services such as Cloudflare and requests related to their IPs and domains. which has been discussed in various issues regarding this problem. issue #2606 & issue #2705

Just by changing cp.cloudflare.com to any other similar service, it can get exactly the desired result in the application, and in this way, the problems of many users will be solved.

Even in this case, instead of Firefox Detect Portal, we can use another item such as: https://clients3.google.com/generate_204 used.

The importance note about this, is that the TestUrl changes to something other than cloudflare.

ElderArcade commented 1 year ago

ConnectionTest URL: http://gstatic.com/generate_204 http://clients3.google.com/generate_204 http://cp.cloudflare.com http://detectportal.firefox.com/success.txt

https://gstatic.com/generate_204 https://clients3.google.com/generate_204 https://cp.cloudflare.com https://detectportal.firefox.com/success.txt