Bridge by PLAYCITY BLOCK
Bridge 是一个 Paper 插件,用于通过小型、类型化的操作和作用域事件,将受信任的 Web 后端和其他服务器插件连接到 Minecraft。它提供了一个集成边界,而无需暴露 RCON 或任意远程控制台。
为什么使用 Bridge?
- 最小权限访问: 每个客户端都会获得其自己的凭据、操作和事件允许列表、请求速率、并发限制以及 WebSocket 连接限制。
- 后端无关的 REST API: 任何能够通过 HTTP 发送经过身份验证的 JSON 的服务器端语言或框架,都可以发现并调用允许的操作。
- 可选的实时事件: 作用域 WebSocket 端点提供类型化事件、序列号、有界重播、心跳检测和背压机制。
- JWT/JWKS 支持: 具有中央颁发者的部署可以验证短期签名访问令牌,同时将令牌范围与本地服务器允许列表进行交集处理。
- 重试安全的操作: 调用者作用域的请求 ID 可合并并发重试,并使用不同的有效负载拒绝重用。
- 仅出站网络: 可选的中继协议支持无法接受入站连接的服务器,包括已确认的事件批次和故障安全的操作处理。
- 可扩展的提供者 API: 其他 Paper 插件可以注册自己的类型化操作和事件,而 Bridge 负责认证、授权、限制、幂等性和稳定的错误处理。
- 安全默认值: 全新安装会将 HTTP 绑定到回环地址,并禁用 WebSocket、JWT、中继、指标和可变操作。
包含的功能
Bridge 包含经过身份验证的操作发现、只读玩家状态操作、带有显式世界允许列表的可选玩家传送、仅包含 UUID 的玩家加入/离开事件、隐私受限的状态信息以及可选的 Prometheus 指标。
Bridge 不是浏览器登录系统、公共 Internet API 或通用命令执行器。请尽可能将其保留在回环地址上,并在 Bridge 和远程后端之间放置 HTTPS 反向代理、VPN 或经过身份验证的服务网格。
要求
目前不支持 Folia。未声明兼容 Bukkit、Spigot 和其他服务器实现。
入门指南
- 将 Bridge JAR 文件放入 Paper 服务器的
plugins 目录中。
- 正常启动并停止服务器一次,以便 Bridge 创建
plugins/Bridge/config.yml。
- 为每个受信任的后端创建一个至少包含 32 个 UTF-8 字节的唯一令牌文件。
- 配置一个仅限所需操作和事件的作用域客户端。
- 从回环地址上的只读
minecraft.player_status 操作开始。
- 仅在部署需要时才添加 WebSocket、JWT 或出站中继。
请勿使用插件热重载工具。Bridge 在 Paper 主线程上调度 Bukkit 世界和实体工作,应通过正常的服务器启动进行加载。
许可证
Bridge 源代码、二进制文件和提供者 API 均采用 Apache License 2.0 许可。捆绑的第三方组件仍受其各自通知的约束。
Bridge by PLAYCITY BLOCK
Bridge is a Paper plugin for connecting trusted web backends and other server plugins to Minecraft through small, typed actions and scoped events. It provides an integration boundary without exposing RCON or an arbitrary remote console.
Why use Bridge?
- Least-privilege access: each client receives its own credential, action and event allowlists, request rate, concurrency limit, and WebSocket connection limit.
- Backend-neutral REST API: any server-side language or framework that can send authenticated JSON over HTTP can discover and invoke permitted actions.
- Optional real-time events: a scoped WebSocket endpoint provides typed events, sequence numbers, bounded replay, heartbeat detection, and backpressure.
- JWT/JWKS support: deployments with a central issuer can validate short-lived signed access tokens while intersecting token scopes with local server allowlists.
- Retry-safe actions: caller-scoped request IDs coalesce concurrent retries and reject reuse with a different payload.
- Outbound-only networking: an optional relay protocol supports servers that cannot accept inbound connections, including acknowledged event batches and failure-safe action handling.
- Extensible provider API: other Paper plugins can register their own typed actions and events while Bridge owns authentication, authorization, limits, idempotency, and stable error handling.
- Secure defaults: fresh installations bind HTTP to loopback and leave WebSocket, JWT, relay, metrics, and mutating actions disabled.
Included capabilities
Bridge includes authenticated action discovery, a read-only player-status action, optional player teleportation with an explicit world allowlist, player join/leave events containing only UUIDs, privacy-bounded status information, and optional Prometheus metrics.
Bridge is not a browser login system, public Internet API, or generic command executor. Keep it on loopback whenever possible and place an HTTPS reverse proxy, VPN, or authenticated service mesh between Bridge and remote backends.
Requirements
Folia is not currently supported. Bukkit, Spigot, and other server implementations are not claimed as compatible.
Getting started
- Put the Bridge JAR in the Paper server's
plugins directory.
- Start and stop the server normally once so Bridge creates
plugins/Bridge/config.yml.
- Create a unique token file of at least 32 UTF-8 bytes for each trusted backend.
- Configure a scoped client with only the actions and events it needs.
- Start with the read-only
minecraft.player_status action on loopback.
- Add WebSocket, JWT, or outbound relay only when the deployment requires it.
Do not use plugin hot-reload tools. Bridge schedules Bukkit world and entity work on the Paper primary thread and should be loaded through a normal server start.
License
Bridge source code, binaries, and the provider API are licensed under the Apache License 2.0. Bundled third-party components remain subject to their respective notices.
评论 0
登录后参与评分
还没有评论,来抢沙发吧