Skip to content

Proxy: Refactor server APIs and expand RTMP test coverage. v7.0.147#4672

Merged
winlinvip merged 13 commits into
ossrs:developfrom
winlinvip:develop
May 2, 2026
Merged

Proxy: Refactor server APIs and expand RTMP test coverage. v7.0.147#4672
winlinvip merged 13 commits into
ossrs:developfrom
winlinvip:develop

Conversation

@winlinvip
Copy link
Copy Markdown
Member

This PR refactors the Go proxy server internals and significantly expands RTMP/proxy verification coverage.

  • Rename internal/protocol to internal/server to better describe the package responsibility.
  • Refactor proxy server constructors and types toward cleaner exported interfaces:
    • NewRTMPServer
    • NewWebRTCServer
    • NewHTTPAPIServer
    • NewHTTPStreamServer
    • NewSystemAPI
  • Expose RTMP protocol interfaces for better testability:
    • Handshake
    • Protocol
    • Message
    • AMF0 public interfaces such as Amf0Any, Amf0Number, Amf0String, Amf0Object, etc.
  • Add RTMP unit tests covering AMF0, handshake, protocol messages, packet encoding/decoding, and API examples.
  • Add generated RTMP fakes for interface-based tests.
  • Add proxy E2E scripts for:
    • multi-origin memory load-balancer routing
    • Redis multi-proxy routing
    • RTMP transmuxing verification across RTMP, HTTP-FLV, HLS, and optional WebRTC WHEP
  • Update OpenClaw/SRSBot development docs and memory to reflect the new package layout, new verification scripts, and unsupported origin/edge development scope.

winlinvip and others added 12 commits April 29, 2026 10:16
Move internal/protocol to internal/server and update bootstrap imports to match the new package name. Sync the OpenClaw codebase map with the new module path.

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Add public AMF0 and RTMP protocol interfaces, update the RTMP proxy to use the accessor APIs, and cover AMF0 encoding/decoding with unit tests and examples.
Add executable examples for the RTMP handshake and protocol workflow, covering packet decoding, expectation helpers, command responses, and raw message forwarding.

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Add coverage for RTMP handshakes, chunk headers, message IO, packet decoding, transactions, and error branches.

Rename examples so Go documents the exported constructors they exercise.

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Mark next-generation Go origin and edge workflows as unsupported, while keeping proxy development as the supported path.

Clarify that first-generation C++ origin remains maintenance-only.

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label May 2, 2026
@winlinvip winlinvip changed the title Proxy: Refactor server APIs and expand RTMP test coverage Proxy: Refactor server APIs and expand RTMP test coverage. v7.0.147 May 2, 2026
@winlinvip winlinvip merged commit 3663a8e into ossrs:develop May 2, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EnglishNative This issue is conveyed exclusively in English.

Development

Successfully merging this pull request may close these issues.

1 participant