DynamicDNS 是一款轻量级、跨平台的 Minecraft 插件与代理扩展,即使服务器托管在动态 IP 地址上(例如没有静态 IP 的家庭服务器或 VPS 节点),也能确保子服务器保持连接并可访问。
无需单独进行端口转发、运行自定义守护进程或等待 DNS 传播延迟——地址变更会通过 Minecraft 原生网络层实时同步。
功能特性
- 免端口子服务器同步: 子服务器使用带有 HMAC-SHA256 签名的原生 Minecraft Handshake 数据包向代理发送 ping 请求(格式为
sync.v2.<name>.<port>.<signature>)。代理端无需额外开放端口或调整防火墙设置。
- HMAC-SHA256 握手验证: 通过加密握手签名验证身份真实性,避免在网络中暴露原始密钥令牌,同时无缝兼容旧版载荷。
- 代理配置持久化: 自动注册、更新并将子服务器地址直接持久化到
velocity.toml(Velocity)或 config.yml(BungeeCord)中。
- 子服务器状态与最后更新时间追踪: 显示实时注册状态,并准确记录代理端保存的
last update 时间戳。
- 支持多种 DDNS 提供商:
- Cloudflare DNS API: 自动更新根域名或子域名的
A (IPv4) 和 AAAA (IPv6) 记录,并可配置代理(橙色云朵)状态。
- DuckDNS: 即时 HTTP/HTTPS 更新,支持 IPv4 和 IPv6 双栈。
- No-IP / DynDNS v2: 使用 HTTP Basic Auth 自动更新主机名。
- Dynu DDNS: 自动更新 Dynu 域名和 SRV 记录,使用您当前的公网 IP 地址或 ngrok 主机名。
- 双栈 IPv4 & IPv6 检测: 通过冗余的全局查找服务,原生解析公网 IPv4 和 IPv6 地址。
- 内置 ngrok 隧道功能: 自动通过 ngrok TCP 隧道暴露本地服务器,并将分配的公共隧道端点传播到您的代理或 Dynu。
- 集成 Modrinth 更新检查器: 在后台异步调用 Modrinth API 检查新版本发布。
- 一体化通用 Jar 包: 一个统一的制品文件支持所有平台。
支持的平台
| 平台 |
类型 |
最低版本 |
| Velocity |
代理 |
3.x / 4.x |
| BungeeCord / Waterfall |
代理 |
1.8.8 – 26.4 |
| Paper / Purpur / Spigot / Folia |
子服务器 |
1.8.8 – 26.4 |
| Sponge |
子服务器 |
SpongeAPI 8+ (Minecraft 1.16.5+) |
工作原理
+-------------------------------------------------------------------+
| Subserver (Spigot / Paper / Sponge) |
| |
| 1. Periodically sends handshake ping: |
| virtualHost = "sync.v2.<name>.<port>.<hmac>" |
+---------------------------------+---------------------------------+
|
(Standard Minecraft Port, e.g. 25565)
v
+-------------------------------------------------------------------+
| Proxy (Velocity / BungeeCord) |
| |
| 2. Intercepts incoming handshake/ping connection |
| 3. Verifies HMAC-SHA256 signature |
| 4. Updates subserver address in proxy server registry |
| 5. Saves updated address to velocity.toml or config.yml |
| 6. Records 'last update' timestamp and drops connection |
+-------------------------------------------------------------------+
- 子服务器运行一个重复的背景任务,向代理的常规 Minecraft 地址和端口发送握手 ping。
- 载荷包含子服务器标识符、目标端口/IP,以及使用共享密钥令牌计算的 32 字符 HMAC-SHA256 签名。
- 代理使用其共享密钥验证签名。
- 代理在内存中动态更新子服务器路由,将其持久化到文件,记录代理端的
last update 时间戳,并在不代理玩家流量的情况下终止同步 ping 握手。
安装与设置
1. 代理设置(Velocity 或 BungeeCord)
- 将
DynamicDNS.jar 放入代理服务器的 plugins/ 目录。
- 启动或重启代理以生成
plugins/DynamicDNS/config.yml。
- 打开
plugins/DynamicDNS/config.yml 并启用同步:
server_sync:
enabled: true
token: "YOUR_SECRET_TOKEN" # 如果留空,将在启动时自动生成 UUID 令牌
- 复制秘密
token 以便在您的子服务器中使用。
2. 子服务器设置(Paper, Spigot 或 Sponge)
- 将
DynamicDNS.jar 放入子服务器的 plugins/ 目录(Sponge 则为 mods/ 目录)。
- 启动或重启服务器以生成
config.yml。
- 配置
plugins/DynamicDNS/config.yml:
server_sync:
enabled: true
token: "YOUR_SECRET_TOKEN" # 必须与您在代理上设置的令牌匹配
name: "survival" # 在代理上注册的服务器 ID
target_address: "proxy.host:25565" # 代理服务器的主机和端口
interval: 30 # 同步间隔(秒)
- 使用
/dynamicdns reload 重新加载配置或重启子服务器。代理将自动注册子服务器的当前 IP 和端口。
命令与权限
| 指令 |
别名 |
描述 |
权限 |
/dynamicdns status |
/ddns status |
显示当前激活的提供商钩子、已注册的子服务器以及上次更新时间戳 |
dynamicdns.status |
/dynamicdns sync |
/ddns sync |
强制立即向配置的代理发送同步 ping(仅限子服务器) |
dynamicdns.sync |
/dynamicdns reload |
/ddns reload |
重新加载 config.yml 并重启活跃的钩子 |
dynamicdns.reload |
/dynamicdns update |
/ddns update |
在 Modrinth 上检查可用的插件更新 |
dynamicdns.update |
拥有 dynamicdns.admin 权限的用户可完全访问所有指令。默认情况下,该权限会授予服务器操作员(op)或管理员。
DynamicDNS is a lightweight, cross-platform Minecraft plugin and proxy extension that keeps your subservers connected and reachable even when hosted on dynamic IP addresses (such as home servers or VPS nodes without static IPs).
No separate port forward, custom daemons or DNS propagation delays are required — address changes are synchronized in real-time directly through Minecraft's native networking layer.
Features
- Port-Free Subserver Synchronization: Subservers ping the proxy using native Minecraft Handshake packets signed with HMAC-SHA256 (
sync.v2.<name>.<port>.<signature>). No extra open ports or firewall adjustments are needed on the proxy.
- HMAC-SHA256 Handshake Verification: Cryptographic handshake signatures verify authenticity without exposing the raw secret token over the wire, with seamless backward-compatibility for legacy payloads.
- Proxy Configuration Persistence: Automatically registers, updates, and persists subserver addresses directly into
velocity.toml (Velocity) or config.yml (BungeeCord).
- Subserver Status & Last Update Tracking: Displays real-time registration status and accurate
last update timestamps recorded directly on the proxy.
- Multiple DDNS Providers:
- Cloudflare DNS API: Automated updates for root or subdomain
A (IPv4) and AAAA (IPv6) records with configurable proxy (orange cloud) status.
- DuckDNS: Instant HTTP/HTTPS updates with dual-stack IPv4 and IPv6 support.
- No-IP / DynDNS v2: Automated hostname updates using HTTP Basic Auth.
- Dynu DDNS: Updates Dynu domains and SRV records automatically with your current public IP address or ngrok hostname.
- Dual-Stack IPv4 & IPv6 Detection: Native public IPv4 and IPv6 resolution via redundant global lookup services.
- Built-in ngrok Tunneling: Automatically exposes local servers via ngrok TCP tunnels and propagates the assigned public tunnel endpoint to your proxy or Dynu.
- Integrated Modrinth Update Checker: Checks for new releases against the Modrinth API asynchronously in the background.
- All-in-One Universal Jar: One unified artifact supports all platforms.
Supported Platforms
| Platform |
Type |
Minimum Version |
| Velocity |
Proxy |
3.x / 4.x |
| BungeeCord / Waterfall |
Proxy |
1.8.8 – 26.4 |
| Paper / Purpur / Spigot / Folia |
Subserver |
1.8.8 – 26.4 |
| Sponge |
Subserver |
SpongeAPI 8+ (Minecraft 1.16.5+) |
How It Works
+-------------------------------------------------------------------+
| Subserver (Spigot / Paper / Sponge) |
| |
| 1. Periodically sends handshake ping: |
| virtualHost = "sync.v2.<name>.<port>.<hmac>" |
+---------------------------------+---------------------------------+
|
(Standard Minecraft Port, e.g. 25565)
v
+-------------------------------------------------------------------+
| Proxy (Velocity / BungeeCord) |
| |
| 2. Intercepts incoming handshake/ping connection |
| 3. Verifies HMAC-SHA256 signature |
| 4. Updates subserver address in proxy server registry |
| 5. Saves updated address to velocity.toml or config.yml |
| 6. Records 'last update' timestamp and drops connection |
+-------------------------------------------------------------------+
- The subserver runs a repeating background task sending a handshake ping to the proxy's regular Minecraft address and port.
- The payload contains the subserver identifier, target port/IP, and a 32-character HMAC-SHA256 signature calculated with the shared secret token.
- The proxy verifies the signature using its shared secret.
- The proxy updates the subserver route dynamically in memory, persists it to file, records the proxy-side
last update timestamp, and terminates the sync ping handshake without proxying player traffic.
Installation & Setup
1. Proxy Setup (Velocity or BungeeCord)
- Drop
DynamicDNS.jar into your proxy's plugins/ directory.
- Start or restart the proxy to generate
plugins/DynamicDNS/config.yml.
- Open
plugins/DynamicDNS/config.yml and enable synchronization:
server_sync:
enabled: true
token: "YOUR_SECRET_TOKEN" # If left blank, a UUID token is automatically generated on startup
- Copy the secret
token for use on your subservers.
2. Subserver Setup (Paper, Spigot or Sponge)
- Drop
DynamicDNS.jar into your subserver's plugins/ (or mods/ on Sponge) directory.
- Start or restart the server to generate
config.yml.
- Configure
plugins/DynamicDNS/config.yml:
server_sync:
enabled: true
token: "YOUR_SECRET_TOKEN" # Must match the token set on your proxy
name: "survival" # The server ID registered on the proxy
target_address: "proxy.host:25565" # Host and port of your proxy server
interval: 30 # Sync interval in seconds
- Reload the configuration with
/dynamicdns reload or restart the subserver. The proxy will automatically register the subserver's current IP and port.
Commands & Permissions
| Command |
Aliases |
Description |
Permission |
/dynamicdns status |
/ddns status |
Displays active provider hooks, registered subservers, and last update timestamps |
dynamicdns.status |
/dynamicdns sync |
/ddns sync |
Forces an immediate sync ping to the configured proxy (subserver only) |
dynamicdns.sync |
/dynamicdns reload |
/ddns reload |
Reloads config.yml and restarts active hooks |
dynamicdns.reload |
/dynamicdns update |
/ddns update |
Checks Modrinth for available plugin updates |
dynamicdns.update |
The dynamicdns.admin permission grants full access to all commands. By default, permissions are granted to server operators (op) or administrators.
评论 0
登录后参与评分
还没有评论,来抢沙发吧