diff --git a/privacy.html b/privacy.html new file mode 100644 index 0000000..9f545b7 --- /dev/null +++ b/privacy.html @@ -0,0 +1,67 @@ + + + + + + Bot 隐私政策 / Privacy Policy + + + +
+

Bot 隐私政策 / Privacy Policy

+

最后更新:2026-03-10

+ +

1. 我们是谁

+

本隐私政策适用于与本 Telegram Bot(以下简称“Bot”)的交互。本 Bot 用于提供个人助理与技术学习/排障相关的对话服务。

+ +

2. 我们收集哪些数据

+ + +

3. 数据如何被使用

+ + +

4. 数据共享与第三方

+

Bot 运行依赖以下第三方服务,数据会按功能需要流转:

+ +

我们不会将你的个人数据出售给任何第三方。

+ +

5. 数据保留

+

我们会在实现功能与保障稳定性的必要范围内保留数据(例如对话上下文、课程数据、运行日志)。保留时间可能因用途不同而不同。

+ +

6. 你的权利

+ + +

7. 安全

+

我们采取合理的技术措施保护数据(例如服务访问控制、最小权限原则)。但任何系统都无法保证绝对安全。

+ +

8. 联系方式

+

如需数据删除/导出或有隐私问题,请通过你与 Bot 的对话渠道联系管理员。

+ +
+

English summary: We process the messages you send to provide replies and task automation. Basic Telegram metadata and operational logs may be stored for reliability and debugging. Data may be transmitted to Telegram and model providers as needed to generate responses. We do not sell personal data. You may request deletion/export where feasible.

+
+ + diff --git a/server.py b/server.py index c4d04c3..4fe1568 100755 --- a/server.py +++ b/server.py @@ -22,6 +22,7 @@ USERS = { TASKS_FILE = os.path.join(os.path.dirname(__file__), "COURSE_TASKS.json") HTML_FILE = os.path.join(os.path.dirname(__file__), "index.html") +PRIVACY_FILE = os.path.join(os.path.dirname(__file__), "privacy.html") SANDBOX = LinuxSandbox() @@ -94,7 +95,7 @@ class LinuxLearningHandler(http.server.BaseHTTPRequestHandler): parsed = urllib.parse.urlparse(self.path) path = parsed.path - if path not in ["/", "/api/login", "/api/logout", "/api/course", "/api/health"]: + if path not in ["/", "/privacy", "/privacy.html", "/api/login", "/api/logout", "/api/course", "/api/health"]: auth_header = self.headers.get("Authorization", "") token = self.headers.get("X-Token", "") if not self.check_auth(auth_header, token) and "xiaoxiaoluohao.indevs.in" in self.headers.get("Host", ""): @@ -105,6 +106,10 @@ class LinuxLearningHandler(http.server.BaseHTTPRequestHandler): self.send_file(HTML_FILE, "text/html; charset=utf-8") return + if path in {"/privacy", "/privacy.html"}: + self.send_file(PRIVACY_FILE, "text/html; charset=utf-8") + return + if path == "/api/health": self.send_json({"ok": True, "cwd": SANDBOX.cwd, "user": SANDBOX.user, "modules": len(COURSE.get("modules", []))}) return