{
    "version": "https://jsonfeed.org/version/1",
    "title": "GT-Streaming 更新",
    "home_page_url": "https://lucendar.com/blog",
    "description": "版本发布与技术文章",
    "items": [
        {
            "id": "https://lucendar.com/blog/2026/09/05/s-4_0_19",
            "content_html": "<p>媒体服务 <strong>4.0.19</strong> 与巡检服务 <strong>vid-inspect 1.2.0</strong> 同期发布：新增自动语音下发，证据提取与巡检抓拍支持优先级调度。媒体服务修复一处内存泄露。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"本版本要点\">本版本要点<a href=\"#本版本要点\" class=\"hash-link\" aria-label=\"本版本要点的直接链接\" title=\"本版本要点的直接链接\">​</a></h2><ul><li><strong>自动语音下发</strong>：企业应用调用接口播放预置语音；终态写入 Kafka <code>auto-voice-evt</code>。人工对讲占用时立即失败，不踢人。</li><li><strong>证据 / 巡检可按优先级排队</strong>：附件提取与巡检抓拍支持 <code>priority</code> / <code>guid</code> / <code>ai</code>，按优先级调度且不抢占已执行任务。</li><li><strong>可选 Kafka 双发</strong>：证据成功可双发 <code>eeye-stm-evidence</code>；巡检全通道结束可双发 <code>eeye-stm-inspect-evt</code>（由 vid-inspect 发出）。旧队列保持兼容。</li><li><strong>运维观察</strong>：附件与语音内存队列可查询；vid-inspect 可选独立观察端口（默认不监听）。</li></ul><p>WebSocket 对等接口见 <code>strm-js</code> <strong>1.1.3</strong>（图片与 WAV 下载仍走 HTTP）。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"新增\">新增<a href=\"#新增\" class=\"hash-link\" aria-label=\"新增的直接链接\" title=\"新增的直接链接\">​</a></h2><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"自动语音下发\">自动语音下发<a href=\"#自动语音下发\" class=\"hash-link\" aria-label=\"自动语音下发的直接链接\" title=\"自动语音下发的直接链接\">​</a></h3><p>企业应用调用 <a href=\"/docs/strm-api-4/http-api/voice-api/voice-upload\">下发语音</a>（<code>POST /v1/stream/voice/upload</code>），流媒体打开对讲通道播放本地音频库，并将结果写入 <a href=\"/docs/spi/mq-api/mq-auto-voice-evt\">auto-voice-evt</a>。</p><ul><li>优先级 0–2（默认 0）；同终端串行；不抢占已执行任务</li><li>超时从请求 <code>tm</code> 起算（默认 30 秒）→ <code>result=3</code>；通道未就绪 → <code>result=4</code>；播完 → <code>result=1</code></li><li>人工对讲占用 → <code>result=2</code>，<strong>不打断人工对讲</strong></li><li>首次启动可从远程音频 API 全量同步并转码为 8 kHz 单声道 LPCM WAV；之后缺文件时按需拉取</li><li>可 <a href=\"/docs/strm-api-4/http-api/voice-api/qry-voice-task\">查询任务</a>、<a href=\"/docs/strm-api-4/http-api/voice-api/qry-voice-queue\">查询内存队列</a>、<a href=\"/docs/strm-api-4/http-api/voice-api/qry-voice-clip\">浏览音频库</a> 并 <a href=\"/docs/strm-api-4/http-api/voice-api/voice-file\">试听</a></li></ul><p>流程说明见 <a href=\"/docs/app-guide/voice-dispatch-guide\">自动语音下发</a>。不配置 <code>voice</code>（或 <code>\"enabled\": false</code>）则功能关闭。</p><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"只读观察-api\">只读观察 API<a href=\"#只读观察-api\" class=\"hash-link\" aria-label=\"只读观察 API的直接链接\" title=\"只读观察 API的直接链接\">​</a></h3><table><thead><tr><th>接口</th><th>进程</th><th>说明</th></tr></thead><tbody><tr><td><a href=\"/docs/strm-api-4/http-api/alm-att-api/qry-alm-att-queue\"><code>GET /v1/alm/att/queue</code></a></td><td>流媒体</td><td>证据提取内存调度快照；旧 <a href=\"/docs/strm-api-4/http-api/alm-att-api/qry-alm-att-stat\"><code>/v1/alm/att/stat</code></a> 计数语义不变</td></tr><tr><td><a href=\"/docs/strm-api-4/http-api/voice-api/qry-voice-queue\"><code>GET /v1/stream/voice/queue</code></a></td><td>流媒体</td><td>语音下发内存调度快照</td></tr><tr><td><a href=\"/docs/strm-api-4/http-api/vid-inspect-api/vid-inspect-observe\"><code>GET /v1/info</code></a>、<a href=\"/docs/strm-api-4/http-api/vid-inspect-api/vid-inspect-observe\"><code>GET /v1/queue</code></a></td><td><strong>vid-inspect</strong></td><td>独立观察端口（默认本机 <code>18288</code>）；未配置 <code>http</code> 或 <code>port=0</code> 则不监听</td></tr></tbody></table><p>列表最多 200 条，超出设 <code>truncated: true</code>。快照 best-effort，建议轮询间隔 ≥ 200ms。</p><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"websocket-api-对齐strm-js-113\">WebSocket API 对齐（strm-js 1.1.3）<a href=\"#websocket-api-对齐strm-js-113\" class=\"hash-link\" aria-label=\"WebSocket API 对齐（strm-js 1.1.3）的直接链接\" title=\"WebSocket API 对齐（strm-js 1.1.3）的直接链接\">​</a></h3><table><thead><tr><th>WS <code>meth</code></th><th>HTTP</th></tr></thead><tbody><tr><td><code>almAtt/queue</code></td><td><code>GET /v1/alm/att/queue</code></td></tr><tr><td><code>vidInspect/create</code>、<code>vidInspect/qry</code></td><td><code>POST</code> / <code>GET /v1/vid_inspect</code></td></tr><tr><td><code>voice/upload</code>、<code>voice/qryTask</code>、<code>voice/queue</code>、<code>voice/clip</code></td><td>对应语音 HTTP 接口</td></tr></tbody></table><p>取图与 WAV 下载仍走 HTTP。见 <a href=\"/docs/strm-api-4/ws2-api/StrmWsApi/vid-inspect-methods\">巡检</a>、<a href=\"/docs/strm-api-4/ws2-api/StrmWsApi/voice-methods\">语音</a>、<a href=\"/docs/strm-api-4/ws2-api/StrmWsApi/alm-att-methods\">附件队列</a>。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"优化\">优化<a href=\"#优化\" class=\"hash-link\" aria-label=\"优化的直接链接\" title=\"优化的直接链接\">​</a></h2><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"主动安全附件\">主动安全附件<a href=\"#主动安全附件\" class=\"hash-link\" aria-label=\"主动安全附件的直接链接\" title=\"主动安全附件的直接链接\">​</a></h3><ul><li>提取请求支持 <code>priority</code>（0–5，默认 3）、<code>guid</code>、<code>ai</code></li><li>按 <code>(priority DESC, reqTm ASC)</code> 排队，<strong>不抢占</strong>已执行任务</li><li>成功时可双发 <a href=\"/docs/spi/mq-api/mq-eeye-evidence\">伊爱证据完成事件</a>（<code>eeye-stm-evidence</code>）；未配置则只发原 <code>fetch-alm-att-completed</code></li></ul><p>详见 <a href=\"/docs/app-guide/adas-att-guide\">主动安全附件集成指南</a>。</p><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"巡检抓拍配套-vid-inspect-120\">巡检抓拍（配套 vid-inspect 1.2.0）<a href=\"#巡检抓拍配套-vid-inspect-120\" class=\"hash-link\" aria-label=\"巡检抓拍（配套 vid-inspect 1.2.0）的直接链接\" title=\"巡检抓拍（配套 vid-inspect 1.2.0）的直接链接\">​</a></h3><ul><li>创建任务支持 <code>priority</code>（0–2，默认 0）、<code>guid</code>、<code>ai</code></li><li>Master 等待队列与终端 pending 均按优先级调度，不抢占执行中任务</li><li><code>maxQueuedTasks</code>（默认 200）限制等待队列；超限返回 <code>-23</code></li><li>全通道结束后可双发 <a href=\"/docs/spi/mq-api/mq-eeye-inspect-evt\">伊爱巡检聚合事件</a>（<code>eeye-stm-inspect-evt</code>，由 <strong>vid-inspect</strong> 发出；流媒体不使用 <code>mq.eeyeInspect</code>）</li><li>通道成功时同时返回 <code>url</code>（取图接口）与 <code>url2</code>（文件系统路径）</li></ul><p>详见 <a href=\"/docs/strm-api-4/http-api/vid-inspect-api/vid-inspect-overview\">巡检抓拍 API</a>。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"修正\">修正<a href=\"#修正\" class=\"hash-link\" aria-label=\"修正的直接链接\" title=\"修正的直接链接\">​</a></h2><ul><li>混淆后码流信息字段名被改写，导致巡检服务无法识别音视频编码；现保留原始字段名</li><li>修正一处 ByteBuf 未释放引起的内存泄露</li><li>查询在线终端时若 Micro-Gateway 不可用，返回明确的服务不可用，而不再笼统报内部错误</li><li>WebSocket API 将业务错误正确封装为应答，不再把异常类名泄漏给客户端</li><li>修正查询附件提取任务时使用错误列名的问题</li><li>修正 PostgreSQL 与 Derby 在带时区时间戳绑定上的差异</li><li>修正取消未完成任务时 SQL 条件优先级错误，避免把全部排队任务误标为系统取消</li></ul><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"升级注意\">升级注意<a href=\"#升级注意\" class=\"hash-link\" aria-label=\"升级注意的直接链接\" title=\"升级注意的直接链接\">​</a></h2><p>需要 <code>strm-sdk</code> <strong>4.1.1</strong>。数据库结构号仍为 <strong>13</strong>（<code>v13.sql</code>），无 v14。全新安装或从 13 以下自动升级会执行整份脚本。若库已经是 struct 13（仅有证据相关列），需<strong>手工补跑</strong> <code>v13.sql</code> 中其余语句：</p><ul><li><code>t_vid_inspect_task</code> 增加 <code>f_priority</code> / <code>f_guid</code> / <code>f_ai</code></li><li>新建 <code>t_voice_clip</code>、<code>t_voice_dispatch_task</code>（语音编号为 <strong>VARCHAR</strong>）</li></ul><p>已有证据相关 <code>ALTER</code> 不要重复执行。</p><p>可选配置（不配则对应能力不启用，旧接口继续可用）：</p><table><thead><tr><th>配置</th><th>进程</th><th>用途</th></tr></thead><tbody><tr><td><code>mq.eeyeEvidence</code></td><td>流媒体</td><td>证据成功双发 Kafka</td></tr><tr><td><code>voice.*</code> + <code>mq.autoVoice</code></td><td>流媒体</td><td>自动语音下发及结果 topic <code>auto-voice-evt</code></td></tr><tr><td><code>mq.eeyeInspect</code>、<code>vidInspect.maxQueuedTasks</code></td><td><strong>vid-inspect</strong></td><td>巡检聚合事件与等待队列上限</td></tr><tr><td><code>http.port</code> / <code>http.token</code></td><td><strong>vid-inspect</strong></td><td>观察 API；生产环境建议不监听</td></tr></tbody></table><p><code>voice.remoteApi.kind</code> 为 <code>default</code>（缺省，标准音频管理 API）或 <code>e-eye</code>（伊爱提醒语音接口）。配置样例见 <a href=\"/docs/deploy/streaming-deploy\">部署说明</a>。</p><p>客户端若使用 WebSocket 巡检 / 语音 / 附件队列，请升级到 <code>strm-js</code> <strong>1.1.3</strong>。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"相关文档\">相关文档<a href=\"#相关文档\" class=\"hash-link\" aria-label=\"相关文档的直接链接\" title=\"相关文档的直接链接\">​</a></h2><ul><li><a href=\"/docs/app-guide/voice-dispatch-guide\">自动语音下发</a></li><li><a href=\"/docs/strm-api-4/http-api/vid-inspect-api/vid-inspect-overview\">巡检抓拍 API</a> / <a href=\"/docs/strm-api-4/http-api/vid-inspect-api/vid-inspect-observe\">巡检观察 API</a></li><li><a href=\"/docs/app-guide/adas-att-guide\">主动安全附件集成指南</a></li><li><a href=\"/docs/spi/mq-api/overview\">消息队列概览</a></li><li><a href=\"/docs/app-guide/http-vs-ws-api\">HTTP 与 WebSocket API 选型</a></li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2026/09/05/s-4_0_19",
            "title": "GT-Streaming v4.0.19 发布",
            "summary": "新增自动语音下发，完善证据与巡检调度；配套 vid-inspect 1.2.0 观察 API 与可选 Kafka 聚合事件。",
            "date_modified": "2026-09-05T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "v4"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2026/05/07/s-4_0_18",
            "content_html": "<p>修正 HLS 分段引起的播放停顿，并修复一处内存泄露。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"修正\">修正<a href=\"#修正\" class=\"hash-link\" aria-label=\"修正的直接链接\" title=\"修正的直接链接\">​</a></h2><ul><li>修正 HLS 分段的 BUG 引起播放器停顿的问题</li><li>修正一处内存泄露</li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2026/05/07/s-4_0_18",
            "title": "GT-Streaming v4.0.18 维护版本发布",
            "summary": "修正 HLS 分段导致的播放停顿，并修复一处内存泄露。",
            "date_modified": "2026-05-07T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "v4"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2026/04/11/s-4_0_17",
            "content_html": "<p>降低启动阶段附件提取任务的一次性加载压力，并调整 RTSP 默认端口范围。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"优化\">优化<a href=\"#优化\" class=\"hash-link\" aria-label=\"优化的直接链接\" title=\"优化的直接链接\">​</a></h2><ul><li>降低启动后一次性从数据库加载未完成的附件提取任务的数据，以平滑服务启动期间给整个系统带来的压力</li><li>调整 RTSP 默认端口范围，使其更适合操作系统的端口分配规则</li></ul><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"修正\">修正<a href=\"#修正\" class=\"hash-link\" aria-label=\"修正的直接链接\" title=\"修正的直接链接\">​</a></h2><ul><li>统一部分表数据结构在 PostgreSQL 和 Derby 中的区别</li><li>修正部分功能在使用 Derby 数据库时报错的问题</li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2026/04/11/s-4_0_17",
            "title": "GT-Streaming v4.0.17 维护版本发布",
            "summary": "平滑启动时的附件提取任务加载，并调整 RTSP 默认端口范围。",
            "date_modified": "2026-04-11T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "v4"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2026/03/16/s-4_0_16",
            "content_html": "<p>补全若干历史数据表的周期性清理，并在遇到不支持的视频编码时记录日志。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"优化\">优化<a href=\"#优化\" class=\"hash-link\" aria-label=\"优化的直接链接\" title=\"优化的直接链接\">​</a></h2><ul><li>遇到不支持的视频编码时记录日志</li></ul><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"修正\">修正<a href=\"#修正\" class=\"hash-link\" aria-label=\"修正的直接链接\" title=\"修正的直接链接\">​</a></h2><ul><li>补全几个遗漏的历史数据表的周期性自动清理</li><li>修正某日志表在罕见情况下发生保存重复记录异常的问题</li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2026/03/16/s-4_0_16",
            "title": "GT-Streaming v4.0.16 维护版本发布",
            "summary": "补全历史表自动清理，并在遇到不支持的视频编码时记录日志。",
            "date_modified": "2026-03-16T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "v4"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2025/12/01/s-4_0_15",
            "content_html": "<p>修正码流透传帧处理异常，以及特定情况下的高 CPU 占用。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"修正\">修正<a href=\"#修正\" class=\"hash-link\" aria-label=\"修正的直接链接\" title=\"修正的直接链接\">​</a></h2><ul><li>修正小的码流透传帧处理异常的 BUG</li><li>修正特定情况下导致高 CPU 占用的 BUG</li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2025/12/01/s-4_0_15",
            "title": "GT-Streaming v4.0.15 维护版本发布",
            "summary": "修正码流透传帧处理异常，以及特定情况下的高 CPU 占用。",
            "date_modified": "2025-12-01T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "v4"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2025/09/30/s-4_0_14",
            "content_html": "<p>优化数据库访问，并完善日志存储。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"优化\">优化<a href=\"#优化\" class=\"hash-link\" aria-label=\"优化的直接链接\" title=\"优化的直接链接\">​</a></h2><ul><li>数据库访问优化</li><li>完善日志存储</li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2025/09/30/s-4_0_14",
            "title": "GT-Streaming v4.0.14 维护版本发布",
            "summary": "优化数据库访问，并完善日志存储。",
            "date_modified": "2025-09-30T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "v4"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2025/09/08/s-4_0_13",
            "content_html": "<p>新增巡检抓拍功能，并优化数据库访问与日志清理。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"新增\">新增<a href=\"#新增\" class=\"hash-link\" aria-label=\"新增的直接链接\" title=\"新增的直接链接\">​</a></h2><ul><li>增加<a href=\"/docs/strm-api-4/http-api/vid-inspect-api/vid-inspect-overview\">巡检抓拍</a>功能</li></ul><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"优化\">优化<a href=\"#优化\" class=\"hash-link\" aria-label=\"优化的直接链接\" title=\"优化的直接链接\">​</a></h2><ul><li>数据库访问优化</li><li>优化日志清理机制</li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2025/09/08/s-4_0_13",
            "title": "GT-Streaming v4.0.13 维护版本发布",
            "summary": "新增巡检抓拍，并优化数据库访问与日志清理。",
            "date_modified": "2025-09-08T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "v4"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2025/06/12/s-4_0_11",
            "content_html": "<p>优化回放延迟关闭处理，并修正 FLV-WS 过早释放缓冲区导致客户端异常关闭的问题。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"优化\">优化<a href=\"#优化\" class=\"hash-link\" aria-label=\"优化的直接链接\" title=\"优化的直接链接\">​</a></h2><ul><li>回放延迟关闭处理优化</li><li>完善日志记录</li></ul><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"修正\">修正<a href=\"#修正\" class=\"hash-link\" aria-label=\"修正的直接链接\" title=\"修正的直接链接\">​</a></h2><ul><li>FLV-WS 协议处理在部分情况下会因过早释放缓冲区导致客户端异常关闭的问题</li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2025/06/12/s-4_0_11",
            "title": "GT-Streaming v4.0.11 维护版本发布",
            "summary": "优化回放延迟关闭处理，并修正 FLV-WS 过早释放缓冲区的问题。",
            "date_modified": "2025-06-12T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "v4"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2025/06/08/s-4_0_10",
            "content_html": "<p>媒体通知增加转储文件下载 URL，并修正按时间段查询转储、回放过早关流以及附件提取调度问题。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"优化\">优化<a href=\"#优化\" class=\"hash-link\" aria-label=\"优化的直接链接\" title=\"优化的直接链接\">​</a></h2><ul><li>媒体通知（<code>StrmMediaNotif</code>）增加 <a href=\"/docs/strm-api-4/http-api/stomp-ws/ws-api/struct-strm-notif\"><code>playedAvDumpUrl</code></a> 属性，用于指出转储文件的下载 URL</li></ul><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"修正\">修正<a href=\"#修正\" class=\"hash-link\" aria-label=\"修正的直接链接\" title=\"修正的直接链接\">​</a></h2><ul><li>修正 <a href=\"/docs/strm-api-4/http-api/play-api/qry-played-av-dump\"><code>played_av_dump</code></a> 接口按时间段查询时报 SQL 错误的问题</li><li>回放终端远程录像时过早地关闭媒体流</li><li>主动安全提取任务的调度在部分情况下失去控制</li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2025/06/08/s-4_0_10",
            "title": "GT-Streaming v4.0.10 维护版本发布",
            "summary": "媒体通知增加转储文件下载 URL，并修正回放关闭与附件提取调度问题。",
            "date_modified": "2025-06-08T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "v4"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2025/04/12/s_4_0_7",
            "content_html": "<p>修正 4.0 引入的 HLS 协议不兼容 iPhone Safari 的问题。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"修正\">修正<a href=\"#修正\" class=\"hash-link\" aria-label=\"修正的直接链接\" title=\"修正的直接链接\">​</a></h2><ul><li>修正 4.0 版引入的 HLS 协议不兼容 iPhone Safari 的问题</li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2025/04/12/s_4_0_7",
            "title": "GT-Streaming v4.0.7 维护版本发布",
            "summary": "修正 4.0 引入的 HLS 在 iPhone Safari 上不兼容的问题。",
            "date_modified": "2025-04-12T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "v4"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2024/12/20/s_3_3_8",
            "content_html": "<p>关闭 Prometheus Metrics 端点，修复未授权访问漏洞。</p><p><strong>发布日期</strong>：2024-12-20</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"streaming\">Streaming<a href=\"#streaming\" class=\"hash-link\" aria-label=\"Streaming的直接链接\" title=\"Streaming的直接链接\">​</a></h2><ul><li><strong>修正「Prometheus Metrics 未授权访问」安全漏洞</strong><br>关闭 Prometheus Metrics 端点</li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2024/12/20/s_3_3_8",
            "title": "GT-Streaming v3.3.8 维护版本发布",
            "summary": "关闭 Prometheus Metrics 端点，修复未授权访问漏洞。",
            "date_modified": "2024-12-20T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "v3",
                "security"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2024/08/10/index",
            "content_html": "<p>在总结前面版本遇到的问题、综合用户反馈的基础上，经过约一年开发测试，<code>GT-Streaming</code> 迎来重大更新：v4.0.0。从 3.x 升级请先阅读 <a href=\"/docs/app-guide/migrate-to-v4\">迁移到 v4.0</a>。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"对接方式的改进\">对接方式的改进<a href=\"#对接方式的改进\" class=\"hash-link\" aria-label=\"对接方式的改进的直接链接\" title=\"对接方式的改进的直接链接\">​</a></h2><p>这个版本最主要的改进，是将原来内置在 <code>Micro-GNSS</code> 中的流媒体服务代理集成到流媒体服务中，同时采用<a href=\"/docs/spi/mq-api/overview\">消息队列</a>作为与企业应用对接的主要媒介。企业应用的对接工作只需要对接指令系统；部署上也更简单，双方只需要一个消息队列地址。</p><p>原来的 Micro-GNSS API 也已集成到流媒体服务中。从本版本起，部署不再需要 <code>Micro-GNSS</code> 服务。若仍需要简单对接方式，可使用套件中的 <code>Micro-Gateway</code> 作为终端网关。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"websocket-api-和-strm-js-库\">WebSocket API 和 <code>strm-js</code> 库<a href=\"#websocket-api-和-strm-js-库\" class=\"hash-link\" aria-label=\"websocket-api-和-strm-js-库的直接链接\" title=\"websocket-api-和-strm-js-库的直接链接\">​</a></h2><p>原来的 HTTP API 在常规调用之外，还需要单独建立 STOMP WebSocket 以接收通知。从 4.0.0 起，<a href=\"/docs/strm-api-4/ws2-api/ws2-intro\">WebSocket API</a> 将接口调用与消息通知统一到一条信道。</p><p>同时提供 <code>strm-js</code> 客户端库（已发布到 npm），覆盖大部分接口、常量与数据结构，并内置心跳、流保活与请求管理：</p><div class=\"language-shell codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-color:#393A34;--prism-background-color:#f6f8fa\"><div class=\"codeBlockContent_biex\"><pre tabindex=\"0\" class=\"prism-code language-shell codeBlock_bY9V thin-scrollbar\"><code class=\"codeBlockLines_e6Vv\"><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token function\" style=\"color:#d73a49\">npm</span><span class=\"token plain\"> </span><span class=\"token function\" style=\"color:#d73a49\">install</span><span class=\"token plain\"> -S strm-js</span><br></span></code></pre><div class=\"buttonGroup__atx\"><button type=\"button\" aria-label=\"复制代码到剪贴板\" title=\"复制\" class=\"clean-btn\"><span class=\"copyButtonIcons_eSgA\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" class=\"copyButtonIcon_y97N\"><path fill=\"currentColor\" d=\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\"></path></svg><svg viewBox=\"0 0 24 24\" class=\"copyButtonSuccessIcon_LjdS\"><path fill=\"currentColor\" d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\"></path></svg></span></button></div></div></div><p><code>strm-js</code> 同时提供操作 WebSocket API 与 HTTP API 的类。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"主要对讲音频格式\">主要对讲音频格式<a href=\"#主要对讲音频格式\" class=\"hash-link\" aria-label=\"主要对讲音频格式的直接链接\" title=\"主要对讲音频格式的直接链接\">​</a></h2><p>对讲从原来只支持 <code>G711A</code>、<code>G711U</code>，扩展到：</p><ul><li><code>LPCM</code></li><li><code>G711A</code></li><li><code>G711U</code></li><li><code>G726-16</code></li><li><code>G726-24</code></li><li><code>G726-32</code></li><li><code>G726-40</code></li><li><code>ADPCM</code></li></ul><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"http2-支持\">HTTP/2 支持<a href=\"#http2-支持\" class=\"hash-link\" aria-label=\"HTTP/2 支持的直接链接\" title=\"HTTP/2 支持的直接链接\">​</a></h2><p>HTTP 基础架构支持 HTTP/2（可通过配置启用或关闭），<code>HTTP API</code> 可因此获得性能提升。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"其他改进\">其他改进<a href=\"#其他改进\" class=\"hash-link\" aria-label=\"其他改进的直接链接\" title=\"其他改进的直接链接\">​</a></h2><ul><li>集成 ADAS 报警附件接收服务，并统一 ADAS 报警代码，便于同一应用接入多种协议终端</li><li>采用 nginx 格式 SSL 证书，支持不重启服务更新证书</li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2024/08/10/index",
            "title": "GT-Streaming v4.0.0 发布",
            "summary": "4.0 将流媒体代理并入媒体服务，引入 WebSocket API 与 strm-js，不再依赖 Micro-GNSS。",
            "date_modified": "2024-08-10T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "v4"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2024/02/22/s-3_3_7",
            "content_html": "<p>修正中天安驰终端附件分包，以及广东 / 四川地标双手脱离方向盘报警的区分，并继续修复内存泄露。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"micro-gnss\">Micro-GNSS<a href=\"#micro-gnss\" class=\"hash-link\" aria-label=\"Micro-GNSS的直接链接\" title=\"Micro-GNSS的直接链接\">​</a></h2><ul><li><p><strong>ADAS 附件服务问题修正</strong></p><ul><li>修正了接收中天安驰终端附件时出现的未正确分包的问题</li><li>修正了未正确区分广东地标与四川地标两地的双手脱离方向盘报警的问题</li></ul></li><li><p><strong>修正内存泄露问题</strong><br>\n<!-- -->进一步发现和修复了部分导致内存泄漏的问题。</p></li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2024/02/22/s-3_3_7",
            "title": "Micro-GNSS v1.1.14 维护版本发布",
            "summary": "修正中天安驰附件分包与川粤双手脱离报警区分，并继续修复内存泄露。",
            "date_modified": "2024-02-22T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "micro-gnss",
                "v3"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2024/01/18/s-3_3_7",
            "content_html": "<p>改良 CRC 校验以提升数据包解码性能，并继续修复内存泄露。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"micro-gnss\">Micro-GNSS<a href=\"#micro-gnss\" class=\"hash-link\" aria-label=\"Micro-GNSS的直接链接\" title=\"Micro-GNSS的直接链接\">​</a></h2><ul><li><p><strong>数据包解码性能提升</strong><br>\n<!-- -->改良的 CRC 校验，使数据包解码性能进一步提升。</p></li><li><p><strong>修正内存泄露问题</strong><br>\n<!-- -->进一步发现和修复了部分导致内存泄漏的问题。</p></li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2024/01/18/s-3_3_7",
            "title": "Micro-GNSS v1.1.13 维护版本发布",
            "summary": "改良 CRC 校验以提升解码性能，并继续修复内存泄露。",
            "date_modified": "2024-01-18T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "micro-gnss",
                "v3"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2023/09/10/s-3_4_2",
            "content_html": "<p>Streaming 支持 H.265 与客户端 RTSP，HLS 增加 fMP4 段格式；Micro-GNSS 提升解码性能，并增加 Basic 认证与 SSE 订阅。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"streaming\">Streaming<a href=\"#streaming\" class=\"hash-link\" aria-label=\"Streaming的直接链接\" title=\"Streaming的直接链接\">​</a></h2><ul><li><p><strong>支持 H.265 的设备和客户端</strong></p><p>现在支持接收设备端 H.265 视频流，并向客户端提供 FLV（Enhanced RTMP）和 HLS（fMP4）格式的码流，现代浏览器可直接播放 H.265。H.265 能以更低带宽获得更清晰的图像。</p></li><li><p><strong>增加客户端 RTSP 协议支持</strong></p><p>媒体服务可以向客户端提供 RTSP 协议码流。</p></li><li><p><strong>HLS 协议增加 fMP4 段格式支持</strong></p><p>在已有的 MPEG2-TS 之外增加 fMP4，并将其作为 HLS 的默认段格式。</p></li><li><p><strong>WS-FLV 性能提升</strong></p><p>采用更高效的封包方式处理 FLV 客户端请求，降低 WebSocket-FLV 推流延迟，并减少服务端 CPU 占用。</p></li></ul><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"micro-gnss\">Micro-GNSS<a href=\"#micro-gnss\" class=\"hash-link\" aria-label=\"Micro-GNSS的直接链接\" title=\"Micro-GNSS的直接链接\">​</a></h2><ul><li><p><strong>数据包解码性能提升</strong></p><p>改进数据包解码过程，整体性能和吞吐量进一步提升。</p></li><li><p><strong>支持 Basic 身份验证</strong></p><p>支持通过客户端提供的固定会话令牌进行验证，简化 WebSocket 重连。</p></li><li><p><strong>增加 SSE 事件订阅方式</strong></p><p>在原有 WebSocket 之外增加 Server-Sent Events 订阅。</p></li><li><p><strong>修正内存泄露问题</strong></p><p>修复可能导致内存泄漏的问题。</p></li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2023/09/10/s-3_4_2",
            "title": "GT-Streaming v3.4.2 发布",
            "summary": "支持 H.265 与客户端 RTSP，HLS 默认改用 fMP4，并提升 WS-FLV 性能。",
            "date_modified": "2023-09-10T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "micro-gnss",
                "v3"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2023/06/29/relay-sys-tuning",
            "content_html": "<p>转发服务大量外发连接时容易遇到端口耗尽。本文说明如何规划 IP/端口，并调整 Linux 的打开文件数与 TCP 参数。产品说明与下载见 <a href=\"/relay/relay\">Relay 通用数据转发服务</a>。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"概要\">概要<a href=\"#概要\" class=\"hash-link\" aria-label=\"概要的直接链接\" title=\"概要的直接链接\">​</a></h2><p>转发服务需要解决的一个重要问题是端口耗尽。未专门设置时，程序只能发起不足 3 万的连接。加上接入端断开重连、假连接等情况，实际有效连接数更少。主流做法是增加 IP 和可用端口范围，并由程序自行管理端口。</p><p>围绕这个目标，可对转发服务和 Linux 系统参数做以下设置：</p><ol><li>调整最大打开文件数的限制</li><li>做好 IP 和端口规划</li><li>调整部分 TCP 参数</li></ol><p>本文针对转发服务和 Linux，但同样适用于其他需要大量外发连接的应用和其他操作系统。</p><small>注：大量外发时，路由器、防火墙等设备也要相应调整，如增加 IP、缩短数据包超时。具体请参考这些网络设备的说明。</small><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"调整最大打开文件数的限制\">调整最大打开文件数的限制<a href=\"#调整最大打开文件数的限制\" class=\"hash-link\" aria-label=\"调整最大打开文件数的限制的直接链接\" title=\"调整最大打开文件数的限制的直接链接\">​</a></h2><p>在Linux中，为了防止某些应用或用户占用过多的系统资源，系统限定用户最大可同时打开的文件句柄数量。\n除了读写普通文件以外，高负载的转发服务会使用较多的TCP连接，而每个TCP连接对应被系统视为一个文件，\n都要受到这个最大可同时打开文件数的限制。所以，要确保运行转发服务的用户的这个限制值高于连接需求。</p><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"查看最大打开文件数\">查看最大打开文件数<a href=\"#查看最大打开文件数\" class=\"hash-link\" aria-label=\"查看最大打开文件数的直接链接\" title=\"查看最大打开文件数的直接链接\">​</a></h3><div class=\"language-shell codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-color:#393A34;--prism-background-color:#f6f8fa\"><div class=\"codeBlockContent_biex\"><pre tabindex=\"0\" class=\"prism-code language-shell codeBlock_bY9V thin-scrollbar\"><code class=\"codeBlockLines_e6Vv\"><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token builtin class-name\">ulimit</span><span class=\"token plain\"> -n</span><br></span></code></pre><div class=\"buttonGroup__atx\"><button type=\"button\" aria-label=\"复制代码到剪贴板\" title=\"复制\" class=\"clean-btn\"><span class=\"copyButtonIcons_eSgA\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" class=\"copyButtonIcon_y97N\"><path fill=\"currentColor\" d=\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\"></path></svg><svg viewBox=\"0 0 24 24\" class=\"copyButtonSuccessIcon_LjdS\"><path fill=\"currentColor\" d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\"></path></svg></span></button></div></div></div><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"临时修改最大打开文件数\">临时修改最大打开文件数<a href=\"#临时修改最大打开文件数\" class=\"hash-link\" aria-label=\"临时修改最大打开文件数的直接链接\" title=\"临时修改最大打开文件数的直接链接\">​</a></h3><p>如果查到的最大打开文件数小于期望的值，可通过下面的命令临时修改：</p><div class=\"language-shell codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-color:#393A34;--prism-background-color:#f6f8fa\"><div class=\"codeBlockContent_biex\"><pre tabindex=\"0\" class=\"prism-code language-shell codeBlock_bY9V thin-scrollbar\"><code class=\"codeBlockLines_e6Vv\"><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token builtin class-name\">ulimit</span><span class=\"token plain\"> -n </span><span class=\"token punctuation\" style=\"color:#393A34\">{</span><span class=\"token plain\">limit_value</span><span class=\"token punctuation\" style=\"color:#393A34\">}</span><br></span></code></pre><div class=\"buttonGroup__atx\"><button type=\"button\" aria-label=\"复制代码到剪贴板\" title=\"复制\" class=\"clean-btn\"><span class=\"copyButtonIcons_eSgA\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" class=\"copyButtonIcon_y97N\"><path fill=\"currentColor\" d=\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\"></path></svg><svg viewBox=\"0 0 24 24\" class=\"copyButtonSuccessIcon_LjdS\"><path fill=\"currentColor\" d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\"></path></svg></span></button></div></div></div><p>其中，{limit_value}为期望的最大打开文件数，如：</p><div class=\"language-shell codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-color:#393A34;--prism-background-color:#f6f8fa\"><div class=\"codeBlockContent_biex\"><pre tabindex=\"0\" class=\"prism-code language-shell codeBlock_bY9V thin-scrollbar\"><code class=\"codeBlockLines_e6Vv\"><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token builtin class-name\">ulimit</span><span class=\"token plain\"> -n </span><span class=\"token number\" style=\"color:#36acaa\">1000000</span><br></span></code></pre><div class=\"buttonGroup__atx\"><button type=\"button\" aria-label=\"复制代码到剪贴板\" title=\"复制\" class=\"clean-btn\"><span class=\"copyButtonIcons_eSgA\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" class=\"copyButtonIcon_y97N\"><path fill=\"currentColor\" d=\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\"></path></svg><svg viewBox=\"0 0 24 24\" class=\"copyButtonSuccessIcon_LjdS\"><path fill=\"currentColor\" d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\"></path></svg></span></button></div></div></div><p>以上将最大打开文件数改为100万，实际大部分应用的需求远远少于这个值，如，转发在10万连接以下的，可以改为10万。\n下同，示例中的100万可改为实际需要的值。</p><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"永久修改最大打开文件数\">永久修改最大打开文件数<a href=\"#永久修改最大打开文件数\" class=\"hash-link\" aria-label=\"永久修改最大打开文件数的直接链接\" title=\"永久修改最大打开文件数的直接链接\">​</a></h3><p>修改 /etc/security/limits.conf 文件，添加或修改以下行：</p><div class=\"codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-color:#393A34;--prism-background-color:#f6f8fa\"><div class=\"codeBlockContent_biex\"><pre tabindex=\"0\" class=\"prism-code language-text codeBlock_bY9V thin-scrollbar\"><code class=\"codeBlockLines_e6Vv\"><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token plain\">{user} hard nofile {limit_value}</span><br></span><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token plain\">{user} soft nofile {limit_value}</span><br></span></code></pre><div class=\"buttonGroup__atx\"><button type=\"button\" aria-label=\"复制代码到剪贴板\" title=\"复制\" class=\"clean-btn\"><span class=\"copyButtonIcons_eSgA\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" class=\"copyButtonIcon_y97N\"><path fill=\"currentColor\" d=\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\"></path></svg><svg viewBox=\"0 0 24 24\" class=\"copyButtonSuccessIcon_LjdS\"><path fill=\"currentColor\" d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\"></path></svg></span></button></div></div></div><p>其中，{user}为执行转发服务的用户的用户名或用户组(group)，{limit_value}为期望的最大打开文件数，如：</p><div class=\"codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-color:#393A34;--prism-background-color:#f6f8fa\"><div class=\"codeBlockContent_biex\"><pre tabindex=\"0\" class=\"prism-code language-text codeBlock_bY9V thin-scrollbar\"><code class=\"codeBlockLines_e6Vv\"><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token plain\">relay hard nofile 1000000</span><br></span><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token plain\">relay soft nofile 1000000</span><br></span></code></pre><div class=\"buttonGroup__atx\"><button type=\"button\" aria-label=\"复制代码到剪贴板\" title=\"复制\" class=\"clean-btn\"><span class=\"copyButtonIcons_eSgA\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" class=\"copyButtonIcon_y97N\"><path fill=\"currentColor\" d=\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\"></path></svg><svg viewBox=\"0 0 24 24\" class=\"copyButtonSuccessIcon_LjdS\"><path fill=\"currentColor\" d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\"></path></svg></span></button></div></div></div><p>用 <code>*</code> 号可以设置所有的用户，如：</p><div class=\"codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-color:#393A34;--prism-background-color:#f6f8fa\"><div class=\"codeBlockContent_biex\"><pre tabindex=\"0\" class=\"prism-code language-text codeBlock_bY9V thin-scrollbar\"><code class=\"codeBlockLines_e6Vv\"><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token plain\">* hard nofile 1000000</span><br></span><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token plain\">* soft nofile 1000000</span><br></span></code></pre><div class=\"buttonGroup__atx\"><button type=\"button\" aria-label=\"复制代码到剪贴板\" title=\"复制\" class=\"clean-btn\"><span class=\"copyButtonIcons_eSgA\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" class=\"copyButtonIcon_y97N\"><path fill=\"currentColor\" d=\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\"></path></svg><svg viewBox=\"0 0 24 24\" class=\"copyButtonSuccessIcon_LjdS\"><path fill=\"currentColor\" d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\"></path></svg></span></button></div></div></div><p>修改 <code>limits.conf</code> 文件后需要重启服务器方才生效，可用<code>ulimit -n</code>命令先应用到当前系统中。</p><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"部分发行版-limitsconf-无效\">部分发行版 limits.conf 无效<a href=\"#部分发行版-limitsconf-无效\" class=\"hash-link\" aria-label=\"部分发行版 limits.conf 无效的直接链接\" title=\"部分发行版 limits.conf 无效的直接链接\">​</a></h3><p>部分发行版在执行 <code>ulimit -n 1000000</code>时，会返回以下错误提示：</p><div class=\"codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-color:#393A34;--prism-background-color:#f6f8fa\"><div class=\"codeBlockContent_biex\"><pre tabindex=\"0\" class=\"prism-code language-text codeBlock_bY9V thin-scrollbar\"><code class=\"codeBlockLines_e6Vv\"><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token plain\">ulimit: open files: cannot modify limit: Operation not permitted</span><br></span></code></pre><div class=\"buttonGroup__atx\"><button type=\"button\" aria-label=\"复制代码到剪贴板\" title=\"复制\" class=\"clean-btn\"><span class=\"copyButtonIcons_eSgA\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" class=\"copyButtonIcon_y97N\"><path fill=\"currentColor\" d=\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\"></path></svg><svg viewBox=\"0 0 24 24\" class=\"copyButtonSuccessIcon_LjdS\"><path fill=\"currentColor\" d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\"></path></svg></span></button></div></div></div><p>又或者重启后， limits.conf 配置的值无效，这时，可能要修改以下两个文件：</p><ul><li><code>/etc/systemd/system.conf</code></li><li><code>/etc/systemd/user.conf</code></li></ul><p>修改这两个文件的 <code>DefaultLimitNOFILE</code> 值，格式为：{soft_nofile}:{hard_nofile}，如改成：</p><div class=\"codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-color:#393A34;--prism-background-color:#f6f8fa\"><div class=\"codeBlockContent_biex\"><pre tabindex=\"0\" class=\"prism-code language-text codeBlock_bY9V thin-scrollbar\"><code class=\"codeBlockLines_e6Vv\"><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token plain\">DefaultLimitNOFILE=1000000:1000000</span><br></span></code></pre><div class=\"buttonGroup__atx\"><button type=\"button\" aria-label=\"复制代码到剪贴板\" title=\"复制\" class=\"clean-btn\"><span class=\"copyButtonIcons_eSgA\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" class=\"copyButtonIcon_y97N\"><path fill=\"currentColor\" d=\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\"></path></svg><svg viewBox=\"0 0 24 24\" class=\"copyButtonSuccessIcon_LjdS\"><path fill=\"currentColor\" d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\"></path></svg></span></button></div></div></div><p>这两个文件修改后，重启服务器。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"ip端口规划\">IP、端口规划<a href=\"#ip端口规划\" class=\"hash-link\" aria-label=\"IP、端口规划的直接链接\" title=\"IP、端口规划的直接链接\">​</a></h2><p>由于 <code>可用的端口数 = 规划的IP数 * 规划的端口数</code>。所以，要增加可用的端口数，一方面要增加IP，另一方面要指定尽可能多的端口归转发服务管理使用。 </p><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"增加ip\">增加IP<a href=\"#增加ip\" class=\"hash-link\" aria-label=\"增加IP的直接链接\" title=\"增加IP的直接链接\">​</a></h3><p>增加IP的方法每个发行版不太一样，具体请查阅相关文档。要提请注意的是：大量外发时，路由器防火墙等设备也要增加公网IP。</p><p>服务器增加了IP以后，在转发服务的连接设置中将这些IP填入\"IP地址\"栏上。</p><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"端口规划\">端口规划<a href=\"#端口规划\" class=\"hash-link\" aria-label=\"端口规划的直接链接\" title=\"端口规划的直接链接\">​</a></h3><p>Linux系统将TCP端口分为三个部分：</p><ul><li>系统端口，1-1023，这部分由系统应用或知名应用监听使用，使用这个范围的端口需要root权限或被授予了 CAP_NET_BIND_SERVICE 能力。</li><li>用户端口，1024及以上，在动态端口范围之外的端口，这部分由用户的其他应用监听使用。</li><li>动态端口，在整个端口范围的后部，如：32768-60999，没有绑定端口的外出连接或监听使用这个范围的端口。</li></ul><p>以下是部分Linux发行版的默认端口划分：</p><p><img loading=\"lazy\" alt=\"System Port Ranges\" src=\"/assets/images/sys-port-ranges-1628a19580bf62a93f40aa7889eaa940.png\" width=\"305\" height=\"438\" class=\"img_ev3q\"></p><p>假设我们要将接入端口安排在10000以下，将10000-59999共5万个端口划为转发服务管理，为动态端口留下5536个端口:</p><p><img loading=\"lazy\" alt=\"Custom Port Ranges\" src=\"/assets/images/custom-port-ranges-1905c7bd4bf509b0237d1483dd644e8b.png\" width=\"399\" height=\"438\" class=\"img_ev3q\"></p><p>经过这样的端口规划，又假如服务器共分配了5个IP，那么转发服务就可以管理和使用：5 * 50000 = 250000 个端口了。这个端口数量，在Linux系统中，可以\n支持每秒发生4100多个连接的发起和关闭(由于接入端连入和连接关闭引起)。</p><p>规划好后，一方面要通过 系统参数 <code>net.ipv4.ip_local_port_range</code> 来设置动态端口范围（上例是60000-65535，设置方法见后文），另一方面，\n在转发服务的连接设置中要将10000-59999的端口范围填入\"本地端口范围\"中（填入值为 10000,50000）。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"tcp参数调优\">TCP参数调优<a href=\"#tcp参数调优\" class=\"hash-link\" aria-label=\"TCP参数调优的直接链接\" title=\"TCP参数调优的直接链接\">​</a></h2><p>Linux内核定义了很多TCP相关的参数变量，通过修改这些变量，可以调整TCP栈的行为。</p><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"查看tcp参数的方法\">查看TCP参数的方法<a href=\"#查看tcp参数的方法\" class=\"hash-link\" aria-label=\"查看TCP参数的方法的直接链接\" title=\"查看TCP参数的方法的直接链接\">​</a></h3><p>查看时，将要查看的变量名转换成<code>/proc/sys/</code>下的目录和文件，然后用 <code>cat</code> 命令进行查看。\n如：<code>ip_local_port_range</code>的变量名为 <code>net.ipv4.ip_local_port_range</code>，\n对应的系统目录为：<code>/proc/sys/net/ipv4/ip_local_port_range</code>，查看命令为：</p><div class=\"language-shell codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-color:#393A34;--prism-background-color:#f6f8fa\"><div class=\"codeBlockContent_biex\"><pre tabindex=\"0\" class=\"prism-code language-shell codeBlock_bY9V thin-scrollbar\"><code class=\"codeBlockLines_e6Vv\"><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token function\" style=\"color:#d73a49\">cat</span><span class=\"token plain\"> /proc/sys/net/ipv4/ip_local_port_range</span><br></span></code></pre><div class=\"buttonGroup__atx\"><button type=\"button\" aria-label=\"复制代码到剪贴板\" title=\"复制\" class=\"clean-btn\"><span class=\"copyButtonIcons_eSgA\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" class=\"copyButtonIcon_y97N\"><path fill=\"currentColor\" d=\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\"></path></svg><svg viewBox=\"0 0 24 24\" class=\"copyButtonSuccessIcon_LjdS\"><path fill=\"currentColor\" d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\"></path></svg></span></button></div></div></div><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"修改tcp参数的方法\">修改TCP参数的方法<a href=\"#修改tcp参数的方法\" class=\"hash-link\" aria-label=\"修改TCP参数的方法的直接链接\" title=\"修改TCP参数的方法的直接链接\">​</a></h3><p>修改这些参数时，通过修改 <code>/etc/sysctl.conf</code> 文件中对应的项进行修改。如果没有这个项，添加到文件尾部即可。\n该文件格式为键值对格式，注释行以 <code>#</code> 符号开头。</p><p>如设置参数 <code>net.ipv4.ip_local_port_range</code> 为  60000 至 65535，修改或追加以下行，</p><div class=\"codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-color:#393A34;--prism-background-color:#f6f8fa\"><div class=\"codeBlockContent_biex\"><pre tabindex=\"0\" class=\"prism-code language-text codeBlock_bY9V thin-scrollbar\"><code class=\"codeBlockLines_e6Vv\"><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token plain\">ip_local_port_range=60000 65535</span><br></span></code></pre><div class=\"buttonGroup__atx\"><button type=\"button\" aria-label=\"复制代码到剪贴板\" title=\"复制\" class=\"clean-btn\"><span class=\"copyButtonIcons_eSgA\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" class=\"copyButtonIcon_y97N\"><path fill=\"currentColor\" d=\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\"></path></svg><svg viewBox=\"0 0 24 24\" class=\"copyButtonSuccessIcon_LjdS\"><path fill=\"currentColor\" d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\"></path></svg></span></button></div></div></div><p>所有修改完成后，执行以下命令使修改（对后续连接）生效：</p><div class=\"language-shell codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-color:#393A34;--prism-background-color:#f6f8fa\"><div class=\"codeBlockContent_biex\"><pre tabindex=\"0\" class=\"prism-code language-shell codeBlock_bY9V thin-scrollbar\"><code class=\"codeBlockLines_e6Vv\"><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token function\" style=\"color:#d73a49\">sudo</span><span class=\"token plain\"> sysctl -p</span><br></span></code></pre><div class=\"buttonGroup__atx\"><button type=\"button\" aria-label=\"复制代码到剪贴板\" title=\"复制\" class=\"clean-btn\"><span class=\"copyButtonIcons_eSgA\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" class=\"copyButtonIcon_y97N\"><path fill=\"currentColor\" d=\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\"></path></svg><svg viewBox=\"0 0 24 24\" class=\"copyButtonSuccessIcon_LjdS\"><path fill=\"currentColor\" d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\"></path></svg></span></button></div></div></div><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"参数-netipv4ip_local_port_range\">参数 net.ipv4.ip_local_port_range<a href=\"#参数-netipv4ip_local_port_range\" class=\"hash-link\" aria-label=\"参数 net.ipv4.ip_local_port_range的直接链接\" title=\"参数 net.ipv4.ip_local_port_range的直接链接\">​</a></h3><p>该参数定义了动态端口的范围，由两个数值组成，第一个数值为最小端口号，第二个数值为最大端口号。\n对于专用的转发服务器而言，服务器中不部署其他高网络负载的服务，动态端口需求很小，可以设置一个较小的范围，如分配5536个端口给动态端口。</p><div class=\"codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-color:#393A34;--prism-background-color:#f6f8fa\"><div class=\"codeBlockContent_biex\"><pre tabindex=\"0\" class=\"prism-code language-text codeBlock_bY9V thin-scrollbar\"><code class=\"codeBlockLines_e6Vv\"><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token plain\">ip_local_port_range=60000 65535</span><br></span></code></pre><div class=\"buttonGroup__atx\"><button type=\"button\" aria-label=\"复制代码到剪贴板\" title=\"复制\" class=\"clean-btn\"><span class=\"copyButtonIcons_eSgA\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" class=\"copyButtonIcon_y97N\"><path fill=\"currentColor\" d=\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\"></path></svg><svg viewBox=\"0 0 24 24\" class=\"copyButtonSuccessIcon_LjdS\"><path fill=\"currentColor\" d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\"></path></svg></span></button></div></div></div><p>而让转发服务使用更大范围的端口。</p><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"参数-netipv4tcp_max_syn_backlog-netcoresomaxconn\">参数 net.ipv4.tcp_max_syn_backlog, net.core.somaxconn<a href=\"#参数-netipv4tcp_max_syn_backlog-netcoresomaxconn\" class=\"hash-link\" aria-label=\"参数 net.ipv4.tcp_max_syn_backlog, net.core.somaxconn的直接链接\" title=\"参数 net.ipv4.tcp_max_syn_backlog, net.core.somaxconn的直接链接\">​</a></h3><p>在Linux kernel v2.2之后，作为服务端未完成的连接的连接队列长度为 <code>tcp_max_syn_backlog</code>，已经完成但未被应用层accept的队列长度为<code>somaxconn</code>。</p><p>在不同发行版中，该两选项默认值不同，适当提高可使服务器更好地应对爆发性进站连接请求，如将<code>tcp_max_syn_backlog</code>设为1500，将<code>somaxconn</code>设为4096。</p><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"参数-netipv4tcp_keepalive_time-netipv4tcp_keepalive_probes-netipv4tcp_keepalive_intvl\">参数 net.ipv4.tcp_keepalive_time, net.ipv4.tcp_keepalive_probes, net.ipv4.tcp_keepalive_intvl<a href=\"#参数-netipv4tcp_keepalive_time-netipv4tcp_keepalive_probes-netipv4tcp_keepalive_intvl\" class=\"hash-link\" aria-label=\"参数 net.ipv4.tcp_keepalive_time, net.ipv4.tcp_keepalive_probes, net.ipv4.tcp_keepalive_intvl的直接链接\" title=\"参数 net.ipv4.tcp_keepalive_time, net.ipv4.tcp_keepalive_probes, net.ipv4.tcp_keepalive_intvl的直接链接\">​</a></h3><p>这三个参数控制TCP的keepalive处理。TCP栈通过发送空的数据包，并根据是否收到应答来确认连接是否仍然保持。\nkeepalive另外的一个作用是一定程度上防止连接由于无来往数据包而断开。</p><p>如果转发服务的后端服务在应用层上没有在线检测机制，则可以利用TCP的keepalive来检测连接是否保持。\n此时，在设置接入端时，可勾选 <code>连接保持检测(keepalive)</code> 选项。</p><p>然后，可以通过调整系统的这三个TCP参数来缩短检测的周期：</p><ul><li><code>tcp_keepalive_time</code>: 从连接空闲到触发keepalive检测的时长，单位：秒。</li><li><code>tcp_keepalive_probes</code>: 如果一直没收到应答，在认为连接已经断开前，发出的keepalive包的次数。</li><li><code>tcp_keepalive_intvl</code>: 重发keepalive包的时间间隔，单位：秒。</li></ul><p>如将 <code>tcp_keepalive_time</code> 设置为 10 分钟，次数设为 5 次，间隔为 2秒：</p><div class=\"codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-color:#393A34;--prism-background-color:#f6f8fa\"><div class=\"codeBlockContent_biex\"><pre tabindex=\"0\" class=\"prism-code language-text codeBlock_bY9V thin-scrollbar\"><code class=\"codeBlockLines_e6Vv\"><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token plain\">tcp_keepalive_time=600</span><br></span><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token plain\">tcp_keepalive_probes=5</span><br></span><span class=\"token-line\" style=\"color:#393A34\"><span class=\"token plain\">tcp_keepalive_intvl=2</span><br></span></code></pre><div class=\"buttonGroup__atx\"><button type=\"button\" aria-label=\"复制代码到剪贴板\" title=\"复制\" class=\"clean-btn\"><span class=\"copyButtonIcons_eSgA\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" class=\"copyButtonIcon_y97N\"><path fill=\"currentColor\" d=\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\"></path></svg><svg viewBox=\"0 0 24 24\" class=\"copyButtonSuccessIcon_LjdS\"><path fill=\"currentColor\" d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\"></path></svg></span></button></div></div></div><p>如果连入的是终端设备，则应考虑终端设备的最大上报数据周期。<code>tcp_keepalive_time</code>应该设置为这个上报数据周期的两倍再加一秒或两秒。</p><h3 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"参数-netipv4tcp_orphan_retries-netipv4tcp_fin_timeout\">参数 net.ipv4.tcp_orphan_retries, net.ipv4.tcp_fin_timeout<a href=\"#参数-netipv4tcp_orphan_retries-netipv4tcp_fin_timeout\" class=\"hash-link\" aria-label=\"参数 net.ipv4.tcp_orphan_retries, net.ipv4.tcp_fin_timeout的直接链接\" title=\"参数 net.ipv4.tcp_orphan_retries, net.ipv4.tcp_fin_timeout的直接链接\">​</a></h3><p>这两个是次要参数。如果转发服务主动关闭前端或后端连接，此时连接进入FIN-WAIT-1状态，等待对方的ACK包。\n如果由于对方已经关闭或已经退出，不能发回ACK包，则TCP栈将尝试 <code>tcp_orphan-retries</code> 次的链路检测。\n这个链路检测的间隔采用指数补偿算法(exponential backoff)递增。\n注意，当我们查看到<code>tcp_orphan-retries</code>为0时，它实际是8。</p><p>连接在FIN-WAIT-1状态时，一旦收到ACK，则连接进入FIN-WAIT-2状态，等待对方发来FIN。\n如果等待对方发来FIN的时间超过 <code>tcp_fin_timeout</code>，则TCP栈关闭连接，从而释放端口。一般情况下，\n如果前端的连接真的已经断开或前端的设备停止响应，TCP会在 <code>tcp_fin_timeout</code> 的时间后正式关闭连接，从而释放端口。</p><p>适当减少 <code>tcp_fin_timeout</code> 可加快这种情况下的端口回收。这个值默认是60秒。\n使用转发服务管理端口时，这个参数不能大于60秒。减少这个值会使转发服务在使用动态端口时，加快系统对动态端口的回收。</p>",
            "url": "https://lucendar.com/blog/2023/06/29/relay-sys-tuning",
            "title": "转发服务的设置和 Linux 系统参数调优",
            "summary": "通过扩大端口范围、调整 nofile 与 TCP 参数，解决 Relay 大量外发时的端口耗尽问题。",
            "date_modified": "2023-06-29T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "tutorial",
                "relay"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2022/08/03/g-1.1.8-s-3.3.6",
            "content_html": "<p>Micro-GNSS v1.1.8 添加 PostgreSQL 支持；Streaming v3.3.6 修正 HLS 在 iOS 上的播放问题。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"micro-gnss-v118\">Micro-GNSS v1.1.8<a href=\"#micro-gnss-v118\" class=\"hash-link\" aria-label=\"Micro-GNSS v1.1.8的直接链接\" title=\"Micro-GNSS v1.1.8的直接链接\">​</a></h2><ul><li>添加 PostgreSQL 数据库支持</li></ul><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"streaming-v336\">Streaming v3.3.6<a href=\"#streaming-v336\" class=\"hash-link\" aria-label=\"Streaming v3.3.6的直接链接\" title=\"Streaming v3.3.6的直接链接\">​</a></h2><ul><li>修正 HLS 在 iOS 设备上播放的问题</li><li>HLS 推流性能轻微提升</li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2022/08/03/g-1.1.8-s-3.3.6",
            "title": "Micro-GNSS v1.1.8、Streaming v3.3.6 发布",
            "summary": "Micro-GNSS 添加 PostgreSQL 支持；Streaming 修正 iOS HLS 播放并轻微提升推流性能。",
            "date_modified": "2022-08-03T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "micro-gnss",
                "v3"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2022/05/19/g-1.1.7-s-3.3.5",
            "content_html": "<p>Micro-GNSS v1.1.7 主动安全附件服务增加湘标支持；Streaming v3.3.5 修正一处内存泄露。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"micro-gnss-v117\">Micro-GNSS v1.1.7<a href=\"#micro-gnss-v117\" class=\"hash-link\" aria-label=\"Micro-GNSS v1.1.7的直接链接\" title=\"Micro-GNSS v1.1.7的直接链接\">​</a></h2><ul><li>主动安全附件服务增加湘标支持</li></ul><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"streaming-v335\">Streaming v3.3.5<a href=\"#streaming-v335\" class=\"hash-link\" aria-label=\"Streaming v3.3.5的直接链接\" title=\"Streaming v3.3.5的直接链接\">​</a></h2><ul><li>修正一处内存泄露</li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2022/05/19/g-1.1.7-s-3.3.5",
            "title": "Micro-GNSS v1.1.7、Streaming v3.3.5 发布",
            "summary": "Micro-GNSS 主动安全附件增加湘标支持；Streaming 修正一处内存泄露。",
            "date_modified": "2022-05-19T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "micro-gnss",
                "v3"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2022/05/12/s-3.4.0",
            "content_html": "<p>从 3.4.0 起，Micro-GNSS 与 Streaming 采用相同版本号一起发布。流媒体流水线重构，并增加 PostgreSQL、RTSP 源与内置 FTP 支持。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"micro-gnss\">Micro-GNSS<a href=\"#micro-gnss\" class=\"hash-link\" aria-label=\"Micro-GNSS的直接链接\" title=\"Micro-GNSS的直接链接\">​</a></h2><ul><li>采用新版 <code>strm-sdk</code> 包</li><li>主动安全附件采用直接磁盘写入，不再缓存，以减少内存占用</li><li>添加 PostgreSQL 数据库支持</li></ul><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"streaming\">Streaming<a href=\"#streaming\" class=\"hash-link\" aria-label=\"Streaming的直接链接\" title=\"Streaming的直接链接\">​</a></h2><ul><li>流媒体处理流水线重构，性能有较大提升，使用更少系统资源，响应更敏捷</li><li>可启用内置 FTP 服务，以对远程录像上传提供支持</li><li>增加 RTSP 源的播放支持（实时）</li><li>添加 PostgreSQL 数据库支持</li><li>API 文档发布</li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2022/05/12/s-3.4.0",
            "title": "GT-Streaming v3.4.0 发布",
            "summary": "Micro-GNSS 与 Streaming 从此使用相同版本号；流水线重构并支持 PostgreSQL、RTSP 源与内置 FTP。",
            "date_modified": "2022-05-12T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "micro-gnss",
                "v3"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2022/05/01/relay-1.0.0",
            "content_html": "<p><code>Relay</code> 是一个简单而高效的基于 TCP 的通用数据转发程序，可用于将 GPS/GNSS 终端数据转发，或其他有数据转发需求的场合。</p><p>最新版本、功能说明与下载见 <a href=\"/relay/relay\">Relay 通用数据转发服务</a>。高并发外发时的系统调优见 <a href=\"/blog/2023/06/29/relay-sys-tuning\">转发服务的设置和 Linux 系统参数调优</a>。</p>",
            "url": "https://lucendar.com/blog/2022/05/01/relay-1.0.0",
            "title": "Relay 通用数据转发程序发布",
            "summary": "Relay 是基于 TCP 的通用数据转发服务，可用于 GNSS 终端数据转发等场景。",
            "date_modified": "2022-05-01T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "relay"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2022/01/02/g-1.1.6-s-3.3.4",
            "content_html": "<p>双方升级 log4j；Streaming 增加 AAC 解码支持，缩短对讲音频处理路径，并修正 ADPCM 解码内存泄露。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"micro-gnss-v116\">Micro-GNSS v1.1.6<a href=\"#micro-gnss-v116\" class=\"hash-link\" aria-label=\"Micro-GNSS v1.1.6的直接链接\" title=\"Micro-GNSS v1.1.6的直接链接\">​</a></h2><ul><li><code>log4j</code> 模块升级到 <code>1.17.1</code> 版本</li></ul><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"streaming-v334\">Streaming v3.3.4<a href=\"#streaming-v334\" class=\"hash-link\" aria-label=\"Streaming v3.3.4的直接链接\" title=\"Streaming v3.3.4的直接链接\">​</a></h2><ul><li>添加 <code>AAC</code> 音频的解码支持</li><li>缩短接收到的对讲音频的处理路径，降低音频处理延时</li><li>修正 ADPCM 解码过程中的一个内存泄露问题</li><li><code>log4j</code> 模块升级到 <code>1.17.1</code> 版本</li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2022/01/02/g-1.1.6-s-3.3.4",
            "title": "Micro-GNSS v1.1.6、Streaming v3.3.4 发布",
            "summary": "升级 log4j；Streaming 增加 AAC 解码、降低对讲延时，并修正 ADPCM 内存泄露。",
            "date_modified": "2022-01-02T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "micro-gnss",
                "v3"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2021/12/22/g-1.1.5-s-3.3.3",
            "content_html": "<p>双方 API 添加 HTTPS 支持并升级 log4j；Micro-GNSS 修正部分配置未设置时的空指针异常。</p><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"micro-gnss-v115\">Micro-GNSS v1.1.5<a href=\"#micro-gnss-v115\" class=\"hash-link\" aria-label=\"Micro-GNSS v1.1.5的直接链接\" title=\"Micro-GNSS v1.1.5的直接链接\">​</a></h2><ul><li>API 添加 HTTPS 支持</li><li>修正 <code>alm-att-root-config</code> 配置文件的 <code>cleanup</code> 和 <code>quota</code> 属性未设置时引起 <code>NullPointerException</code> 的问题</li><li>修正 <code>file-stg-config</code> 配置文件的 <code>avUploadCleanup</code> 和 <code>avUploadQuota</code> 属性未设置时引起 <code>NullPointerException</code> 的问题</li><li><code>log4j</code> 模块升级到 <code>1.17.0</code> 版本</li></ul><h2 class=\"anchor anchorWithStickyNavbar_LWe7\" id=\"streaming-v333\">Streaming v3.3.3<a href=\"#streaming-v333\" class=\"hash-link\" aria-label=\"Streaming v3.3.3的直接链接\" title=\"Streaming v3.3.3的直接链接\">​</a></h2><ul><li>API 添加 HTTPS 支持</li><li><code>log4j</code> 模块升级到 <code>1.17.0</code> 版本</li></ul><p>完整版本记录见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2021/12/22/g-1.1.5-s-3.3.3",
            "title": "Micro-GNSS v1.1.5、Streaming v3.3.3 发布",
            "summary": "API 增加 HTTPS 支持，升级 log4j，并修正部分配置缺省引起的空指针。",
            "date_modified": "2021-12-22T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "release",
                "streaming",
                "micro-gnss",
                "v3"
            ]
        },
        {
            "id": "https://lucendar.com/blog/2021/12/20/welcome",
            "content_html": "<p>经过一段时间的准备，站点终于发布。本站点主要介绍 <code>GT-Streaming</code> 流媒体平台方案，后续将陆续发布其它软件产品和技术文章。</p><p>欢迎对产品或站点提出建议。版本变更见 <a href=\"/docs/changelog\">版本记录</a>。</p>",
            "url": "https://lucendar.com/blog/2021/12/20/welcome",
            "title": "站点发布",
            "summary": "GT-Streaming 文档站点上线，后续将发布产品说明与技术文章。",
            "date_modified": "2021-12-20T00:00:00.000Z",
            "author": {
                "name": "KKY",
                "url": "https://github.com/kwankin-yau"
            },
            "tags": [
                "announcement"
            ]
        }
    ]
}