This commit is contained in:
FongMi 2023-12-13 23:12:24 +08:00
parent b1f80cacbf
commit a429a0f700
6 changed files with 11 additions and 5 deletions

View File

@ -93,7 +93,6 @@ public class AliYun {
m3u8MediaMap = new HashMap<>();
shareDownloadMap = new HashMap<>();
cache = Cache.objectFrom(Path.read(getCache()));
OkHttp.string("http://127.0.0.1:" + Proxy.getPort() + "/go");
}
public void setRefreshToken(String token) {

View File

@ -3,7 +3,10 @@ package com.github.catvod.utils;
import static fi.iki.elonen.NanoHTTPD.Response.Status;
import static fi.iki.elonen.NanoHTTPD.newFixedLengthResponse;
import android.os.SystemClock;
import com.github.catvod.net.OkHttp;
import com.github.catvod.spider.Proxy;
import java.net.URLEncoder;
import java.util.Locale;
@ -14,8 +17,12 @@ import okhttp3.Response;
public class ProxyVideo {
private static final String GO_SERVER = "http://127.0.0.1:7777/";
public static NanoHTTPD.Response multi(String url, Map<String, String> headers, int thread) throws Exception {
return proxy(String.format(Locale.getDefault(), "http://127.0.0.1:7777/?url=%s&thread=%d", URLEncoder.encode(url), thread), headers);
if (OkHttp.string(GO_SERVER).isEmpty()) OkHttp.string("http://127.0.0.1:" + Proxy.getPort() + "/go");
while (OkHttp.string(GO_SERVER).isEmpty()) SystemClock.sleep(250);
return proxy(String.format(Locale.getDefault(), "%s?url=%s&thread=%d", GO_SERVER, URLEncoder.encode(url), thread), headers);
}
public static NanoHTTPD.Response proxy(String url, Map<String, String> headers) throws Exception {

Binary file not shown.

View File

@ -1 +1 @@
5b3460279d173de4e0288eb56fac596f
22534319dabee7086d31f194a1e19e6a

View File

@ -1,5 +1,5 @@
{
"spider": "https://fm.t4tv.hz.cz/jar/custom_spider.jar;md5;5b3460279d173de4e0288eb56fac596f",
"spider": "https://fm.t4tv.hz.cz/jar/custom_spider.jar;md5;22534319dabee7086d31f194a1e19e6a",
"wallpaper": "https://gao.chuqiuyu.workers.dev",
"sites": [
{

View File

@ -1,5 +1,5 @@
{
"spider": "https://fm.t4tv.hz.cz/jar/custom_spider.jar;md5;5b3460279d173de4e0288eb56fac596f",
"spider": "https://fm.t4tv.hz.cz/jar/custom_spider.jar;md5;22534319dabee7086d31f194a1e19e6a",
"wallpaper": "http://饭太硬.top/深色壁纸/api.php",
"sites": [
{