Unverified Commit 857fb552 authored by Mygod's avatar Mygod Committed by GitHub

Use cp.cloudflare.com for connectivity test

Credits: https://www.v2ex.com/t/656983#r_8748918
parent 5514c505
......@@ -84,10 +84,7 @@ class HttpsTest : ViewModel() {
fun testConnection() {
cancelTest()
status.value = Status.Testing
val url = URL("https", when ((Core.currentProfile ?: return).first.route) {
Acl.CHINALIST -> "www.qualcomm.cn"
else -> "www.google.com"
}, "/generate_204")
val url = URL("https://cp.cloudflare.com")
val conn = (if (DataStore.serviceMode != Key.modeVpn) {
url.openConnection(Proxy(Proxy.Type.SOCKS, DataStore.proxyAddress))
} else url.openConnection()) as HttpURLConnection
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment