AstrLink

Calcium-IonApache-2.0活跃维护

本地 AI 网关,把各家订阅和 API 服务商统一到一个入口,靠智能路由分发请求,并在设备端做隐私保护。

A local AI gateway for AI agents, unifying your subscriptions and API providers with smart routing and on-device privacy protection.

v0.2.21发布于 2026-11-04 08:04 UTC548star +8 / 7 天54fork同步于 2026-11-10 17:58 UTC

怎么上手

由 README 提炼,执行前请确认
从源码运行请参考 CONTRIBUTING.md 的开发与构建说明;也可登录 GitHub 后从 Actions 成功构建中下载开发版产物
硬件要求按 README 说明

桌面应用,支持 macOS(Apple Silicon/Intel,macOS 13.4+)、Windows x64、Linux x64(Debian 12 或兼容更新版本)。本地隐私模型需单独下载或导入,模型权重不随应用打包。README 未说明显存要求。

支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

本地 AI 网关,统一订阅与 API 并在请求上行前本地检测脱敏敏感内容

本地 AI 网关,把各家订阅和 API 服务商统一到一个入口,靠智能路由分发请求,并在设备端做隐私保护。

核心能力

  • 用本地规则或本地隐私模型检测密钥、邮箱、电话等敏感内容
  • 按策略对敏感内容告警、拦截或替换为占位符
  • 可在本地把响应中的占位符还原为原始值
  • 集中接入 Codex、Claude、Grok 订阅与主流 API 供应商
  • 支持模型重定向、供应商优先级、重试与故障转移

容易踩的坑

暂无官方安装包,处于早期开发阶段,Actions 构建可能未签名或未公证;本地隐私模型需单独下载或导入,否则无法使用模型检测;默认地址为 http://127.0.0.1:8317,端口被占用时会变化,应以应用内显示为准;供应商模型列表为空时不会处理推理请求;Windows 安装时可能需要下载 WebView2

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.2.21
  1. v0.2.21最新正式版2026-11-04 · 2026-11-04 08:04 UTC

    AstrLink v0.2.21

    [!IMPORTANT] 一个对话框就能把令牌配置到 30 个客户端。

    Set up 30 clients with a token from one dialog.

    中文

    新功能

    • 客户端配置改为一个对话框,勾选客户端即可写入或移除,写入前可查看改动
    • 支持直接写入 30 个客户端的配置,包括 Gemini CLI、OpenCode、OpenClaw、Qwen Code、Kimi Code、Droid、GitHub Copilot、Cline、Aider、Chatbox 等
    • 访问令牌列表显示使用该令牌的客户端
    • 请求记录可按客户端筛选
    • 套餐卡片显示每个额度窗口的重置时间
    • 新的 AstrLink 图标

    修复

    • macOS 小组件没有出现在小组件列表里
    • 星轨视图中不同厂商的模型颜色相近
    • 像素场景去掉站点文字,场景更高

    English

    Features

    • Client setup is one dialog: check clients to write or remove them, and review the changes first
    • Configs for 30 clients are written directly, including Gemini CLI, OpenCode, OpenClaw, Qwen Code, Kimi Code, Droid, GitHub Copilot, Cline, Aider, and Chatbox
    • Access tokens show which clients use them
    • Request records can be filtered by client
    • Package cards show when each quota window resets
    • A new AstrLink logo

    Fixes

    • The macOS widget did not appear in the widget gallery
    • Models from different vendors had similar colors in the star trail
    • Pixel scenes drop their station labels and get taller

    官网 / Website · Docker · v0.2.20...v0.2.21

    Full Changelog: https://github.com/Calcium-Ion/AstrLink/compare/v0.2.20...v0.2.21

  2. v0.2.202026-11-03 · 2026-11-03 06:05 UTC
    查看更新说明

    AstrLink v0.2.20

    [!IMPORTANT] Claude 订阅可以通过本机的 Claude Code 发送请求,新建的 Claude 账号默认使用这种方式。

    Claude subscriptions can send requests through your local Claude Code, the default for new Claude accounts.

    中文

    新功能

    • Claude 订阅可以通过本机的 Claude Code 发送请求
    • 提供商页改为套餐卡片,同一套餐的账号合并显示,可选先用哪个号
    • 订阅额度按 API 价格估算剩余金额
    • 可选择金额显示的货币
    • 对话详情新增「上下文」页,请求记录新增「记忆」页
    • 概览新增像素场景和星轨视图
    • 可从本机 Claude Code、Codex、Pi 的配置导入提供商
    • 新增 macOS 订阅额度小组件
    • 设置重新整理为四个标签页
    • 实时面板改为显示吞吐,没有请求时自动收起

    修复

    • 套餐额度读取失败时显示具体原因
    • DeepSeek Harness 走 Responses 入口时,子 Agent 没有归到父对话
    • Codex 套餐名带着已经过时的用量倍数
    • Windows 上导出请求记录丢失扩展名

    English

    Features

    • Claude subscriptions can send requests through your local Claude Code
    • Providers are shown as package cards; accounts on the same plan share one card, with a choice of which to use first
    • Subscription quota shows an estimated amount left at API prices
    • Choose the currency amounts are shown in
    • A Context tab in conversation details and a Memory view in request records
    • Pixel scenes and a star trail view on the overview
    • Import providers from local Claude Code, Codex, and Pi configs
    • A macOS subscription quota widget
    • Settings regrouped into four tabs
    • The live board shows throughput and hides when idle

    Fixes

    • Failed package quota reads now say why
    • DeepSeek Harness subagents on the Responses entry were not grouped under their parent
    • Codex plan names carried outdated usage multipliers
    • Request exports on Windows lost their file extension

    官网 / Website · Docker · v0.2.19...v0.2.20

    What's Changed

    Full Changelog: https://github.com/Calcium-Ion/AstrLink/compare/v0.2.19...v0.2.20

  3. v0.2.192026-10-26 · 2026-10-26 08:41 UTC
    查看更新说明

    AstrLink v0.2.19

    [!IMPORTANT] 内置隐私模型 AstrLink Guard 可以走 GPU:Windows 用 DirectML,Apple 芯片上用 Core ML(需 macOS 26)。可以接入 Google Vertex AI。

    The built-in privacy model AstrLink Guard can run on the GPU: DirectML on Windows, Core ML on Apple silicon (macOS 26 or later). Google Vertex AI can be added as a provider.

    中文

    • GPU 加速:AstrLink Guard 更新到 0.1.3,目录里可以选 FP16。Windows 用独立显卡加载,大约几秒。Apple 芯片、macOS 26 上用 Core ML,第一次约 15 到 25 秒编译。INT8 CPU 仍是推荐默认。装了 0.1.2 的会提示更新。
    • Vertex AI:用项目、区域和服务账号接入。支持 Gemini、Messages 和 Chat,可以拉模型列表。也能导入凭据,或用 Express 认证。
    • 默认隐私:新安装默认打开隐私保护,用正则只替换凭据,响应里还原。姓名、邮箱这类默认关着,需要时再开。已经保存过策略的保持原样。
    • 首次启动:不用先设原文口令就能加提供商。打开请求正文捕获时,仍会先设口令。
    • 原文解锁:屏幕锁定、休眠、切换用户或退出 AstrLink 时会重新锁定。已签名的 macOS 可以用 Touch ID 解锁。Agent 申请读原文时,每次都要当场确认。
    • 子 Agent:Claude Code、Codex、OpenCode 拉起的子对话会挂在父对话下面。删除父对话时,子对话一起删。
    • 其他:客户端用 gzip、br、zstd 压缩的请求体能正常处理。提供商测试可以中途取消。隐私模型的下载进度显示在模型卡片上。Responses 入口把图片转到 Chat 上游时,图片会按 Chat 格式发送。

    English

    • GPU acceleration: AstrLink Guard moves to 0.1.3, and the catalog offers an FP16 build. On Windows it loads onto the discrete GPU in a few seconds. On Apple silicon with macOS 26, Core ML compiles it the first time, about 15 to 25 seconds. INT8 on the CPU stays the recommended default. Installs of 0.1.2 are offered the update.
    • Vertex AI: Connect with a project, region, and service account. Gemini, Messages, and Chat are supported, and you can fetch the model list. You can also import credentials or use Express auth.
    • Default privacy: A fresh install turns privacy protection on. The regex detector replaces credentials only and restores them in the response. Names and emails stay off until you turn them on. A policy you already saved stays as it is.
    • First launch: You can add providers without setting a raw password first. Turning on request body capture still asks for one.
    • Raw unlock: Unlock ends when the screen locks, the computer sleeps, the user switches, or AstrLink quits. A signed macOS build can unlock with Touch ID. An agent asking to read raw content needs proof each time.
    • Subagents: Child conversations from Claude Code, Codex, and OpenCode hang under their parent. Deleting the parent deletes the children too.
    • Other: Request bodies compressed with gzip, br, or zstd are accepted. A provider test can be cancelled. Privacy model downloads show progress on the model card. Images sent through the Responses entry to a Chat upstream keep the Chat image format.

    官网 / Website · Docker · v0.2.18...v0.2.19

    What's Changed

    New Contributors

    • @fcy222fcy made
  4. v0.2.182026-10-24 · 2026-10-24 09:33 UTC
    查看更新说明

    AstrLink v0.2.18

    [!IMPORTANT] 进行中的对话会列出最近几步:读文件、跑命令、思考、写回复。客户端在两次调用之间跑工具时,对话会一直显示为进行中。

    Conversations in progress list the last few steps: reading files, running commands, thinking, and answering. A conversation stays in progress while the client runs tools between model calls.

    中文

    • 进行中的对话:第二条会列出最近 5 步,例如读文件、改文件、跑命令、搜索、思考和回复。连续相同的步骤会合在一起。客户端在两次调用之间跑工具时,对话会再留最多 30 分钟,跑完长命令也不会从列表里掉出去。模型重定向后,条上显示实际用的模型。
    • 请求记录:Codex Desktop 探测接口的 HEAD 请求不再记进列表。
    • 内置工具:开着网页搜索或图片生成时,提供商拒绝这次请求,客户端会收到提供商自己的错误,而不是笼统的工具失败。
    • 失败切换:ABC 模式下没有下一家时,会在最后这家提供商按重试规则再试。
    • Windows:能找到并更新 Codex 的独立安装包。AstrLink 开着时新装的 Codex,不用重启也能看到。
    • 隐私:修复令牌占位符被再次当成密钥替换的问题。

    English

    • Live conversations: The second line lists the last 5 steps, such as reading or changing files, running commands, searching, thinking, and answering. Repeated steps fold into one mark. While the client runs tools between model calls, the conversation stays in progress for up to 30 minutes, so a long command does not drop it from the list. After a model redirect, the lane names the model that ran.
    • Request records: HEAD probes from Codex Desktop are no longer recorded.
    • Built-in tools: With web search or image generation on, a provider that refuses the request sends its own error to the client, not a generic tool failure.
    • Failover: In ABC mode, when no next provider is left, AstrLink retries the last one under the retry rules.
    • Windows: AstrLink finds and updates a standalone Codex install. A Codex installed while AstrLink is open shows up without a restart.
    • Privacy: Fixes a token placeholder being treated as a secret and replaced again.

    官网 / Website · Docker · v0.2.17...v0.2.18

  5. v0.2.172026-10-23 · 2026-10-23 09:17 UTC
    查看更新说明

    AstrLink v0.2.17

    [!IMPORTANT] 进行中的对话可以看到模型在做什么。请求记录的展示也做了优化。

    Conversations in progress show what the model is doing. Request records are easier to read.

    中文

    • 进行中的对话:可以看到模型在等待、思考、写回复,还是在调某个工具。离开页面再回来,顶部的 5 分钟图表也能补上。
    • 请求记录:模型筛选挪到客户端筛选旁边。重新打开刚才看过的对话,会先显示已经读过的内容。跟踪轨迹时,折叠一次调用也不会把页面拽走。
    • 隐私:正则规则能替换 astr_ 访问令牌,以及 Bearer、token= 后面的值。AstrLink 自己的 request_、session_ 这类编号会保留。
    • DeepSeek Harness:Agent 工具可以装调试 Skill 和隐私占位符 Skill。请求记录会跳过它附带的运行时间和时钟备注。
    • 其他:原文申请只有待批准时,批准窗口才会浮在其他窗口上面。macOS 上网关开给局域网时,重启后能马上重新占用端口。

    English

    • Live conversations: See whether the model is waiting, thinking, writing, or calling a tool. The 5-minute chart fills in time while the page was closed.
    • Request records: The model filter sits beside the client filter. Reopening a conversation you just read starts from what was already loaded. Following a running trace no longer jumps away when a call folds.
    • Privacy: Regex rules replace AstrLink access tokens (astr_) and values after Bearer or token=. AstrLink's own IDs such as request_ and session_ stay in place.
    • DeepSeek Harness: Agent tools can install the debug skill and the redaction-placeholder skill. Request records skip its runtime and clock notes.
    • Other: The raw-access window stays above other windows only while a request is waiting. On macOS, a LAN gateway can take its port again right after a restart.

    官网 / Website · Docker · v0.2.16...v0.2.17

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    AstrLink

    English | 简体中文 | 日本語

    A local privacy gateway for AI agents: sensitive content is detected and redacted locally before it reaches any model provider.

    AstrLink is an open-source desktop app for macOS, Windows, and Linux. Before a request goes upstream, it can detect secrets, email addresses, phone numbers, and other sensitive content locally, then warn, block, or redact it according to configured policies. Redacted values can be restored locally in the response, so agents keep working. It also unifies existing subscriptions and APIs, with model routing and request records.

    Getting started · On-device privacy protection · User guides (Chinese) · Contributing (Chinese)

    Screenshots

    These screenshots show the current interface with simulated accounts, usage, costs, and request content. Click an image to view it at full size. Compact window.

    Live requests · light themeLive requests · dark theme
    Concurrent agent sessions and tool calls in the light themeConcurrent agent sessions and tool calls in the dark theme
    OverviewAPI providers
    Overview with simulated usageProviders with simulated accounts, quotas, costs, and performance
    On-device privacy protectionRequest details
    Local privacy detection and response restoration settingsAgent conversation with expanded tool calls and performance statistics

    Features

    • On-device privacy protection: Detect sensitive content with local rules or a local privacy model. Warn, block, or redact according to your policies, and optionally restore placeholders in responses.
    • Subscriptions and APIs in one place: Connect Codex, Claude, and Grok subscriptions, major API providers, Coding Plans, and compatible gateways such as New API. Manage accounts and credentials centrally.
    • Model routing: Redirect requested model names to target models, set provider priorities, and configure retries and failover between providers.
    • Multiple API protocols: Expose OpenAI Responses, Chat Completions, Anthropic Messages, and Gemini endpoints, with protocol conversion configurable according to upstream capabilities.
    • Request records and usage tracking: Inspect requests, session traces, upstream attempts, and errors. Track usage and estimated costs by provider, model, and access token.

    On-device privacy protection

    With privacy policies enabled, AstrLink can detect sensitive content, redact requests, and restore responses locally:

    1. Detect on your device: Use built-in rules, custom rules, or a local privacy model to identify sensitive content such as secrets, email addresses, and phone numbers. Rule-based detection requires no model download.
    2. Apply your policies: Choose to warn, block, or redact. Redaction replaces detected sensitive content with placeholders. Configure detection categories and allowlists, then check the results with a dry run.
    3. Restore responses when needed: Enable response restoration to replace placeholders returned by the model with their original values, so your agent can continue using the results.

    The gateway, privacy detection, and redaction run on your device. Inference requests are still sent to the upstream API providers you configure. What gets processed depends on your enabled policies and detection results. Request body capture is off by default and can be enabled separately for troubleshooting.

    Local privacy models must be downloaded or imported; see Privacy model settings (Chinese). For thinking signatures and encrypted continuation data, see Privacy detection and continuation compatibility (Chinese).

    Installation

    AstrLink is in early development, with no official installer release yet. Published versions will be available on Releases.

    You can run from source by following the development and build instructions (Chinese). You can also download build artifacts from successful Actions runs while signed in to GitHub. These are development builds and may not be signed or notarized.

    PlatformPackages and requirements
    macOSApple Silicon / Intel, macOS 13.4 or later
    Windowsx64 .exe installer; WebView2 may need to be downloaded during installation
    Linuxx64 .deb, Debian 12 or a compatible newer distribution

    Local privacy models are downloaded or imported separately. Model weights are not included in the app package.

    Getting started

    1. Connect a subscription or API

    Open AstrLink, make sure the gateway is running, then go to API providers and add an existing subscription or API.

    Subscription or APIHow to connect
    Codex, Claude, or Grok subscriptionSelect the subscription type and follow the authorization steps; Grok uses device code login
    New API or another compatible gatewayEnter the gateway URL and its API key
    OpenAI, Anthropic, Gemini, DeepSeek, Qwen, Kimi, GLM, MiniMax, Doubao, or xAISelect the provider under pay-as-you-go APIs and enter your API key
    Coding Plan subscriptionsSelect the corresponding Coding Plan and use its subscription-specific credentials

    After saving, fetch or manually add the models you want to use. Providers with an empty model list will not handle inference requests. API and Coding Plan credentials and endpoints may differ; see the provider setup guide (Chinese).

    Model availability, quotas, and billing depend on the account or provider. Cost estimates in AstrLink are for reference; your provider's bill is authoritative.

    2. Create an access token

    Go to Access tokens and create a token for your agent. Use this token when connecting the agent to the local gateway. Configure upstream API keys under API providers.

    Give each agent its own token to track usage and revoke access independently.

    3. Connect your AI agent

    Copy the current API address from Overview or Settings. The default is http://127.0.0.1:8317, but the port may change if it is already in use. Use the address shown in the app.

    Enter the local API address, access token, and model in your agent's model configuration. For an OpenAI-compatible client using Chat Completions:

    SettingValue
    Base URLhttp://127.0.0.1:8317/v1, adjusted to the actual port
    API KeyThe AstrLink access token you just created
    ModelA model ID from the provider's model list, or the request model name in an enabled redirect rule

    Base URL requirements vary by client: some append /v1 automatically, while others expect a full endpoint URL. Common request paths are:

    API protocolRequest path
    OpenAI Responses/v1/responses
    OpenAI Chat Completions/v1/chat/completions
    Anthropic Messages/v1/messages
    Gemini/v1beta/models/{model}:generateContent

    The provider must support the client's API protocol, or you must configure an available protocol conversion.

    4. Configure routing and privacy policies

    • In Routing, configure model redirects, retries, and failover. Set provider priorities by dragging entries in the API providers list; the gateway selects providers that support the target model and request protocol.
    • In Safety policy, choose the detection method and action. Check the results with a dry run before using the policy for everyday requests. Local models must be downloaded or imported first.
    • In Routing, enable provider reuse within a session. Inspect bindings or provider reselection in request records; see Provider stickiness and binding audits (Chinese).

    Once configured, send a request and check Request records to confirm the provider, model, and result.

    FAQ

    Why does my client report an authentication error?

    Make sure you are using a valid AstrLink access token. If request records show an upstream 401 or 403 response, check the provider's API key or subscription login status.

    Why is a model missing, or why are no API providers available?

    Check that the provider is enabled, its model list includes the requested model, and its enabled inbound protocols match the request. If you use a model redirect, check that the rule is enabled and a provider supports its target model.

    Why can I no longer connect to the previous port?

    Check the current API address in the app. If the default port is in use, AstrLink chooses an available one. Restart the gateway after changing the port in settings.

    Why are requests rejected after enabling a privacy model?

    Check that the model is installed and the policy is configured correctly, then inspect the error in request records. If the model is unavailable, requests are rejected rather than forwarded without privacy detection.

    Will my client still work after I close the window?

    It depends on your window-close setting. Hiding to the tray keeps the gateway running; quitting the app stops it. See Desktop settings (Chinese).

    Feedback and contributing

    Report problems through Issues. Include your operating system, app version, steps to reproduce, and redacted error details. Keep API keys, access tokens, and private request bodies out of reports.

    To contribute code or build from source, read the contributing guide (Chinese).

    License

    AstrLink's own source code is licensed under Apache-2.0. Third-party components retain their respective licenses and attributions.

    Core uses RelayKit, which is licensed under AGPL-3.0. Distributing builds that include it or offering the corresponding functionality over a network also requires compliance with that dependency's license terms.