feat(server): 加固联机服务端:速率限制、房间管理、结构化日志#3687
Open
zhpy2004 wants to merge 1 commit into
Open
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a4b04d6 to
9609b9e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR受影响的平台
无(通用服务端代码)
诱因和背景
当前联机服务端
packages/server/src/index.ts缺少基本的安全防护和资源管理机制:PR描述
对联机服务端进行全面加固,主要改动:
startServer()函数模式:便于测试和灵活部署[Server]前缀,关键事件均有日志输出改动文件:
packages/server/src/index.tspackages/server/src/index.test.tspackages/server/package.jsonpackages/server/pnpm-lock.yamlPR测试
pnpm --filter @noname/server test)pnpm --filter @noname/server lint)扩展适配
无,本次改动仅涉及服务端内部逻辑重构,对外接口(WebSocket 消息协议)保持不变。
检查清单
WIP直到本PR内容全部提交character/rank.js中添加对应的武将强度评级,并对双人武将/复姓武将添加name:xxx的参数lib.translate中加入语音文件的文字台词PR描述中写入详细文档扩展适配中写入详细文档诱因和背景中明确链接到该issue.editorconfig、eslint.config.mjs和prettier.config.mjs所规定的代码样式,并且已经通过prettier格式化过代码