为了方便管理Swarm bee大量节点以及减少用户的对节点的学习成本,计划提供一款BS架构的《Swarm分布式节点管理系统》,Agent部分负责与bee节点交互,代码开源,防止用户担心自己服务器私钥安全问题。Client客户端部分通过https和RSA+混淆与Agent进行加密通信,用户无需了解Swarm技术细节,通过界面操作即可完成bee节点管理以及相关的数据操作与聚合分析展示

Swarm-Agent

开源地址:稍后补充

代码依赖库

  1. [cpp-httplib] https://github.com/yhirose/cpp-httplib
  2. [spdlog] https://github.com/gabime/spdlog
  3. [nlohmann-json] https://github.com/nlohmann/json
  4. [args]https://github.com/Taywee/args
  5. [libuv]https://github.com/libuv/libuv
  6. [BigInt]https://github.com/faheel/BigInt

编译依赖库

分别clone完代码后执行

mkdir -p build
cd build/
cmake .. -DBUILD_TESTING=ON
sudo make install

运行依赖

sudo apt-get update
sudo apt-get install libuv1.dev

运行Agent

#!/usr/bin/env bash
echo "Start Agent"
ipaddr=$(ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:")

nohup ./bin/bee_agent -u 2 -k 4bdf4bf5513a833b9db7e110ddfd53c2a1bd86fe --nHost 127.0.0.1 --nPort 1635 --dHost ${ipaddr} --dPort 8888 --uis 60 --aHost 172.18.0.190 --aPort 8086 >./bee_agent.log 2>&1 &

Swarm-Server