|
|
|
|
@ -13,7 +13,8 @@ import okhttp3.Response; |
|
|
|
|
public class Github { |
|
|
|
|
|
|
|
|
|
public static final String A = "https://raw.githubusercontent.com/"; |
|
|
|
|
public static final String B = "https://ghproxy.com/"; |
|
|
|
|
public static final String B = "https://fongmi.cachefly.net/"; |
|
|
|
|
public static final String C = "https://ghproxy.com/"; |
|
|
|
|
public static final String REPO = "FongMi/TV/"; |
|
|
|
|
public static final String RELEASE = "release"; |
|
|
|
|
public static final String DEV = "dev"; |
|
|
|
|
@ -33,6 +34,7 @@ public class Github { |
|
|
|
|
client = OkHttp.client(Constant.TIMEOUT_GITHUB); |
|
|
|
|
check(A); |
|
|
|
|
check(B); |
|
|
|
|
check(C); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void check(String url) { |
|
|
|
|
@ -45,7 +47,7 @@ public class Github { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void setProxy(String url) { |
|
|
|
|
this.proxy = url.equals(B) ? url + A + REPO : url + REPO; |
|
|
|
|
this.proxy = url.equals(C) ? url + A + REPO : url + REPO; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private String getProxy() { |
|
|
|
|
|