Skip to content

Woisol/RemoteCommand_Client

Repository files navigation

Remote Command Client

只是一个结合 CSer(仓库脱敏中,暂时私有)的实现高拓展性远程命令的 Flutter 客户端。

✨ 主要功能

  • 动态命令列表:从服务器动态获取支持的命令列表 (query-commands)。
  • 命令分类与选项:支持带有子选项的命令(例如“打开应用” -> “Edge”, “Sunshine”)。
  • 实时反馈:发送命令后通过 Toast 提示执行结果。
  • 配置管理:支持自定义远程服务器地址 (remoteURL) 并持久化存储。
  • 美观的 UI:使用 Material Design 3 风格,包含流畅的动画效果。

🛠️ 技术栈

  • Flutter: UI 框架
  • http: 用于发送网络请求
  • shared_preferences: 用于本地存储配置信息
  • fluttertoast: 显示操作反馈
  • animations: 页面切换和交互动画

🚀 快速开始

前置要求

  • Flutter SDK (推荐 3.5.2 及以上)
  • Dart SDK

安装依赖

flutter pub get

运行应用

# 运行在连接的设备或模拟器上
flutter run

构建

# 构建 Android APK
flutter build apk

# 构建 Windows 应用
flutter build windows

⚙️ 配置说明

  1. 启动应用后,默认连接地址为 woisol-pc
  2. 进入 设置 (Setting) 页面。
  3. 修改 Remote URL 为你的服务端地址(例如 192.168.1.100:8080)。
  4. 返回主页,点击刷新按钮即可获取最新的命令列表。

📝 协议格式

客户端与服务端交互基于简单的 HTTP GET 请求:

  1. 获取命令列表

    • 请求:GET {remoteURL}/query-commands
    • 响应:JSON 格式的命令列表。
      [
        {
          "title": "打开应用",
          "baseCommand": "open-app",
          "options": ["Edge", "Sunshine"]
        },
        {
          "title": "Ping",
          "baseCommand": "ping",
          "options": []
        }
      ]
  2. 执行命令

    • 请求:GET {remoteURL}/{baseCommand}/?option={option}

📄 License

该项目仅个人使用,保留所有权利。

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors