Skip to content

OCM 服务不可用 #4088

@KKKZOZ

Description

@KKKZOZ

操作系统

Linux

系统版本

PRETTY_NAME="Ubuntu 22.04.4 LTS"

安装类型

sing-box 原始命令行程序

如果您使用图形客户端程序,请提供该程序版本。

No response

版本

sing-box version 1.13.11

Environment: go1.26.2 linux/amd64
Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale,with_ccm,with_ocm,with_naive_outbound,badlinkname,tfogo_checklinkname0
CGO: enabled

描述

OCM 功能不可用

重现方式

  • config.json
{
  "log": {
    "level": "debug",
    "timestamp": true
  },
  "outbounds": [
    {
      "type": "http",
      "tag": "http-proxy-out",
      "server": "xxx",
      "server_port": 20172
    },
    {
      "type": "direct",
      "tag": "direct-out"
    }
  ],
  "services": [
    {
      "type": "ocm",
      "listen": "0.0.0.0",
      "listen_port": 9091,
      "credential_path": "/home/xxx/.codex/auth.json",
      "usages_path": "./codex-usages.json",
      "detour": "http-proxy-out"
    }
  ]
}
  • config.toml
[model_providers.ocm]
name = "OCM Proxy"
base_url = "http://127.0.0.1:9091/v1"
supports_websockets = true

[profiles.ocm]
model_provider = "ocm"

日志

+0800 2026-04-27 20:31:09 INFO network: updated default interface eno2np1, index 3
+0800 2026-04-27 20:31:09 INFO service/ocm[0]: tcp server started at 0.0.0.0:9091
+0800 2026-04-27 20:31:09 INFO sing-box started (0.00s)

支持我们

完整性要求

  • 我保证阅读了文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
  • 我保证提供了可以在本地重现该问题的服务器、客户端配置文件与流程,而不是一个脱敏的复杂客户端配置文件。
  • 我保证提供了可用于重现我报告的错误的最简配置,而不是依赖远程服务器、TUN、图形界面客户端或者其他闭源软件。
  • 我保证提供了完整的配置文件与日志,而不是出于对自身智力的自信而仅提供了部分认为有用的部分。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions