Trae Proxy banner
DASungta DASungta

Trae Proxy

Development community

Description

爆锤Trae不支持自定义模型接入。通过Trae Proxy,可以支持在trae中接入并切换任意上游中转服务、不在服务列表中的coding plan等等。不影响codex、claude code正常使用。Trae proxy and switch

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Trae Proxy

Trae现在已经支持自定义url地址接入。这个项目已经没太大意义了,仅用作研究。

让 Trae 接入任意 Anthropic 或 OpenAI 兼容的自定义模型端点。

**特点:**

  • 单二进制,零依赖,跨平台,一键启动
  • 无需 sudo:macOS 通过原生授权对话框完成系统操作,无权限污染
  • 交互式向导支持方向键导航、搜索过滤,初始化体验大幅提升

**支持的上游类型:**

  • 各类中转站(sub2api、one-api、new-api 等)
  • 支持 Anthropic Messages API / OpenAI Completions API 的云服务(讯飞星火、京东云、无问心穹、移动云等)
  • 自建反代、中转(Antigravity 等)

**从旧版本升级?** 查看 [v0.4.0 升级指南 →](docs/upgrade-v0.4.0.md)

**想看旧版本文档?** [旧版 README (v0.3.x) →](docs/README-v0.3.md)


快速开始

macOS / Linux 用户?[1 分钟快速开始 →](docs/quick-start.md)

Windows 用户?[2 分钟快速开始 →](docs/win-quick-start.md)

新版本已经解除限制!~~**注意:一定要在 trae-proxy 没有 start 的时候,在 Trae 添加模型、编辑模型,否则会一直提示错误的模型名称!**~~


安装

macOS / Linux(一键安装)

curl -fsSL https://raw.githubusercontent.com/DASungta/trae-proxy/main/install.sh | sudo bash

v0.4.0 起不再需要 `sudo` 安装脚本。安装后,`init` 步骤会在需要时弹出系统授权对话框。

macOS 注意事项
  • 支持 Apple Silicon(M 系列)和 Intel,脚本自动检测架构
  • init 时 CA 证书和 hosts 修改通过 macOS 原生授权对话框获取权限,不需要 sudo
  • 如果对话框未弹出,确认二进制路径不在受限目录(如 Downloads)
Linux 注意事项
  • 目前支持 x86_64(amd64)架构
  • Linux 平台 CA 安装和 hosts 修改仍需 sudo
  • RHEL/CentOS 无 update-ca-certificates:手动将 ~/.config/trae-proxy/ca/root-ca.pem 复制到 /etc/pki/ca-trust/source/anchors/ 并执行 update-ca-trust

Windwos (一键安装)

在管理员权限的 PowerShell 中运行:

irm https://raw.githubusercontent.com/DASungta/trae-proxy/main/install.ps1 | iex

Windows(手动安装)

  1. Releases 页面下载 trae-proxy-windows-amd64.exe
  2. 重命名为 trae-proxy.exe,放到任意目录(如 C:\tools\
  3. 将该目录添加到系统 PATH 环境变量

所有命令需在**管理员身份的 PowerShell** 中运行(右键 → 以管理员身份运行)。

Windows 注意事项
  • init 时 CA 证书通过 certutil -addstore -f "ROOT" 安装,系统会弹出安全警告,选"是"确认
  • Windows Defender 首次运行时可能弹出防火墙提示,需允许 trae-proxy 监听网络
  • 不支持 osascript 授权对话框,CA 安装仍需管理员权限
从源码编译(需要 Go 1.21+)
g