PixelStreamingInfrastructure https

目录

[SFU 大概率"不需要"改 HTTPS](#SFU 大概率“不需要”改 HTTPS)

批量替换脚本:


可以播放:

bash 复制代码
MetahumancharacterHeiXi.exe -RenderOffscreen -PixelStreamingIP=127.0.0.1 -PixelStreamingPort=8888 -AllowUntrustedCertificates

PixelStreamingInfrastructure https

|-------------------------|---------|------|
| SignallingWebServer | 前端网页服务器 | ✅ 必改 |

|----------------|------------------|------|
| Signalling | WebRTC 信令服务器(WS) | ✅ 必改 |

|---------|-------------|-------|
| SFU | WebRTC 媒体转发 | ⚠ 可能要 |

|--------------|------------|------|
| Frontend | 前端 JS 连接地址 | ✅ 必改 |

修改前:

python 复制代码
const config = require('./config');
const WebSocket = require('ws');
const mediasoup = require('mediasoup');
const mediasoupSdp = require('@epicgames-ps/mediasoup-sdp-bridge');
const minimist = require('minimist');

SFU 大概率"不需要"改 HTTPS

你真正要改的是 SignallingWebServer + Signalling

浏览器 (HTTPS)

SignallingWebServer(网页 + JS)

Signalling(WSS 信令)

SFU(WebRTC 媒体传输,走 DTLS + SRTP)

批量替换脚本:

python 复制代码
import os

# 项目根目录(改成你的)
ROOT_DIR = r"D:\YourProject"

# 要忽略的目录
IGNORE_DIRS = {
    ".git",
    "node_modules",
    ".idea",
    "Docs",
    "Extras"
}

# 只处理这些类型的文件
TARGET_EXT = {
    ".js", ".ts", ".json", ".html", ".mjs", ".cjs"
}

def should_skip(path):
    parts = set(path.split(os.sep))
    return not parts.isdisjoint(IGNORE_DIRS)

def process_file(filepath):
    with open(filepath, "r", encoding="utf-8", errors="ignore") as f:
        content = f.read()

    new_content = content.replace("ws://", "wss://")
    new_content = new_content.replace("http://", "https://")

    if new_content != content:
        with open(filepath, "w", encoding="utf-8") as f:
            f.write(new_content)
        print(f"Updated: {filepath}")

for root, dirs, files in os.walk(ROOT_DIR):
    if should_skip(root):
        continue

    for file in files:
        if any(file.endswith(ext) for ext in TARGET_EXT):
            full_path = os.path.join(root, file)
            process_file(full_path)

print("Done.")
相关推荐
win x1 天前
深入理解HTTPS协议加密流程
网络协议·http·https
仙俊红1 天前
从 Filter / Interceptor 到 HTTPS
网络协议·http·https
游戏开发爱好者81 天前
日常开发与测试的 App 测试方法、查看设备状态、实时日志、应用数据
android·ios·小程序·https·uni-app·iphone·webview
2501_915106321 天前
app 上架过程,安装包准备、证书与描述文件管理、安装测试、上传
android·ios·小程序·https·uni-app·iphone·webview
yixvxi2 天前
RFC 8659:DNS CAA资源记录
服务器·https·ssl
三水不滴2 天前
计算机网络核心网络模型
经验分享·笔记·tcp/ip·计算机网络·http·https
404Clukay2 天前
Windows Server 配置 Let‘s Encrypt 免费 HTTPS 证书(WACS + Nginx 自动化方案)
windows·nginx·https
2501_915918412 天前
在 iOS 环境下查看 App 详细信息与文件目录
android·ios·小程序·https·uni-app·iphone·webview
苦逼IT运维2 天前
Helm 实战指南(四):生产环境 Helm 部署 CVAT 全记录:Ceph 存储、GPU 节点污点调度与 HTTPS 指南
ceph·网络协议·https
2501_915106323 天前
当 Perfdog 开始收费之后,我重新整理了一替代方案
android·ios·小程序·https·uni-app·iphone·webview