npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

okstudio

v1.0.2

Published

OK Studio - Local OpenAI-compatible gateway for Qwen Studio + duck.ai, with anonymous IP pool rotation for near-unlimited duck.ai quota. Zero config, OK!

Readme

OK Studio

一个本地 OpenAI 兼容网关,两条免费上游:Qwen Studio + duck.ai。

 ██████╗ ██╗  ██╗  ██╗
██╔═══██╗██║ ██╔╝  ██║
██║   ██║█████╔╝   ██║
██║   ██║██╔═██╗   ██║
╚██████╔╝██║  ██╗  ██║
 ╚═════╝ ╚═╝  ╚═╝  ╚═╝
  • Qwen 上游:chat.qwen.ai 网页端同源接口。思考摘要、联网引用、图/视频/音频/文档附件、tools 工具调用、云端对话用完即删、风控静默重试(原 Qwen Studio++ 全部能力)。
  • duck.ai 上游:DuckDuckGo 匿名 AI(GPT-5.6 / Claude Haiku / Mistral / gpt-oss…)。无需任何账号,配合号池轮换出口 IP,额度接近无限。
  • 号池:一键抓取大量匿名代理(每个 IP = 一个 duck.ai 匿名额度桶),随机抽取发送;额度耗尽/被拉黑的账号自动删除。v1.0.2 起主力源为 proxy.scdn.io 免费公共代理池(一次拉取全量 3 万+ 条可用代理)。
  • 出口 IP:可设置全局默认出口(HTTP/HTTPS 代理),对所有 Internet 上游请求生效;v1.0.2 起内置本机转发代理端口,浏览器/系统代理指向它即可让整机流量走出口 IP。出口失联自动降级直连(2 分钟后重试),不会拖死 Qwen。
  • 管理台:侧边栏 + 横向卡片布局,深浅色自适应;从配置到号池运维全部图形化。

duck.ai 额度机制完整逆向笔记(匿名桶 / 三层窗口 / 418 语义 / 挑战脚本)见 docs/DUCK_NOTES.md。


快速开始

npm install -g okstudio
okstudio

或免安装:

git clone https://github.com/GCX121017/okstudio.git
cd okstudio && npm install
node bin/cli.js

启动后自动打开管理台(默认 http://127.0.0.1:8818):

  1. 用 duck/ 模型:什么都不用配。到「号池」页点 获取(抓一批 IP)→ 体检(测可用性)→ 客户端里模型填 duck/gpt-5.6-luna 即可。
  2. 用 Qwen 模型:「Qwen 上游」页粘贴 chat.qwen.ai 的 token(F12 → Console → localStorage.token)。
  3. 接入客户端:Base URL http://127.0.0.1:8818/v1 + 管理台里的密钥,Cherry Studio / openai SDK / curl 全部直接可用。

双上游路由

所有模型在同一个端点按 model 字段自动路由:

| model | 上游 | 说明 | |---|---|---| | duck/gpt-5.6-luna | duck.ai | 默认模型,成本 1x | | duck/gpt-5.4-mini | duck.ai | 耗额度 2-5x | | duck/claude-haiku-4-5 | duck.ai | 耗额度 2-5x | | duck/mistral-small-2603 | duck.ai | | | duck/openai/gpt-oss-120b | duck.ai | | | duck/tinfoil/gemma4-31b | duck.ai | BETA | | qwen3.8-max 等 | Qwen Studio | 思考/联网/多模态/tools |

curl http://127.0.0.1:8818/v1/chat/completions \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"model":"duck/gpt-5.6-luna","messages":[{"role":"user","content":"你好"}],"stream":true}'

号池:duck.ai 额度接近无限的原理

duck.ai 不需要登录,额度按匿名桶(IP/网络指纹)计量:每个 IP 有独立的 6 小时窗 / UTC 日限额,数据中心 IP 会被直接拒绝(HTTP 418)。换出口 IP = 换一个全新的额度桶(官方 FAQ 亦承认换 VPN 节点可重置额度)。

OK Studio 的号池把这件事工程化:

获取 ──► proxy.scdn.io 全量源一次拉取 (实测 3.4 万+ 条可用代理, 均匀采样入池, 采样量可调)
         + 13 个常规公开源并发补充 (GitHub 类源在 raw / jsDelivr 国内节点 testingcf/gcore/
         quantil / 加速器 ghfast.top 等镜像间竞速, 国内网络可直接用)
体检 ──► HTTPS CONNECT 隧道验证 + 出口 IP/国家/延迟探测 (双探测目标自动回退;
         并发/超时按批量自适应, 万级队列也能快速消化)
使用 ──► duck.ai 请求随机抽取可用账号, UA 指纹按账号稳定轮换
信号 ──► 418/额度耗尽 → 该账号立即删除 → 自动换号重试 (一次请求最多 3 个账号)
护栏 ──► 每账号本地三窗预算 (6h/日/周), 永不打爆; 429/挂起冷却而非重试
边界 ──► 免费池仅供 duck.ai (匿名); Qwen 等带账号上游只走你显式设置的出口 IP

免费代理可用率约 10-20%,抓取后多点几轮「体检」(每轮并发检测 500 条);也可以在「手动添加」里填自有/付费代理(质量更高)。无可用账号时自动退回直连/全局出口并启用本地护栏台账。

代理源说明(v1.0.2):主力源为 proxy.scdn.io 永久免费公共代理池 —— 它自家验证可用后才入列表(实测 3.4 万+ 条),OK Studio 一次拉取全量后均匀采样入池(默认 6000 条,可在「获取」下拉选择采样量直至全量),另用其 API 端点滚动补充新鲜代理;GitHub 类 13 源镜像竞速保留作为补充与回退。

国内网络说明(v1.0.1 起):GitHub raw 在国内被墙是老问题,GitHub 类源全部走「镜像竞速」:同时向 raw.githubusercontent.com、testingcf/gcore/quantil.jsdelivr.net(国内友好 CDN)、ghfast.top/gh-proxy.com(GitHub 加速器)发起请求,谁先返回合法数据用谁,并记住赢家下次优先。若设置了全局出口 IP 但它失联导致全部源失败,会自动绕过出口直连重试。

出口 IP(全局)与本机代理端口

「出口 IP」页设置 http://127.0.0.1:7890 这类代理后,所有上游请求(Qwen 全链路、duck.ai、附件上传下载、号池源抓取)都经由该 IP;留空恢复直连。保存前可一键测试(显示出口 IP/归属/延迟;v1.0.2 起用 HTTPS 目标验证 CONNECT 隧道,与真实上游一致,「只会 HTTP 转发」的残废代理会被当场拦下)。

要让浏览器/整机也走这个出口 IP:把浏览器代理插件(SwitchyOmega 等)或系统代理设为 OK Studio 的本机转发代理端口(默认 http://127.0.0.1:8819,启动日志与管理台「出口 IP」页可见)。链路为:浏览器 → 本机端口 → 默认出口 IP → Internet,改出口即时生效、无需重启。

自愈(v1.0.2):出口代理失联时,OK Studio 会自动临时直连完成当次请求(2 分钟后恢复尝试出口),管理台概览与出口页会显示「出口失联·临时直连」状态 —— 出口挂了不再拖死 Qwen。

管理台

| 页面 | 功能 | |---|---| | 概览 | 双上游状态徽章、请求计数、三步接入指南 | | 接口接入 | API 密钥管理、5 种客户端接入示例、模型速查 | | Qwen 上游 | token 配置(自动验证/纠错)、四步网络诊断、在线流式测试 | | duck.ai | 模型清单与额度成本、在线测试(显示经哪个账号发送)、全局桶台账 | | 号池 | 一键获取(scdn 全量源+常规源镜像竞速)/体检(自适应并发)、账号表格(出口 IP/延迟/状态/用量)、自动删除开关、动态日志 | | 出口 IP | 全局默认出口设置与测试(HTTPS 隧道验证)、本机转发代理端口、出口健康状态 | | 设置 | 默认模型、Qwen 防风控间隔、启动行为 |

OpenAI 兼容端点

| 端点 | 说明 | |---|---| | GET /v1/models | Qwen + duck 全模型列表 | | POST /v1/chat/completions | 流式/非流式/tools(Qwen);duck 支持流式/非流式 | | POST /v1/files 等 | OpenAI Files 风格附件上传(Qwen) | | GET /admin/api/* | 管理台接口(仅本机) | | GET /healthz | 健康检查 |

Qwen 上游附加能力:thinking(思考摘要)、reasoning_content 增量、联网引用 docs、附件 content 数组(image_url/video_url/input_audio/file)、tools 提示词级模拟还原 OpenAI tool_calls、云端对话用完即删。

CLI

okstudio                 启动服务并打开管理台
okstudio doctor          环境自检
okstudio key             重新生成 API 密钥
okstudio token <t>       命令行保存 Qwen token
okstudio --port 8819     指定端口; --lan 允许局域网; --no-open 不开浏览器

配置与数据

全部在 ~/.okstudio/(config.json / pool.json / duck-quota.json / files.json),不写注册表、不留系统垃圾。卸载:npm uninstall -g okstudio && rm -rf ~/.okstudio。

依赖:undici(代理与 fetch)、jsdom(duck.ai 挑战沙箱,可选依赖)。

隐私与合规

  • 本地服务,数据不出本机(除上游请求本身);配置文件 0600 权限。
  • duck.ai 号池仅承载匿名请求(无账号/无 cookie);带账号的 Qwen 请求永远不会经过免费号池。
  • 本工具基于上游网页端接口封装,仅供个人学习研究与本地自动化使用,请遵守上游服务条款。

License

MIT