Git Product home page Git Product logo

iunlimit / perpetua Goto Github PK

View Code? Open in Web Editor NEW
23.0 0.0 0.0 473 KB

本项目为 OneBot 协议实现下机器人实例与用户服务间第三方消息代理中间件。通过 WebSocket 代理与额外的 WebAPI 接口,提供单一QQ账号下多端接入,事件回调、消息互通等功能实现。并配备常规流量治理功能。

Home Page: https://iunlimit.github.io/perpetua/

License: GNU Affero General Public License v3.0

Go 99.50% Makefile 0.50%
ntqq onebot qqbot

perpetua's Introduction

perpetua

icon

本项目为 OneBot 协议实现下机器人实例与用户服务间第三方消息代理中间件。通过 WebSocket 代理与额外的 WebAPI 接口,提供单一QQ账号下多端接入,事件回调、消息互通等功能实现。并配备常规流量治理功能包括服务注册发现、熔断限流、负载均衡。

[文档]

注意事项

本项目内置了NTQQ实现(Lagrange.OneBot)的分发与运行,您需自行解决签名服务器的配置问题。若您在使用时有任何疑问,随时欢迎进群咨询。Group: 863522624

适配平台

  • Linux
  • MacOS
  • Windows

协议支持

perpetua 作为服务端时,其他客户端需要使用特定的 API 通过服务发现才能使用资源。为了兼容第三方服务,perpetua 也提供了作为客户端主动提供服务资源的实现。

注意: 由于 perpetua 的设计理念,http 代理调用将不会被支持。若您在使用 Http Post 这类依赖回调触发事件的通信协议时有主动调用 API 的需求,请考虑使用其他连接方式(如 Http Post + 正向 WebSocket)实现

  • OneBot
    • 正向 WebSocket(非标准形式)
    • 反向 WebSocket
    • Http Post
  • Satori
    • WebAPI

拓展支持

  • 服务注册与发现
  • 自动重启与断点续传 (client -> NTQQ)
  • 负载均衡
  • 熔断限流

拓展实现

拓展 API
API 功能
get_ws_port 获取分配的ws端口
get_online_clients 获取当前在线客户端列表
set_restart 重启 OneBot 实现
set_client_name 设置当前客户端名称
send_broadcast_data 发送客户端广播数据
send_broadcast_data_callback 发送客户端广播数据回调

通信 SDK

语言 / 平台 名称 简介 通信协议支持
Java perpetua-sdk-for-java 官方社区实现 Java

致谢

  • 感谢原机器人社区的贡献者:†白可乐、Alan Zhao、@fred913
  • 感谢 @Thexiaoyuqaq、小豆子、阿丽塔、polar、一口小雨、黑土、仔仔 等用户在测试、策划方面提供的帮助与支持

perpetua's People

Contributors

illtamer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.