Repository navigation
Releases: mickeyzzc/gb28181-go
Release list
v0.15.0
v0.15.0 — GB 35114 B/C 三级全覆盖 + GB/T 28181-2011 兼容
English below.
新增
- GB 35114 B/C 级(PS-over-RTP 软件形态):B 级逐访问单元 SM2 签名(RFC 8285 扩展头承载);C 级 SM4-OFB 媒体加密(VKEK 信封 VEK、per-packet IV 抗丢包)——覆盖全部媒体方向:直播、回放/下载、双向对讲、语音广播、级联。默认构建零国密依赖(
-tags gb35114)。 - VKEK 世代管理:平台在 SecurityInfo 下发权威
vkekver、设备回显;VEK 信封带 SM3 完整性校验——错钥在武装时刻显式报错。 - GB/T 28181-2011 设备侧兼容(钉板测试):GB2312 声明报文全路由可读、应答 SDP 无 2016+ 扩展、X-GB-Ver 缺省不发。
- PTZType 目录能力发射(2016 §5.4.12,与 Rust 孪生对齐)。
- 新手册:GB35114(A/B/C)、无硬件联调教程(双语)。
修复
- C 级重注册后媒体失闭(vkekver 世代错配,#157);
- INVITE 重传幂等(RFC 3261 §13.3.1.4)与五项并发/时序加固;
- DeviceInfo 应答三重线格式缺陷(DeviceName/平铺/Result);
- CLI 中性身份(去品牌回潮);
- GB2312 声明拒析、覆盖率门与三处数据竞争。
v0.15.0 — Full GB 35114 levels B/C + GB/T 28181-2011 compatibility
Added
- GB 35114 levels B and C (PS-over-RTP software form): level B per-AU SM2 signatures (RFC 8285 header extension); level C SM4-OFB media encryption (VKEK-sealed VEK, per-packet loss-resilient IVs) — every media direction covered: live, playback/download, talk both ways, voice broadcast, cascade. Default builds stay crypto-free (
-tags gb35114). - VKEK generation management: the platform stamps the authoritative
vkekverinto the SecurityInfo, the device echoes it; the VEK envelope carries an SM3 integrity tag — a wrong key fails loudly at arming time. - GB/T 28181-2011 device-side compatibility (pinned by tests): GB2312-declared bodies parse on every route, the answer SDP carries no 2016+ extensions, X-GB-Ver stays off by default.
- PTZType catalog capability emission (2016 §5.4.12, parity with the Rust twin).
- New manuals: GB35114 (A/B/C), the no-hardware interop lab (bilingual).
Fixed
- Level-C media failing closed after device re-registration (vkekver generation mismatch, #157);
- INVITE-retransmission idempotency (RFC 3261 §13.3.1.4) plus five concurrency/timing hardenings;
- the DeviceInfo response's triple wire defect (DeviceName/flat/Result);
- neutral CLI identity (branding regression);
- GB2312 declaration refusals, the coverage gate, and three data races.
Interop CLI bundles (gb28181-cli_<os>_<arch>, 7 platforms) ship with this release.
v0.14.0
What's Changed
- docs: audio-only channels on the platform README rows by @xiqing85 in #140
- feat(platform): talk uplink receive leg — drain return PCMA on the talk socket by @mickeyzzc in #142
- fix(platform): route platform-initiated requests over the device's REGISTER transport by @mickeyzzc in #145
- docs(readme): release bundles carry the three interop tools by @xiqing85 in #146
- feat(cli): unified gb28181 interop CLI — one binary, three subcommands by @xiqing85 in #147
Full Changelog: v0.13.0...v0.14.0
v0.13.0
v0.12.0
What's Changed
- fix(manscdp): snapshot rides the DeviceConfig channel (#107) by @xiqing85 in #112
- feat(device): DeviceConfig closure family — five more 2022 sub-commands (#109) by @xiqing85 in #113
- feat(device): 2022 closure controls — DeviceUpgrade / FormatSDCard / PTZPreciseCtrl (#108) by @xiqing85 in #114
- feat(platform): ES over RTP receive side (#110) by @xiqing85 in #118
- docs: state multicast is out of scope — unicast-only media distribution (#111) by @xiqing85 in #119
- feat(device): device-side completeness wave 1 by @mickeyzzc in #120
- feat(device): Catalog/RecordInfo pagination by @mickeyzzc in #121
- feat(device): MediaStatus INFO over TCP/TLS dialogs by @mickeyzzc in #122
- feat(device): subscriptions and NOTIFYs over TCP/TLS dialogs by @mickeyzzc in #123
- docs: refresh transport notes after the TCP-parity waves by @mickeyzzc in #124
- feat(device): outbound plain-TCP transport (tcp-out) + stream redial by @mickeyzzc in #125
- test(sip): drain late INVITE stragglers before the memoized-probe Never window by @mickeyzzc in #126
- feat(device): async snapshot/upgrade exchanges on the stream transports by @mickeyzzc in #127
- docs: transport row gains tcp-out / redial / async-exchange coverage by @mickeyzzc in #128
- feat(device): passive TCP media — answer a=setup:active with a listening port by @mickeyzzc in #129
- feat(device): multi-channel catalog — ExtraChannels (A.2.1) by @mickeyzzc in #130
- feat(device): InfoQueryProvider — host data for the 2022 five information queries by @mickeyzzc in #131
- feat(device): inbound SIPS listener (transport: tls-listen) by @mickeyzzc in #132
- feat: multicast media — platform IGMP join + device multicast_ttl by @mickeyzzc in #133
- release: v0.12.0 — the transport-parity package by @mickeyzzc in #134
Full Changelog: v0.11.0...v0.12.0
v0.11.0
gb28181-go v0.11.0 — the GB/T 28181-2022 device-side closure
The device role is now feature-complete against the standard's
platform→device surface: every control, config, subscription, and
intercom flow has a decoded wire path and a host callback — closed out
with two SIP-level race fixes and a hardened CI floor.
Device control & configuration
- DeviceControl sub-commands (#85): IFrameCmd / RecordCmd / GuardCmd / AlarmCmd / TeleBoot / PTZCmd passthrough, via
ControlCallbacks— unregistered commands keep the historical explicit reject. - PTZCmd bit-level decode (#89): total
DecodePTZCommand; the golden byte table is generated from the platform-side constructors, so encode and decode cannot drift. - DragZoom (#92) and DeviceConfig minimum + ConfigDownload + HomePosition (#90), with a wire-form fix for the platform's HomePosition control.
Subscriptions & notifications
- SUBSCRIBE/NOTIFY framework (#87): per-event registry, host
DeviceNotifier(alarm / catalog-change / mobile-position),SetPositionSourceperiodic reporting. - §9.4.2 MediaStatus INFO (#86) on natural session end — BYE aborts stay silent.
Voice intercom
- Talkback receive (#88, G.711 sink), talkback upstream (#94, device→platform 20 ms RTP), and voice broadcast end-to-end (#96): platform
StartBroadcast→ device ack + audio INVITE back-call → platform RTP delivery, pinned by the conformance loopback. - The negotiated upstream law is exposed to hosts (#98).
Lifecycle & fixes
- Graceful deregistration (
Server.Deregister, #93) and SIP-Date observation (#91). - ACK race fixed (#97, fixes #95): gosip rewrites the top Via of in-flight requests without a lock (upstream gosip#87); all ACK paths now build from a pre-send INVITE snapshot. Race detector: 89 reports → 0.
- Probe-silent teardown answered the BYE for real (#99).
- Toolchain floor go1.26.6 (#100, stdlib security fixes); CI coverage gate at 80% (#101); fuzz targets on every untrusted parse surface (#102 — 2M+ execs verified clean).
Twin release: gb28181-rs v0.12.0 ships the same closure for Rust consumers.
中文说明
gb28181-go v0.11.0 —— GB/T 28181-2022 设备侧能力收官
设备角色对标准的"平台→设备"面就此齐装:每一类控制、配置、订阅与对讲流程都有解码后的线格式路径与宿主回调,另收两个 SIP 竞态修复与 CI 加固。
- 设备控制/配置:DeviceControl 子命令组(#85)、PTZCmd 位级解码(#89,golden 表由平台侧构造器生成,编解码不会漂移)、DragZoom(#92)、DeviceConfig 最小 + ConfigDownload + HomePosition(#90,顺带修正平台侧 HomePosition 线格式)。
- 订阅与通知:SUBSCRIBE/NOTIFY 框架(#87,告警/目录变化/移动位置通知器)、§9.4.2 MediaStatus 完成通知(#86,BYE 中止保持静默)。
- 语音对讲:对讲接收(#88,G.711 sink)、对讲上行(#94,20ms RTP)、语音广播端到端(#96,回环测试钉板);上行编码律暴露给宿主(#98)。
- 生命周期与修复:优雅注销(#93)、SIP-Date 校时观察(#91);ACK 竞态修复(#97,gosip 上游无锁改写 Via——快照化后 race detector 89 份报告归零);探针静默拆除真答 BYE(#99);工具链地板 go1.26.6(#100);CI 覆盖率门槛 80%(#101);全部不可信解析面上 fuzz(#102,200 万次执行验证干净)。
孪生版本:gb28181-rs v0.12.0(Rust 侧同款收官)。
v0.10.0
v0.10.0 — 多级级联能力包 / Multi-level cascade capability package
级联接缝与环路防护(Cascade seams & loop prevention)
- HubActivator(#73/#74,MiBeeNvr #451 Slice 1):上级点播空闲通道时经
SetHubActivator注入的激活器按需拉起主码流,Config.HubActivationTimeout(默认 10s)限时、应答前完成——拿到真实 hub 才回 200,失败保持 500、绝不建立无媒体对话;引用随会话拆除释放。NVR 侧 Slice 2 现已解锁。 - 多级环路防护(#77/#79,Slice 3):
CameraInfo.OriginDeviceID标记通道来源;目录按上级维度过滤(应答/订阅 NOTIFY/注册推送三路),来源=该上级平台编码的通道被排除、其 INVITE 回 404——掐灭 NVR 挂 NVR 时的信令/媒体回环。 - X-RoutePath / X-PreferredPath(附录 H.3):
Config.RoutePathAnnounce在 INVITE 200 上声明锚定平台;platform/sip导出 platform-id-list 编解码。 - HubActivator (Slice 1): on-demand main-stream activation for idle channels — 200 only once a real hub exists, bounded by
HubActivationTimeout(default 10s); one reference per forward, released at teardown. Unblocks NVR Slice 2. - Loop prevention (Slice 3):
CameraInfo.OriginDeviceID+ per-upper catalog aggregation — a middle platform never echoes the upper's own channels back to it (catalog answers, NOTIFYs, registration pushes), and their INVITEs answer 404.
GB/T 28181-2022 对齐(2022 alignment)
- 五组 2022 信息查询进入 manscdp 编解码(golden 钉标准原文 A.2.4.10-14 / A.2.6.12-16):
HomePositionQuery、CruiseTrackListQuery、CruiseTrackQuery、PTZPosition、SDCardStatus;设备角色给出空能力最小合法应答。 X-GB-Ver协议版本标识(附录 I):双侧可选开启(ProtocolVersion),设备侧PlatformProtocolVersion()感知平台版本;默认线格式不变。- SVAC 音频 stream_type 修正 0x81 → 0x9B(附录 C 表,对照标准文本发现的线格式 bug);PS 复用器新增 AAC(0x0F)。
- Five 2022 information queries join the codec (goldens pinned to the standard text); X-GB-Ver version identification (Annex I, opt-in); SVAC-audio stream_type corrected 0x81→0x9B per Annex C; AAC (0x0F) settable.
稳定性(Stability)
v0.9.0
What's Changed
- feat(device): snapshot command execution seam (mibee-eye-raspi#28) by @mickeyzzc in #68
- release: v0.9.0 — the device-snapshot capability package (mibee-eye-raspi#28) by @mickeyzzc in #69
Full Changelog: v0.8.0...v0.9.0
v0.8.0
What's Changed
- docs: replace the spec-example password in the quickstart with a placeholder by @mickeyzzc in #34
- feat(sip): publish UploadSnapShotFinished notify as gb28181.snapshot.finished event by @mickeyzzc in #54
- release: v0.8.0 — the snapshot-event capability package (issue #66) by @mickeyzzc in #67
Full Changelog: v0.7.0...v0.8.0
v0.7.0
What's Changed
- feat(manscdp): GB28181-2022 snapshot control + completion notify (Closes #49) by @mickeyzzc in #50
- test(cascade): widen TCP media-forward budget to 15s under CI load (Closes #51) by @mickeyzzc in #53
- docs: SECURITY.md + CHANGELOG.md (v0.1.0 → v0.6.0) by @mickeyzzc in #55
- feat: Config.Validate() on device + platform/sip with fail-fast Start by @mickeyzzc in #56
- ci: golangci-lint adoption + coverage summary (fixes 106-finding baseline) by @mickeyzzc in #57
- feat(metrics): library-neutral MetricsHooks for device + platform/sip by @mickeyzzc in #59
- feat(cascade): exponential REGISTER retry backoff by @mickeyzzc in #60
- ci(release): publish GitHub Release with tool bundles on tag by @mickeyzzc in #61
- feat(gb35114): device-side downstream Note verification by @mickeyzzc in #62
- refactor: net.Dial/Listen → DialContext/ListenContext by @mickeyzzc in #63
- test: soak harness + psmux/sip/portmanager benchmarks by @mickeyzzc in #64
- release: v0.7.0 by @mickeyzzc in #65
Full Changelog: v0.6.0...v0.7.0
v0.3.0 — library neutrality + test coverage
Highlights since v0.2.2
Library neutrality — breaking behavior change (#30)
device.UserAgentnow defaults to a neutralGB28181-Go/1.0. Hosts stamp their own product identity by assigning the var beforedevice.New(mutating it concurrently afterwards races the message builders).- Catalog / DeviceInfo identity (Name, Manufacturer, Model, Firmware) is configurable; defaults are neutral and never leak a vendor name by accident.
- Random SIP dialog tags, logger wiring fix, spec-correct 20-digit device-ID formatting.
Fixes & hardening
fix(platform+device): FrameHub IDR flag exposed, neutral UserAgent follow-ups (#29)fix(cascade+psdemux): PSM on a session's first burst + PSM-less codec latch (#22)test(sip): close MESSAGE/BYE transactions before teardown — gosip Terminate-vs-transportErr race (#26)
Tests, examples & docs
- Statement coverage 73.1% → 81%+ across all packages (+
sdpAudioCodecfix) (#23) - Second coverage round: MESSAGE branches, TCP cascade media, catalog loop (#25)
- Runnable examples for the three usage roles (#24)
- Single-language README indexes with correct paths + link-guard tests (#31)
Full changelog: v0.2.2...v0.3.0