httpserver
This commit is contained in:
parent
a328a51b03
commit
9e61895f05
|
|
@ -56,6 +56,7 @@ class AdvancedHttpServer(private val port: Int) {
|
|||
|
||||
// 解析路径和查询参数
|
||||
val (basePath, queryParams) = parsePath(path)
|
||||
SpiderDebug.log("请求路径: $basePath, 查询参数: $queryParams")
|
||||
|
||||
// 读取请求头
|
||||
val headers = mutableMapOf<String, String>()
|
||||
|
|
|
|||
|
|
@ -66,7 +66,8 @@ object ProxyServer {
|
|||
) {
|
||||
runBlocking {
|
||||
val channels = List(THREAD_NUM) { Channel<ByteArray>() }
|
||||
|
||||
SpiderDebug.log("--proxyAsync url: $url")
|
||||
SpiderDebug.log("--proxyAsync headers: ${Json.toJson(headers)}")
|
||||
|
||||
try {
|
||||
SpiderDebug.log("--proxyMultiThread: THREAD_NUM: $THREAD_NUM")
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import org.junit.runner.RunWith;
|
|||
import org.robolectric.RobolectricTestRunner;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
public class ProxyVideoTest {
|
||||
|
|
@ -17,8 +18,9 @@ public class ProxyVideoTest {
|
|||
// "https://js.shipin520.com/pc/images/new/banner20250225.mp4", new HashMap<>());
|
||||
"http://172.16.1.217:18089/ng-grid/video.mp4", new HashMap<>());
|
||||
System.out.println(url);*/
|
||||
System.out.println(ProxyServer.INSTANCE.buildProxyUrl("https://media.w3.org/2010/05/sintel/trailer.mp4", Map.of("header","2","header2","2")));
|
||||
ProxyServer.INSTANCE.start();
|
||||
System.out.println(ProxyServer.INSTANCE.buildProxyUrl("https://media.w3.org/2010/05/sintel/trailer.mp4", new HashMap<>()));
|
||||
|
||||
while (true) {
|
||||
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
f857aaa917fac3bce9f407d7a8262ba7
|
||||
d9c6562f45aff98d146a205881095f76
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://gh.llkk.cc/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/multiThreadNew/jar/custom_spider.jar;md5;f857aaa917fac3bce9f407d7a8262ba7",
|
||||
"spider": "https://gh.llkk.cc/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/multiThreadNew/jar/custom_spider.jar;md5;d9c6562f45aff98d146a205881095f76",
|
||||
"lives": [
|
||||
{
|
||||
"name": "电视直播",
|
||||
|
|
|
|||
Loading…
Reference in New Issue