开源个基于 P2P 网络共享 Token 的项目,一起来共享闲置算力解决生产力
Claude、ChatGPT 的额度每 5 小时刷新一次,有时自己用不完就浪费掉了,同事、朋友却常常额度不够,卡在半路。为了解决这个问题,我做了 ShareToken:一个点对点的大模型共享网络,MIT 协议开源。
能共享什么
sharetoken provider login anthropic # Claude 订阅(OAuth 登录)
sharetoken provider login openai # ChatGPT / Codex 订阅
sharetoken provider add deepseek # 或者一个 API key
sharetoken share add qwen3.8:27b # 或者本地 Ollama 模型
支持 Claude、ChatGPT、Gemini、Grok 的订阅,各家 API key,以及本地模型。共享出去的额度被别人用掉时,你赚 credit;你也可以用 credit 调用别人共享的模型。
用起来是什么样
- 本地接口:
sharetoken up之后,本地会有一个127.0.0.1:9787接口,同时兼容 OpenAI Chat Completions、Responses 和 Anthropic Messages。Claude、Codex 改一个 base URL 就能用,sharetoken skill install还能让它们自己学会怎么用这个客户端。 - 共享伙伴:和朋友、同事互加之后,双方优先用对方的额度,完全免费,每天给对方多少 token 由自己设上限。这是我自己用得最多的功能:几个人的订阅凑在一起,谁的额度用完了就自动用别人的。
- 配对码:只想和熟人交易时,卖家发一个配对码,还可以设成私有,陌生人看不到你的节点。
- 网络穿透:不需要公网 IP,能直连就直连,打不通就走 WireGuard 隧道,最后才走中继,也可以自己搭一个私有中继。所有流量走对端出口 IP,不怕被封号。
用别人的 Token 安全吗?
- 点到点加密:数据直接从买家到卖家,有两层加密:libp2p Noise 端到端,加上每条消息单独的 sealed box(X25519 + AES-256-GCM)。
- 回答被篡改或截断会被发现? 不会。卖家对密文哈希签收据,客户端用实际收到的内容重算核对。
- 偷换模型会审计:平台会伪装成买家随机抽查,用参考模型逐 token 核对,发现模型替换会停止提供者。
做不到的事
- 不是 API 中转站,平台不提供 Token。
- 目前对偷换模型的审计能力有限,依然存在模型被偷换的风险(持续强化中)。
- Token 提供方依然能看到你的数据,平台侧无法保证这块的安全。
常见玩法
- 和朋友互相共享订阅,突破 5 小时限制。
- 分享自己闲置的 token(如 Claude 订阅),在自己需要的时候使用别人的 token。
- 在没有公网 IP 的云 VPS 或轻 Agent 上跑,替代 sub2api 或 magpie。
链接
- GitHub:https://github.com/Lingerhk/sharetoken
- 官网和下载(macOS / Windows / Linux):https://sharetoken.app
最后,本人ChatGPT Pro无偿分享
来做 ShareToken 共享伙伴吧,点这个链接接受邀请:https://sharetoken.app/s#3MGy0AKi 已经装了客户端的话,也可以输入邀请码 KPY-7BR(2026/11/29 20:33:21 前有效)。
English translation
The quotas for Claude and ChatGPT refresh every 5 hours. Sometimes I don’t use up my entire quota and end up wasting it, while my colleagues and friends often run out of quota and get stuck halfway through. To solve this problem, I created **ShareToken**: a peer-to-peer large-model sharing network, open-sourced under the MIT license.
## What Can Be Shared
```bash
sharetoken provider login anthropic # Claude subscription (OAuth login)
sharetoken provider login openai # ChatGPT / Codex subscription
sharetoken provider add deepseek # Or an API key
sharetoken share add qwen3.8:27b # Or a local Ollama model
```
Supports subscriptions for Claude, ChatGPT, Gemini, and Grok; API keys from various providers; and local models. You earn credits when the quota you share is used by others; you can also use credits to call models shared by others.
## How It Works
- **Local API**: After running `sharetoken up`, a local API at `127.0.0.1:9787` becomes available, compatible with OpenAI Chat Completions, Responses, and Anthropic Messages. Claude and Codex can be used simply by changing the base URL, and running `sharetoken skill install` allows them to automatically learn how to use this client.
- **Sharing Partners**: After adding friends or colleagues, both parties will prioritize using each other’s quotas—completely free of charge. You can set your own daily limit on how many tokens to allocate to each other. This is the feature I use the most: pooling subscriptions from several people so that when one person’s quota runs out, the system automatically draws from another’s.
- **Pairing Code**: When you only want to trade with people you know, the seller sends a pairing code—which can be set to private—so strangers can’t see your node.
- **Network Penetration**: No public IP required. If a direct connection is possible, use it; if not, go through a WireGuard tunnel, and only as a last resort use a relay. You can also set up your own private relay. All traffic goes through the counterparty’s exit IP, so there’s no risk of getting banned.
## Is it safe to use someone else’s token?
- **Point-to-Point Encryption**: Data travels directly from the buyer to the seller with two layers of encryption: libp2p Noise end-to-end encryption, plus a separate “sealed box” (X25519 + AES-256-GCM) for each message.
- **Will tampering or truncation of responses be detected?** No. The seller signs the ciphertext hash as a receipt, and the client recalculates it using the actual received content to verify.
- **Model Swapping Is Audited**: The platform will randomly conduct spot checks by posing as a buyer, verifying each token against a reference model. If a model is found to have been swapped, the provider will be suspended.
## What We Cannot Do
- We are not an API relay service; the platform does not provide tokens.
- Currently, our ability to audit model swapping is limited, so there is still a risk of models being swapped (we are continuously improving this).
- Token providers can still view your data; the platform cannot guarantee security in this regard.
## Common Use Cases
- Share subscriptions with friends to bypass the 5-hour limit.
- Share your unused tokens (such as a Claude subscription) and use others’ tokens when you need them.
- Run the service on a cloud VPS or lightweight agent without a public IP address as an alternative to sub2api or magpie.
## Links
- GitHub:
- Official Website and Downloads (macOS / Windows / Linux):
## Finally, I’m sharing ChatGPT Pro for free
Join the ShareToken community by clicking this link to accept the invitation: https://sharetoken.app/s#3MGy0AKi
If you’ve already installed the client, you can also enter the invitation code KPY-7BR (valid until November 29, 2026, at 8:33:21 PM).
标签
相关推荐
评论
登录后即可发表评论
去登录