FunMC eb6e901440 fix: 修复客户端中继协议 + 全平台房间详情/分享
关键修复:
- RelayClient: 二进制头部改为FUNMC_JOIN:roomId|playerName|password协议
- RelayClient: 等待服务端OK:CONNECTED/ERROR:*握手响应
- rooms:join: 先连接中继再启动本地代理, 传入playerName和password
- 连接失败自动cleanup

Web管理面板:
- 房间详情弹窗: 点击房间卡片打开
- 玩家列表 + 踢出功能 (UserX图标)
- 复制房间号 / 删除房间按钮

Mobile:
- 房间详情底部弹窗 (Modal slide)
- 在线玩家列表
- 分享房间号 (Share API)
- 复制房间号
- apiClient.getRoomDetail 方法
2026-02-23 08:26:25 +08:00

FunConnect - Minecraft 联机平台

一个支持多节点中继的 Minecraft 联机平台让玩家无需公网IP即可轻松联机。

本仓库包含 三个独立项目,覆盖全平台客户端和服务端。

支持平台

平台 类型 项目
Windows 桌面客户端 (NSIS 安装包) client/
macOS 桌面客户端 (DMG, x64/arm64) client/
Linux 桌面客户端 (AppImage/deb) client/
iOS 移动客户端 mobile/
Android 移动客户端 (APK/AAB) mobile/
Ubuntu 中继服务器 + Web 管理面板 server/

项目结构

FunConnect/
├── server/        # 服务端(中继服务器 + Web 管理面板 + 部署脚本)
├── client/        # 桌面客户端Electron: Windows / macOS / Linux
└── mobile/        # 移动客户端React Native + Expo: iOS / Android

服务端 (server/)

中继服务器 + Web 管理面板,部署在 Ubuntu 服务器上。

  • TCP 中继引擎 - 转发 Minecraft 流量,支持 Java 版和基岩版
  • 多节点集群 - 主节点 + 工作节点架构,水平扩展
  • 房间系统 - 创建/加入/密码保护/过期清理
  • 流量监控 - 实时统计各房间流量
  • Token 认证 - 保护写操作 API
  • Web 管理面板 - React + TailwindCSS 可视化管理
  • 一键部署 - Ubuntu 自动安装脚本 + systemd 服务
cd server && npm install && cp .env.example .env && npm run dev

📖 server/README.md · 📦 部署教程 DEPLOY.md

桌面客户端 (client/)

Electron 跨平台桌面客户端,支持 Windows / macOS / Linux。

  • 本地代理 - 自动建立 TCP 代理MC 添加 127.0.0.1:25566 即可联机
  • 设置持久化 - 记住服务器地址、玩家名等偏好
  • 系统托盘 - 最小化到托盘后台运行
cd client && npm install && npm run dev          # 开发
npm run dist:win    # 打包 Windows
npm run dist:mac    # 打包 macOS
npm run dist:linux  # 打包 Linux

📖 client/README.md

移动客户端 (mobile/)

React Native + Expo 移动客户端,支持 iOS / Android。

  • 房间管理 - 浏览/搜索/创建/加入联机房间
  • 设置持久化 - 记住服务器地址和玩家名
  • 深色 UI - Minecraft 风格暗色主题
cd mobile && npm install && npm start            # 开发Expo
eas build --platform android --profile preview   # 构建 Android APK
eas build --platform ios --profile production     # 构建 iOS

📖 mobile/README.md

架构

┌──────────────────┐
│  桌面客户端        │  Windows / macOS / Linux
│  Electron         │  TCP 本地代理
│  client/          │─────────┐
└──────────────────┘          │
                              ▼
┌──────────────────┐   ┌──────────────────────────┐
│  移动客户端        │   │     中继服务器 (Ubuntu)     │
│  React Native    │──►│  TCP 中继 + REST API       │
│  mobile/          │   │  Web 管理面板 (React)      │
└──────────────────┘   └──────────────────────────┘
                              ▲
┌──────────────────┐          │
│  Minecraft        │─────────┘
│  游戏客户端        │  TCP 直连中继
└──────────────────┘

License

MIT

Description
No description provided
Readme MIT 734 KiB
Languages
TypeScript 52.9%
Rust 27.2%
Shell 6.7%
PowerShell 4.2%
CSS 3.7%
Other 5.2%