diff --git a/app/src/main/java/com/github/catvod/api/TianyiApi.java b/app/src/main/java/com/github/catvod/api/TianyiApi.java index d81a22b9..aff85b78 100644 --- a/app/src/main/java/com/github/catvod/api/TianyiApi.java +++ b/app/src/main/java/com/github/catvod/api/TianyiApi.java @@ -175,7 +175,7 @@ public class TianyiApi { header.put("Cookie", cookieJar.loadForRequest("https://cloud.189.cn/api/portal/getNewVlcVideoPlayUrl.action")); - return Result.get().url(ProxyVideo.buildCommonProxyUrl(playUrl, header)).octet().header(header).string(); + return Result.get().url(ProxyServer.INSTANCE.buildProxyUrl(playUrl, header)).octet().header(header).string(); } diff --git a/app/src/main/java/com/github/catvod/api/YunDrive.java b/app/src/main/java/com/github/catvod/api/YunDrive.java index a4fd2539..9c18c0d5 100644 --- a/app/src/main/java/com/github/catvod/api/YunDrive.java +++ b/app/src/main/java/com/github/catvod/api/YunDrive.java @@ -7,6 +7,7 @@ import com.github.catvod.crawler.SpiderDebug; import com.github.catvod.net.OkHttp; import com.github.catvod.net.OkResult; import com.github.catvod.utils.Json; +import com.github.catvod.utils.ProxyServer; import com.github.catvod.utils.ProxyVideo; import com.github.catvod.utils.Util; import com.google.gson.JsonElement; @@ -301,7 +302,7 @@ public class YunDrive { String contentId = split[0]; String linkID = split[1]; playUrl = YunDrive.get().get4kVideoInfo(contentId, linkID); - playUrl = ProxyVideo.buildCommonProxyUrl(playUrl, new HashMap<>()); + playUrl = ProxyServer.INSTANCE.buildProxyUrl(playUrl, new HashMap<>()); } else { String contentId = split[0]; diff --git a/app/src/main/java/com/github/catvod/utils/ProxyServer.kt b/app/src/main/java/com/github/catvod/utils/ProxyServer.kt index c5193f30..3ab455e5 100644 --- a/app/src/main/java/com/github/catvod/utils/ProxyServer.kt +++ b/app/src/main/java/com/github/catvod/utils/ProxyServer.kt @@ -158,6 +158,7 @@ object ProxyServer { } } + channels.forEach { it.close() } } catch (e: Exception) { SpiderDebug.log("proxyAsync error: ${e.message}") e.printStackTrace() @@ -232,7 +233,7 @@ object ProxyServer { Charset.defaultCharset() ) ) - return "http://127.0.0.1:$port/proxy?key=$urlBase64&headers=$headerBase64" + return "http://127.0.0.1:$port/proxy?url=$urlBase64&headers=$headerBase64" } diff --git a/jar/custom_spider.jar b/jar/custom_spider.jar index a2fce88b..bdb11938 100644 Binary files a/jar/custom_spider.jar and b/jar/custom_spider.jar differ diff --git a/jar/custom_spider.jar.md5 b/jar/custom_spider.jar.md5 index a49b447e..cdc5a43d 100644 --- a/jar/custom_spider.jar.md5 +++ b/jar/custom_spider.jar.md5 @@ -1 +1 @@ -25dcdf484e1860fdd348f1585cee636a +89689d186862de9fb12508bfe3ac4689 diff --git a/json/test.json b/json/test.json index 1a608faa..4b94efc0 100644 --- a/json/test.json +++ b/json/test.json @@ -1,5 +1,5 @@ { - "spider": "https://gh.llkk.cc/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/multiThreadNew/jar/custom_spider.jar;md5;25dcdf484e1860fdd348f1585cee636a", + "spider": "https://gh.llkk.cc/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/multiThreadNew/jar/custom_spider.jar;md5;89689d186862de9fb12508bfe3ac4689", "lives": [ { "name": "电视直播",