Wildfire IM is a professional-grade instant messaging and real-time audio and video overall solution, maintained and supported by Beijing Wildfire Infinite Network Technology Co., Ltd.
The main features are: private deployment is safe and reliable, powerful performance, complete functions, full platform support, high open source rate, simple deployment and operation and maintenance, friendly secondary development, easy to connect with third-party systems or embed into existing systems. Please refer to the online documentation for details.
It mainly includes the following projects:
| GitHub repository address (main site) | Code Cloud Warehouse Address (Mirror) | illustrate | Remark |
|---|---|---|---|
| im-server | im-server | IM Server | |
| android-chat | android-chat | Wildfire IM Android SDK source code and App source code | It can be easily developed or integrated into existing applications |
| ios-chat | ios-chat | Wildfire IM iOS SDK source code and App source code | It can be easily developed or integrated into existing applications |
| pc-chat | pc-chat | PC side developed based on Electron | |
| web-chat | web-chat | Wildfire IM web end, experience address | |
| wx-chat | wx-chat | Demo of the mini program platform (supports mini program platforms such as WeChat, Baidu, Alibaba, Byte, QQ, etc.) | |
| app server | app server | Application server | |
| robot_server | robot_server | Robot server | |
| push_server | push_server | Push server | |
| docs | docs | Wildfire IM related documents, including design, concept, development, and instructions, view online |
As a demonstration of the back-end application of Wildfire IM, this project has the following functions:
This project is a demo project. When using it, it is necessary to transplant the corresponding functions into your application services. If you need to use it directly, please follow the instructions below to resolve the performance bottleneck problem.
mvn clean package
Packaging will generate Java packages and deb installation packages. If you need rpm installation packages, please uncomment the plugin of the rpm package in pom.xml . In addition, rpm is required to be installed locally, which is easy to install in Linux or Mac systems. cygwin and rpm are required to be installed on Windows systems. Please check the specific information on Baidu.
After modification, run the compilation command mvn clean package , and the rpm package is generated in target directory.
The application uses Tencent Cloud SMS function, and you need to apply for the three parameters appid/appkey/templateId and configure it in tencent_sms.properties . Users can also change to their favorite text message providers themselves. In the absence of a SMS provider, superCode can be used for testing. After setting up, the client can log in directly using superCode . When online, be sure to delete superCode .
This demonstration service has 4 configuration files in the project's config directory, namely application.properties , im.properties , aliyun_sms.properties and tencent_sms.properties . Please put the configuration correctly in the config directory in the directory where the jar package is located.
sms.verdorinapplication.propertiesconfiguration decides which SMS service provider to use, 1 is Tencent SMS and 2 is Alibaba Cloud SMS
Find app-XXXX.jar in target directory, put the jar package and config directory where the configuration file is placed, and then execute the following command:
java -jar app-XXXXX.jar
This service initially only provides the function of obtaining tokens, and later gradually added functions such as group announcements/Shiro, and needs to be introduced into the database. In order to improve the convenience of the user experience, the database H2 was introduced, allowing users to run directly without installing any software (JRE is still required). In addition, the shiro session is also stored in the h2 database. While improving convenience, it leads to performance bottlenecks on the one hand, and on the other hand, it cannot be horizontally expanded and highly available. Therefore, it is necessary to use this project and make two modifications.
application.properties file to switch methods.Version 0.40 introduces the shiro function. Before upgrading this service, you need to ensure that the client has introduced the mobile client when or after the release of version 0.40 of this project. And after upgrading, the client needs to log out and log in again to save the session (disconnect is called when logging out, and the false value is required, so that the historical chat history can be retained by logging in again. It must be changed to this in the new version). If it is an old version or is not logged in again, the group announcement and scanning code login functions will not be available. For system security, an upgrade is recommended.
Version 0.43 changes the short polling of Web and PC login to long polling. If the application service upgrade requires corresponding modifications to the Web and PC.
0.45.1 The wfc.all_client_support_ssl switch is added to the configuration file. When upgrading to this version or later, this switch needs to be added to the configuration file.
Version 0.51 has added token authentication. Token and cookies authentication can be supported at the same time. The client has also made corresponding modifications and gives priority to token use. Pay attention to compatibility.
Starting from version 0.53, the data is stored in the database. Therefore, the application service is a stateless service, and multiple application services can be deployed for high availability and horizontal expansion. It is necessary to note that the data is stored in the database. If the number of users is large or the business volume is relatively large, you can open the application service yourself and add the redis cache.
There will be a limited frequency of requests for the same IP in the service. By default, an IP can be requested 200 times per hour. It can be adjusted according to your actual situation (you can find it by searching for the rateLimiter string). If you use nginx as a reverse proxy, you need to pay attention to passing the user's real IP (using X-Real-IP or X-Forwarded-For) to avoid not being able to obtain the real IP and thus affecting normal use.
UNDER MIT LICENSE. See the LICENSE file for details
Please refer to the instructions to use Alibaba Cloud SMS