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.")
相关推荐
Predestination王瀞潞9 小时前
5.4.2 通信->WWW万维网内容访问标准(W3C):WWW(World Wide Web) 核心技术规范
网络·网络协议·https·www
理人综艺好会16 小时前
http和https的了解
网络协议·http·https
灰子学技术16 小时前
自定义 Host 头访问 HTTPS 服务时的网关处理逻辑
网络·网络协议·http·https
甘露s16 小时前
从明文到加密:HTTP 与 HTTPS 的本质区别与建立全解析
网络协议·http·https
成空的梦想1 天前
ZLibrary反爬机制实战分析的技术文章大纲
网络协议·https·ssl
2501_915909062 天前
不用越狱就看不到 iOS App 内部文件?使用 Keymob 查看和导出应用数据目录
android·ios·小程序·https·uni-app·iphone·webview
小庄梦蝶2 天前
Mixed Content: The page at ‘https://域名/‘ was loaded over HTTPS
网络协议·http·https
2501_916007472 天前
HTTPS 抓包的流程,代理抓包、设备数据线直连抓包、TCP 数据分析
网络协议·tcp/ip·ios·小程序·https·uni-app·iphone
2501_915918412 天前
iOS mobileprovision 描述文件管理,新建、下载和内容查看
android·ios·小程序·https·uni-app·iphone·webview
00后程序员张3 天前
iOS 应用程序使用历史记录和耗能记录怎么查?
android·ios·小程序·https·uni-app·iphone·webview