diff --git a/app/build.gradle b/app/build.gradle index d9cbfff9..e8faaa19 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -86,8 +86,8 @@ dependencies { implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1" // https://mvnrepository.com/artifact/com.sun.net.httpserver/http - implementation(files("libs/sun-common-server.jar")) - implementation("com.sun.net.httpserver:http:20070405") + /* implementation(files("libs/sun-common-server.jar")) + implementation("com.sun.net.httpserver:http:20070405")*/ // implementation("com.hibegin:simplewebserver:0.1.15") //implementation("com.github.codeborne.klite:klite-server:1.7.0") diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index b7f9f1e1..da7d8156 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -45,52 +45,11 @@ # This is generated automatically by the Android Gradle plugin. -dontwarn org.bouncycastle.jce.provider.BouncyCastleProvider -# Please add these rules to your existing keep rules in order to suppress warnings. -# This is generated automatically by the Android Gradle plugin. --dontwarn sun.misc.Service --dontwarn sun.misc.ServiceConfigurationError --dontwarn sun.security.action.GetBooleanAction --dontwarn sun.security.action.GetIntegerAction --dontwarn sun.security.action.GetLongAction - -# Logback (Custom rules, see https://github.com/krschultz/android-proguard-snippets/blob/master/libraries/proguard-logback-android.pro) -# to ignore warnings coming from slf4j and logback - -# Please add these rules to your existing keep rules in order to suppress warnings. -# This is generated automatically by the Android Gradle plugin. --dontwarn com.sun.net.httpserver.HttpContext --dontwarn com.sun.net.httpserver.HttpHandler --dontwarn com.sun.net.httpserver.HttpServer --dontwarn java.lang.System$Logger$Level --dontwarn java.lang.System$Logger - -# Please add these rules to your existing keep rules in order to suppress warnings. -# This is generated automatically by the Android Gradle plugin. -# Please add these rules to your existing keep rules in order to suppress warnings. -# This is generated automatically by the Android Gradle plugin. --dontwarn org.ietf.jgss.ChannelBinding --dontwarn org.ietf.jgss.MessageProp --dontwarn org.ietf.jgss.Oid --dontwarn sun.reflect.CallerSensitive --dontwarn sun.reflect.Reflection -# Please add these rules to your existing keep rules in order to suppress warnings. -# This is generated automatically by the Android Gradle plugin. --dontwarn javax.security.auth.kerberos.KeyTab --dontwarn sun.net.util.URLUtil --dontwarn sun.net.www.ParseUtil --dontwarn sun.nio.ByteBuffered --dontwarn sun.nio.ch.Interruptible --dontwarn sun.reflect.ConstantPool --dontwarn sun.reflect.annotation.AnnotationType --dontwarn sun.usagetracker.UsageTrackerClient - -keepattributes SourceFile,LineNumberTable --assumenosideeffects class org.slf4j.Logger{*;} --keep class sun.misc.** { *; } # 禁用代码混淆 --dontobfuscate \ No newline at end of file +#-dontobfuscate \ No newline at end of file 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 685cab3f..a983aa22 100644 --- a/app/src/main/java/com/github/catvod/utils/ProxyServer.kt +++ b/app/src/main/java/com/github/catvod/utils/ProxyServer.kt @@ -28,14 +28,14 @@ object ProxyServer { try { httpServer = AdvancedHttpServer(port) - httpServer!!.addRoutes("/") { _, response -> + httpServer?.addRoutes("/") { _, response -> run { response.setContentType("text/html") response.start() response.write("Hello, world!") } }; - httpServer!!.addRoutes("/proxy") { req, response -> + httpServer?.addRoutes("/proxy") { req, response -> run { val url = Util.base64Decode(req.queryParams["url"]) val header: Map = Gson().fromJson>( @@ -44,7 +44,7 @@ object ProxyServer { proxyAsync(url, header, req, response) } } - httpServer!!.start() + httpServer?.start() } catch (e: Exception) { SpiderDebug.log("start server e:" + e.message) diff --git a/jar/custom_spider.jar b/jar/custom_spider.jar index 4c87d7cc..4c232579 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 cb9e3149..50c64a50 100644 --- a/jar/custom_spider.jar.md5 +++ b/jar/custom_spider.jar.md5 @@ -1 +1 @@ -c1590ab280fefce3b7d9ebf4d8b029a5 +4111cbdc5007a7e0510c84e4162e5ad9 diff --git a/json/test.json b/json/test.json index 961cbc0f..cf2609af 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;c1590ab280fefce3b7d9ebf4d8b029a5", + "spider": "https://gh.llkk.cc/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/multiThreadNew/jar/custom_spider.jar;md5;4111cbdc5007a7e0510c84e4162e5ad9", "lives": [ { "name": "电视直播",