fix: 服务端使用本地IP

This commit is contained in:
2025-07-21 19:19:29 +08:00
parent e7c8d3fb9e
commit 5da9d9f4e2
6 changed files with 50 additions and 23 deletions

View File

@@ -311,7 +311,7 @@ public class HttpVideoStreamService : BackgroundService
// 创建 HTTP 监听器
_httpListener = new HttpListener();
_httpListener.Prefixes.Add($"http://localhost:{_serverPort}/");
_httpListener.Prefixes.Add($"http://{Global.localhost}:{_serverPort}/");
_httpListener.Start();
logger.Info("HTTP 视频流服务已启动,监听端口: {Port}", _serverPort);