summaryrefslogtreecommitdiff
path: root/docs/locales/zh/advanced
diff options
context:
space:
mode:
authorLibravatar cdn0x12 <git@cdn0x12.dev>2025-05-03 09:28:16 +0000
committerLibravatar tobi <kipvandenbos@noreply.codeberg.org>2025-05-03 09:28:16 +0000
commit4d6408015bab9f2c0b3b5820ed6d048f868f5c1f (patch)
treeccabd8adc31626b3669c3ee728fa50ddd708f8ac /docs/locales/zh/advanced
parent[chore/cicd] Snapshot only if source code files have changed (#4115) (diff)
downloadgotosocial-4d6408015bab9f2c0b3b5820ed6d048f868f5c1f.tar.xz
[docs/zh] Update zh docs: synced to 6c879186 (#4117)
# Description This PR updates the Chinese documentation to 6c879186 (the latest commit at present). It also fixed a small typo in the original docs. Since the change is so minor, I didn't make a separate PR. Last docs/zh update PR: #3884 ## Checklist Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]` If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want). - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4117 Co-authored-by: cdn0x12 <git@cdn0x12.dev> Co-committed-by: cdn0x12 <git@cdn0x12.dev>
Diffstat (limited to 'docs/locales/zh/advanced')
-rw-r--r--docs/locales/zh/advanced/builds/nowasm.md4
-rw-r--r--docs/locales/zh/advanced/scraper_deterrence.md18
2 files changed, 22 insertions, 0 deletions
diff --git a/docs/locales/zh/advanced/builds/nowasm.md b/docs/locales/zh/advanced/builds/nowasm.md
index 33e6fad22..4c444fc26 100644
--- a/docs/locales/zh/advanced/builds/nowasm.md
+++ b/docs/locales/zh/advanced/builds/nowasm.md
@@ -15,6 +15,10 @@
使用 `nowasm` 构建的 GoToSocial 二进制文件将使用 [modernc 版本的 SQLite](https://pkg.go.dev/modernc.org/sqlite) 而不是 WASM 版本,并将在系统上使用 `ffmpeg` 和 `ffprobe` 二进制文件进行媒体处理。
+!!! tip "提示"
+ 要测试你的系统是否支持标准构建,可以使用此命令:
+ `if grep -qE '^flags.* (sse4|LSE)' /proc/cpuinfo; then echo "Your system is supporting GTS!"; else echo "Your system is not supporting GTS, you'll have to use the 'nowasm' builds :("; fi`
+
要使用 `nowasm` 标签构建 GoToSocial,可以像这样将标签传入我们的便利 `build.sh` 脚本:
```bash
diff --git a/docs/locales/zh/advanced/scraper_deterrence.md b/docs/locales/zh/advanced/scraper_deterrence.md
new file mode 100644
index 000000000..69ac8552f
--- /dev/null
+++ b/docs/locales/zh/advanced/scraper_deterrence.md
@@ -0,0 +1,18 @@
+# 爬虫防护
+
+GoToSocial 提供一个可选的、基于工作量证明的爬虫和自动化 HTTP 客户端防护机制,可在账户页和贴文页的网页视图上启用。
+
+它的工作原理是:针对每个传入的 HTTP 请求,系统会根据客户端信息和当前时间生成一个唯一质询(一个十六进制编码的 SHA256 哈希值)。然后,它要求客户端为该质询的一部分找到一个附加值,使(附加值+质询部分)组合计算出的新 SHA256 哈希值(同样为十六进制编码)至少包含 4 个前导 '0' 字符。这个质询会通过一个极简的等待页面呈现给客户端,该页面包含一个独立的 JavaScript worker 来计算解决方案。
+
+一旦客户端提供了此质询的解,并通过在查询参数中携带该方案刷新页面,GoToSocial 将验证此方案。验证成功后,服务端会返回用户期望访问的账户或贴文页面,并设置一个 Cookie。该 Cookie 允许用户在接下来最多一小时内免验证访问该实例。
+
+启用此功能的目的是让自动化数据收集(例如 AI 公司、搜索引擎)对你实例的账户和贴文页面进行爬取的行为,在经济上变得不可行。唯一的缺点是,用户需要启用 JavaScript 才能访问你的账户和贴文网页视图。
+
+这个功能深受优秀的 [anubis] 项目的启发,但我们最终决定自己实现,只包含我们需要的功能,使用最少的代码,并能与我们现有的授权/认证流程实现更细粒度的结合。
+
+GoToSocial 实现的这个爬虫防护功能仍然是极其精简的。因此,如果你需要更多功能或对防护措施进行更精细的控制,那么完全可以禁用我们的内置功能,并在你的实例前部署像 [anubis] 这样的服务!
+
+!!! warning "警告"
+ 这个基于工作量证明的爬虫防护机制并不保护用户账户页的 RSS feed,因为这会带来额外的复杂性。如果你需要确保 RSS feed 可被访问,那么在这种情况下,[anubis] 可能是更合适的选择!
+
+[anubis]: https://github.com/TecharoHQ/anubis \ No newline at end of file