Rename proxyLocal to proxy

This commit is contained in:
jhengazuji 2025-11-25 13:40:50 +08:00
parent 9ebe4fa54e
commit 1727c5a9a9
8 changed files with 8 additions and 9 deletions

View File

@ -7,7 +7,6 @@ import com.github.catvod.crawler.Spider;
import com.github.catvod.databinding.ActivityMainBinding; import com.github.catvod.databinding.ActivityMainBinding;
import com.github.catvod.spider.Init; import com.github.catvod.spider.Init;
import com.github.catvod.spider.PTT; import com.github.catvod.spider.PTT;
import com.github.catvod.spider.Proxy;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import com.google.gson.JsonParser; import com.google.gson.JsonParser;
@ -134,7 +133,7 @@ public class MainActivity extends Activity {
public void proxy() { public void proxy() {
try { try {
Map<String, String> params = new HashMap<>(); Map<String, String> params = new HashMap<>();
Logger.t("liveContent").d(Proxy.proxy(params)); Logger.t("liveContent").d(spider.proxy(params));
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); e.printStackTrace();
} }

View File

@ -60,7 +60,7 @@ public abstract class Spider {
return false; return false;
} }
public Object[] proxyLocal(Map<String, String> params) throws Exception { public Object[] proxy(Map<String, String> params) throws Exception {
return null; return null;
} }

View File

@ -204,7 +204,7 @@ public class Bili extends Spider {
} }
@Override @Override
public Object[] proxyLocal(Map<String, String> params) { public Object[] proxy(Map<String, String> params) {
String aid = params.get("aid"); String aid = params.get("aid");
String cid = params.get("cid"); String cid = params.get("cid");
String qn = params.get("qn"); String qn = params.get("qn");

View File

@ -87,7 +87,7 @@ public class Local extends Spider {
} }
@Override @Override
public Object[] proxyLocal(Map<String, String> params) { public Object[] proxy(Map<String, String> params) {
String path = new String(Base64.decode(params.get("path"), Base64.DEFAULT | Base64.URL_SAFE)); String path = new String(Base64.decode(params.get("path"), Base64.DEFAULT | Base64.URL_SAFE));
Object[] result = new Object[3]; Object[] result = new Object[3];
result[0] = 200; result[0] = 200;

View File

@ -42,7 +42,7 @@ public class MQiTV extends Spider {
} }
@Override @Override
public Object[] proxyLocal(Map<String, String> params) { public Object[] proxy(Map<String, String> params) {
String ip = params.get("ip"); String ip = params.get("ip");
String port = params.get("port"); String port = params.get("port");
String playing = params.get("playing"); String playing = params.get("playing");
@ -55,7 +55,7 @@ public class MQiTV extends Spider {
String id = params.get("id"); String id = params.get("id");
String auth = config.getAuth(id, token); String auth = config.getAuth(id, token);
if (!"OK".equals(auth)) config.clear(); if (!"OK".equals(auth)) config.clear();
if (!"OK".equals(auth)) return proxyLocal(params); if (!"OK".equals(auth)) return proxy(params);
String m3u8 = config.getM3U8(id, token, port); String m3u8 = config.getM3U8(id, token, port);
return m3u8.isEmpty() ? get302(config.getPlayUrl(port, playing)) : get200(m3u8); return m3u8.isEmpty() ? get302(config.getPlayUrl(port, playing)) : get200(m3u8);
} }

View File

@ -130,7 +130,7 @@ public class WebDAV extends Spider {
} }
@Override @Override
public Object[] proxyLocal(Map<String, String> params) throws IOException { public Object[] proxy(Map<String, String> params) throws IOException {
String url = params.get("url"); String url = params.get("url");
String key = url.contains("/") ? url.substring(0, url.indexOf("/")) : url; String key = url.contains("/") ? url.substring(0, url.indexOf("/")) : url;
url = url.substring(key.length()); url = url.substring(key.length());

Binary file not shown.

View File

@ -1 +1 @@
a0eb7f9582a738589ec05589299052c9 a747194acf234c9e3f8e102fdc902970