Files
omv-dijiang/works/patch/docs/configuration/outbound/minecraft.zh.md.patch
T
2026-03-05 15:48:45 +08:00

56 lines
1.2 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
--- /dev/null
+++ b/docs/configuration/outbound/minecraft.zh.md
@@ -0,0 +1,52 @@
+### 结构
+
+```json
+{
+ "type": "minecraft",
+ "tag": "mc-out",
+
+ "server": "mc.example.com",
+ "server_port": 25565,
+ "username": "Steve",
+ "password": "my-secret-password",
+
+ ... // 拨号字段
+}
+```
+
+### 拨号字段
+
+详见 [拨号字段](/configuration/shared/dialer/)。
+
+### 字段
+
+#### server
+
+==必填==
+
+Minecraft 服务器地址。
+
+#### server_port
+
+Minecraft 服务器端口,默认为 `25565`。
+
+#### username
+
+认证使用的用户名,默认为 `Steve`。
+
+#### password
+
+认证使用的密码。
+
+### 说明
+
+Minecraft 出站连接至 Minecraft 入站,通过 Minecraft Java Edition 协议隧道传输流量。
+
+连接流程:
+
+1. 出站连接至服务器,发送 Minecraft 握手包和登录开始包
+2. 服务端回复加密请求(RSA 公钥 + 验证令牌)
+3. 出站通过 `SHA-256(password + verify_token)[:16]` 派生共享密钥,发送加密响应
+4. 双方切换至使用派生共享密钥的 AES/CFB8 加密
+5. 收到登录成功后,在加密连接上建立 smux 多路复用
+6. 每个 smux 流携带 1 字节命令(`0x01` 表示 TCP`0x03` 表示 UDP)加 SOCKS 地址头