Skip to content

Commit a615bdc

Browse files
committed
docs: clarify subscription bearer responsibility
1 parent 7857ad9 commit a615bdc

5 files changed

Lines changed: 27 additions & 5 deletions

File tree

README-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
完整的订阅链接及其中的 token 属于“持有者即可使用”的访问凭证。任何拿到完整链接的人,都可能读取对应的生成配置并使用该订阅。请像保管密码一样保管它,不要把完整链接放进公开仓库、Issue、聊天记录、截图或日志;怀疑泄漏时,应立即删除并重新创建相应订阅,以更换 token。
4545

46-
通过该 token 发起的请求会按订阅所属用户计入访问和风控记录。这是预期的权限模型,因此订阅所有者有责任避免完整链接泄漏
46+
通过该 token 发起的所有请求(包括匿名请求和第三方客户端请求)都会按订阅所属用户计入访问和风控记录;反复触发限流可能临时封禁订阅所有者的账号。这是预期的权限模型。请勿公开完整链接或把它交给不受信任的第三方;即使主动在受信任客户端或与受信任的人使用,相关请求和滥用风险仍由订阅所有者承担
4747

4848
## 开发说明
4949

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
A complete subscription URL and its token are bearer credentials: anyone who obtains the full URL may read the generated configuration and use that subscription. Protect it like a password. Never place the complete URL in public repositories, issues, chat messages, screenshots, or logs. If exposure is suspected, delete and recreate the affected subscription to issue a new token.
4545

46-
Requests made with a token are attributed to the user who owns the subscription for access controls and abuse prevention. This is the intended authorization model, so subscription owners are responsible for keeping complete subscription URLs confidential.
46+
Every request made with a token, including anonymous requests and requests from third-party clients, is attributed to the subscription owner for access controls and abuse prevention. Repeated rate-limit violations may temporarily ban the owner's account. This is the intended authorization model. Do not publish a complete URL or give it to an untrusted third party; even when using it in a trusted client or with a trusted person, the owner remains responsible for the resulting traffic and abuse risk.
4747

4848
## Development Notes
4949

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import fs from "node:fs";
2+
import { fileURLToPath } from "node:url";
3+
import { describe, expect, it } from "vitest";
4+
5+
const publicRoot = fileURLToPath(new URL("../../../..", import.meta.url));
6+
7+
describe("public subscription bearer credential guidance", () => {
8+
it("warns in both READMEs that token traffic belongs to the owner and may temporarily ban the owner", () => {
9+
const chinese = fs.readFileSync(`${publicRoot}/README-CN.md`, "utf8");
10+
const english = fs.readFileSync(`${publicRoot}/README.md`, "utf8");
11+
12+
expect(chinese).toContain("持有者即可使用");
13+
expect(chinese).toContain("匿名请求和第三方客户端请求");
14+
expect(chinese).toContain("临时封禁订阅所有者");
15+
16+
expect(english).toContain("bearer credentials");
17+
expect(english).toContain("anonymous requests and requests from third-party clients");
18+
expect(english).toContain("temporarily ban the owner's account");
19+
});
20+
});

packages/ui/src/product/home/subscription-link-dialog.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ describe("SubscriptionLinkDialog", () => {
140140
expect(html).toContain("启用自动更新");
141141
expect(html).toContain("自动更新间隔");
142142
expect(html).toContain("注意事项");
143+
expect(html).toContain("完整订阅链接是持有者凭证");
144+
expect(html).toContain("所有请求均归属您的账号");
145+
expect(html).toContain("反复触发限流会临时封禁账号");
143146
expect(captures.inputs[0]).toMatchObject({ value: "我的配置", maxLength: 100 });
144147
expect(captures.inputs[1]).toMatchObject({ type: "number", min: 12, step: 1, value: 8 });
145148
expect(captures.switches).toHaveLength(2);

packages/ui/src/product/home/subscription-link-dialog.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ export function SubscriptionLinkDialog({
133133
<p className="font-medium mb-1">注意事项</p>
134134
<ul className="text-xs text-amber-200/70 space-y-1">
135135
<li>🔒 配置数据将加密存储于服务器</li>
136-
<li>🔑 订阅链接相当于访问凭证,请勿公开分享</li>
137-
<li>⏱️ 客户端高频拉取订阅会被封禁,请合理配置</li>
136+
<li>🔑 完整订阅链接是持有者凭证,仅在自己控制或信任的客户端中使用</li>
137+
<li>⏱️ 所有请求均归属您的账号;反复触发限流会临时封禁账号</li>
138138
{isEditingExistingSubscription ? (
139139
<>
140140
<li>⚠️ 更新将覆盖原订阅配置与订阅源</li>
@@ -204,4 +204,3 @@ export function SubscriptionLinkDialog({
204204
</Dialog>
205205
);
206206
}
207-

0 commit comments

Comments
 (0)