Repository navigation
feat(mcp): 允许局域网访问开关(默认关闭,仅私有网段) - #247
Merged
Merged
Conversation
MCP 服务默认仍只绑 127.0.0.1。开启开关后监听通配地址,但只接受 loopback / 私有 / 链路本地 / CGNAT / IPv6 ULA 对端,其余来源在读取前断开; 需要已配置 token,仍是明文 HTTP。连接配置在开启时使用局域网地址。 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Slacker-LLC
enabled auto-merge (squash)
October 18, 2026 13:06
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Merged
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.
背景
MCP 服务固定绑 127.0.0.1,电脑/其他设备无法直接用复制出的配置连接,只能 adb forward。
改动
验证
MCPServerExposureContractTest新增 4 个用例(默认回环、无 token 不能开启、关闭时拒绝非回环对端、局域网模式拒绝公网对端),MCPServerTest / MCPServerManagerTest 一并通过。🤖 Generated with Claude Code