🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] ## Tinode 简介 ` `即时消息服务器。纯[Go](http://golang.org/)(授权[GPL 3.0](http://www.gnu.org/licenses/gpl-3.0.en.html))的后端,Java,Javascript和Swift的客户端绑定以及对C ++,C#,Go,Java,Node,PHP,Python,Ruby,Objective-C等的[gRPC](https://grpc.io/)客户端支持。(许可证[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0))。有线传输是通过websocket进行JSON传输(也可以进行长时间轮询)的自定义绑定,或者是带有gRPC的[protobuf](https://developers.google.com/protocol-buffers/)。持久存储[RethinkDB](http://rethinkdb.com/),MySQL和MongoDB(实验性)。还存在第三方不受支持的[DynamoDB适配器](https://github.com/riandyrn/chat/tree/master/server/db/dynamodb)。可以通过编写自定义适配器来支持其他数据库。 Tinode*不是*XMPP / Jabber。它与XMPP*不*兼容。它是XMPP的替代品。从表面上看,它很像开源的WhatsApp或Telegram。 ## Tinode Doc [Tinode-server-github](https://github.com/tinode/chat) [Tin-android-github](https://github.com/tinode/tindroid) [Tin-ios-github](https://github.com/tinode/ios) [Tinode server API.md](https://github.com/tinode/chat/blob/master/docs/API.md) ## 使用Docker部署 可以使用docker命令 一键安装 ``` $ docker network create tinode-net \ && docker run --name mysql --network tinode-net --restart always --env MYSQL_ALLOW_EMPTY_PASSWORD=yes -d mysql:5.7 \ && docker run -p 6060:6060 -d --name tinode-srv --network tinode-net tinode/tinode-mysql:latest ``` ## Ubuntu使用二进制安装Tinode 参考链接:[https://rethinkdb.com/docs/install/](https://rethinkdb.com/docs/install/) 选择使用rethinkdb,安装rethinkdb ``` source /etc/lsb-release && echo "deb https://download.rethinkdb.com/repository/ubuntu-$DISTRIB_CODENAME $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list wget -qO- https://download.rethinkdb.com/repository/raw/pubkey.gpg | sudo apt-key add - sudo apt-get update sudo apt-get install rethinkdb rethinkdb --bind all --daemon ``` 安装tinode-rethinkdb ``` wget https://github.com/tinode/chat/releases/download/v0.16.6/tinode-rethinkdb.linux-amd64.tar.gz \ && tar -zxvf tinode-rethinkdb.linux-amd64.tar.gz \ && ./init-db -data=data.json \ && nohup ./tinode -config=tinode.conf -static_data=static & ``` **演示站点**: [http://192.168.84.241:6060/](http://192.168.84.241:6060/) **测试账号**: | 账号 | 密码 | | --- | --- | | alice | alice123 | | bob | bob123 | | carol | carol123 | | dave | dave123 | | frank | frank123 | ## 项目截图 ## [安卓系统](https://github.com/tinode/tindroid/) ![](https://github.com/tinode/chat/raw/master/docs/android-contacts.png) ![](https://github.com/tinode/chat/raw/master/docs/android-chat.png) ![](https://github.com/tinode/chat/raw/master/docs/android-account.png) ## [iOS](https://github.com/tinode/ios) ![](https://github.com/tinode/chat/raw/master/docs/ios-contacts.png) ![](https://github.com/tinode/chat/raw/master/docs/ios-chat.png) ![](https://github.com/tinode/chat/raw/master/docs/ios-acc-personal.png) ## [桌面网站](https://github.com/tinode/webapp/) ![](https://github.com/tinode/chat/raw/master/docs/web-desktop-2.png) ## 使用的技术 - go - mysql - mongodb ## 主要功能 * 多种平台: * [安卓系统](https://github.com/tinode/tindroid/) * [iOS](https://github.com/tinode/ios) * [web](https://github.com/tinode/webapp/) * 可编写脚本的[命令行](https://github.com/tinode/chat/blob/master/tn-cli) * 一对一的消息传递。 * 群组消息传递,每个成员的访问权限均单独管理。成员的最大数量是可配置的(默认为128)。 * 带故障转移的分片群集。 * 具有各种操作权限的灵活访问控制。 * 服务器为人员,小组对话生成的状态通知。 * 支持自定义身份验证后端。 * 各种编程语言的绑定: * 没有外部依赖关系的Javascript。 * 依赖[Jackson](https://github.com/FasterXML/jackson)和[Java-Websocket的Java](https://github.com/TooTallNate/Java-WebSocket)。适用于Android,但没有Android SDK依赖项。 * Swift依赖于[SwiftWebSocket](https://github.com/tidwall/SwiftWebSocket)。 * 使用[gRPC的](https://grpc.io/docs/languages/)C / C ++,C#,Python,PHP,Ruby和其他语言。 * Websocket,长轮询以及[基于](https://grpc.io/)TCP或Unix套接字的[gRPC](https://grpc.io/)。 * JSON或[protobuf版本3](https://developers.google.com/protocol-buffers/)有线协议。 * 带有[Letsencrypt](https://letsencrypt.org/)或常规证书的可选内置[TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security)。[](https://letsencrypt.org/) * **用户搜索/发现。** * 消息的丰富格式,markdown样式:\* style \*→**style**。 * 内联图像和文件附件。 * 适用于聊天机器人的表单和模板化响应。 * 消息状态通知:消息传递到服务器;接收和阅读通知;键入通知。 * 支持客户端数据缓存。 * 能够阻止服务器端不必要的通信。 * 匿名用户(对于与聊天中的技术支持有关的用例很重要)。 * 使用[FCM](https://firebase.google.com/docs/cloud-messaging/)或[TNPG](https://github.com/tinode/chat/blob/master/server/push/tnpg)推送通知。 * 使用本地文件系统或Amazon S3对大对象(例如视频文件)进行存储和带外传输。 * 扩展功能的插件,例如,启用聊天机器人。