代理视频的异常捕获

This commit is contained in:
lushunming 2025-11-17 08:15:51 +08:00
parent 565c92ce63
commit 26d525f436
1 changed files with 12 additions and 7 deletions

View File

@ -37,6 +37,7 @@ object ProxyServer {
} }
}; };
httpServer?.addRoutes("/proxy") { req, response -> httpServer?.addRoutes("/proxy") { req, response ->
try {
run { run {
val key = req.queryParams["key"]; val key = req.queryParams["key"];
val url = urlMap[key] val url = urlMap[key]
@ -46,6 +47,10 @@ object ProxyServer {
proxyAsync(url, header, req, response) proxyAsync(url, header, req, response)
} }
} }
} catch (e: Exception) {
SpiderDebug.log("代理视频出错:" + e.message)
}
} }
httpServer?.start() httpServer?.start()