HEL-879 clarify dependency inventory and evidence scope; clean bridge lint
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -15,8 +15,8 @@ LiveKit 信令,零新依赖(asyncio + ssl 标准库),不触碰既有服
|
||||
- 实现为透明 TCP TLS 终结(不解析 WebSocket/HTTP),LiveKit 信令是 7880 上的
|
||||
HTTP/WebSocket,字节级转发即协议无关;WebRTC 媒体面(UDP/7881)不经本桥,
|
||||
由 WebRTC 自带 DTLS/SRTP 加密。
|
||||
- 每设备信任:https://192.168.200.12:8363 手动接受一次证书例外(与 8361 的
|
||||
例外分端口各自生效)。禁止用 --ignore-certificate-errors 冒充验收。
|
||||
- 每设备分别打开 https://192.168.200.12:8361 与 :8363,验证证书例外和实际
|
||||
连接;不推断例外缓存范围。禁止用 --ignore-certificate-errors 冒充验收。
|
||||
|
||||
部署(获批后)示例:
|
||||
python3 wss_bridge.example.py --listen 0.0.0.0:8363 \
|
||||
@@ -36,9 +36,9 @@ from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import asyncio
|
||||
import contextlib
|
||||
import ssl
|
||||
import sys
|
||||
from typing import Tuple
|
||||
|
||||
|
||||
async def _pipe(reader: asyncio.StreamReader, writer: asyncio.StreamWriter) -> None:
|
||||
@@ -52,14 +52,12 @@ async def _pipe(reader: asyncio.StreamReader, writer: asyncio.StreamWriter) -> N
|
||||
except (ConnectionError, asyncio.CancelledError, ssl.SSLError):
|
||||
pass
|
||||
finally:
|
||||
try:
|
||||
with contextlib.suppress(Exception):
|
||||
writer.close()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
async def _handle(
|
||||
downstream: Tuple[asyncio.StreamReader, asyncio.StreamWriter],
|
||||
downstream: tuple[asyncio.StreamReader, asyncio.StreamWriter],
|
||||
upstream_host: str,
|
||||
upstream_port: int,
|
||||
) -> None:
|
||||
|
||||
Reference in New Issue
Block a user