Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eac6648fc0 | ||
|
|
300f9aa0e6 | ||
|
|
dd40b72ec4 | ||
|
|
556e6ad2a0 | ||
|
|
473ae32f57 | ||
|
|
d57ae2ed58 | ||
|
|
1a6907efd3 | ||
|
|
1624c470d6 | ||
|
|
5ea6eefe67 | ||
|
|
bf51cb9829 | ||
|
|
baadcac2c6 |
@@ -2,7 +2,7 @@
|
||||
野火IM是专业级的即时通讯和实时音视频整体解决方案,由北京野火无限网络科技有限公司维护和支持。
|
||||
|
||||
## 功能特性
|
||||
* 超低硬件配置要求,IM服务最低128M内存即可运行。
|
||||
* 极致地硬件利用率,IM服务最低128M内存即可运行,上不封顶。
|
||||
* 协议先进,采用MQTT+Protobuf组合,流量和性能极致优化。
|
||||
* 性能强大,专业版IM服务支持百万在线和集群部署。
|
||||
* 部署运维简单,依赖服务少,稍加配置一键启动。
|
||||
@@ -16,6 +16,7 @@
|
||||
* 高级音视频功能强大,支持9人以上的群组视频通话,支持1080P视频,支持会议模式,支持百人以上会议,支持服务器端录制。
|
||||
* 全私有部署,可不依赖任何第三方服务,完全内网部署。
|
||||
* 功能齐全,涵盖所有常见即时通讯功能。另外具有强大的可扩展能力。Demo成熟完善,基本可以做到开箱即用,也可把SDK嵌入其它应用。
|
||||
* 拥有应用开放平台,可以开发和创建自建应用,扩展您的工作台。
|
||||
* API丰富,方便与其它服务系统的对接。
|
||||
* 拥有机器人和频道功能。
|
||||
|
||||
@@ -30,11 +31,16 @@
|
||||
| [push_server](https://github.com/wildfirechat/push_server) | [push_server](https://gitee.com/wfchat/push_server) | 推送服务器,可以对接所有的系统厂商推送服务或者第三方推送服务。 |
|
||||
| [wf-minio](https://github.com/wildfirechat/WF-minio) | [wf-minio](https://gitee.com/wfchat/WF-minio) | 私有对象存储服务,用来支持野火IM专业版的文件存储。 |
|
||||
| [wf-janus](https://github.com/wildfirechat/wf-janus ) | [wf-janus](https://gitee.com/wfchat/wf-janus ) | 高级音视频媒体服务。 |
|
||||
| [open-platform](https://github.com/wildfirechat/open-platform) | [open-platform](https://gitee.com/wfchat/open-platform) | 野火开放平台服务。 |
|
||||
| [daily-report](https://github.com/wildfirechat/daily-report) | [daily-report](https://github.com/wildfirechat/daily-report) | 野火开放平台日报 demo服务。 |
|
||||
| [android-chat](https://github.com/wildfirechat/android-chat) | [android-chat](https://gitee.com/wfchat/android-chat) | 野火IM Android SDK源码和App源码。
|
||||
| [ios-chat](https://github.com/wildfirechat/ios-chat) | [ios-chat](https://gitee.com/wfchat/ios-chat) | 野火IM iOS SDK源码和App源码。
|
||||
| [pc-chat](https://github.com/wildfirechat/vue-pc-chat) | [pc-chat](https://gitee.com/wfchat/vue-pc-chat) | 基于[Electron](https://electronjs.org/)的PC 端,支持Windows、Mac、Linux(包括国产化linux系统和CPU)。 |
|
||||
| [web-chat](https://github.com/wildfirechat/vue-chat) | [web-chat](https://gitee.com/wfchat/vue-chat) | 野火IM Web 端, [体验地址](https://web.wildfirechat.cn) |
|
||||
| [wx-chat](https://github.com/wildfirechat/wx-chat) | [wx-chat](https://gitee.com/wfchat/wx-chat) | 小程序平台的Demo(支持微信、百度、阿里、字节、QQ 等小程序平台) |
|
||||
| [uni-chat](https://github.com/wildfirechat/uni-chat) | [uni-chat](https://gitee.com/wfchat/uni-chat) | UniApp平台移动端应用(使用原生插件) |
|
||||
| [uni-wfc-client](https://github.com/wildfirechat/uni-wfc-client) | [uni-wfc-client](https://gitee.com/wfchat/uni-wfc-client) | UniApp平台原生插件 |
|
||||
| [flutter_imclient](https://github.com/wildfirechat/flutter_imclient) | [flutter_imclient](https://gitee.com/wfchat/flutter_imclient) | Flutter平台原生插件 |
|
||||
| [docs](https://github.com/wildfirechat/docs) | [docs](https://gitee.com/wfchat/docs) | 野火IM相关文档,包含设计、概念、开发、使用说明,[在线查看](https://docs.wildfirechat.cn/) |
|
||||
|
||||
## 野火开发文档
|
||||
|
||||
@@ -237,6 +237,9 @@ local.media.storage.root media
|
||||
# 建议使用false
|
||||
server.multi_endpoint false
|
||||
|
||||
## 是否支持PC多端登陆,当server.multi_endpoint为true时,此开关无意义,当为false时,可以单独打开PC端多端登录。
|
||||
server.multi_pc_endpoint false
|
||||
|
||||
# 多平台连接状态通知(仅当multi_endpoint为false时有效),true时移动端可以收到pc或web端登录的通知。
|
||||
server.multi_platform_notification true
|
||||
|
||||
|
||||
+4
-4
@@ -5,7 +5,7 @@
|
||||
<relativePath>../</relativePath>
|
||||
<artifactId>wildfirechat-parent</artifactId>
|
||||
<groupId>cn.wildfirechat</groupId>
|
||||
<version>0.88</version>
|
||||
<version>0.89</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>moquette-broker</artifactId>
|
||||
@@ -27,18 +27,18 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.17.1</version>
|
||||
<version>2.17.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>2.17.1</version>
|
||||
<version>2.17.2</version>
|
||||
</dependency>
|
||||
<!--用于与slf4j保持桥接-->
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-slf4j-impl</artifactId>
|
||||
<version>2.17.1</version>
|
||||
<version>2.17.2</version>
|
||||
</dependency>
|
||||
<!-- slf4j核心包-->
|
||||
<dependency>
|
||||
|
||||
@@ -125,6 +125,7 @@ public final class BrokerConstants {
|
||||
|
||||
|
||||
public static final String SERVER_MULTI_ENDPOINT = "server.multi_endpoint";
|
||||
public static final String SERVER_MULTI_PC_ENDPOINT = "server.multi_pc_endpoint";
|
||||
public static final String SERVER_MULTI_PLATFROM_NOTIFICATION = "server.multi_platform_notification";
|
||||
public static final String SERVER_MOBILE_DEFAULT_SILENT_WHEN_PC_ONLINE = "server.mobile_default_silent_when_pc_online";
|
||||
public static final String SERVER_CLIENT_SUPPORT_KICKOFF_EVENT = "server.client_support_kickoff_event";
|
||||
|
||||
@@ -994,7 +994,7 @@ public class DatabaseStore {
|
||||
}
|
||||
sb.append(")");
|
||||
|
||||
sb.append(" and _scope = 6 and _key = ?");
|
||||
sb.append(" and _scope in (5,6,26) and _key = ?");
|
||||
|
||||
statement = connection.prepareStatement(sb.toString());
|
||||
int index = 1;
|
||||
|
||||
@@ -39,6 +39,7 @@ public class MemorySessionStore implements ISessionsStore {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MemorySessionStore.class);
|
||||
|
||||
private boolean supportMultiEndpoint = false;
|
||||
private boolean supportMultiPCEndpoint = false;
|
||||
private boolean clientSupportKickoff = false;
|
||||
|
||||
public static class Session implements Comparable<Session>{
|
||||
@@ -287,6 +288,11 @@ public class MemorySessionStore implements ISessionsStore {
|
||||
Utility.printExecption(LOG, e);
|
||||
}
|
||||
|
||||
try {
|
||||
supportMultiPCEndpoint = Boolean.parseBoolean(server.getConfig().getProperty(BrokerConstants.SERVER_MULTI_PC_ENDPOINT, "false"));
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
try {
|
||||
clientSupportKickoff = Boolean.parseBoolean(server.getConfig().getProperty(BrokerConstants.SERVER_CLIENT_SUPPORT_KICKOFF_EVENT, "false"));
|
||||
} catch (Exception e) {
|
||||
@@ -385,7 +391,12 @@ public class MemorySessionStore implements ISessionsStore {
|
||||
}
|
||||
databaseStore.clearMultiUser(username, clientID);
|
||||
|
||||
if (!supportMultiEndpoint && platform > 0) {
|
||||
if (!supportMultiEndpoint
|
||||
&& platform > 0
|
||||
&& !(platform == ProtoConstants.Platform.Platform_Windows && supportMultiPCEndpoint)
|
||||
&& !(platform == ProtoConstants.Platform.Platform_LINUX && supportMultiPCEndpoint)
|
||||
&& !(platform == ProtoConstants.Platform.Platform_OSX && supportMultiPCEndpoint)
|
||||
) {
|
||||
databaseStore.clearMultiEndpoint(username, clientID, platform);
|
||||
if (userSessions.get(username) != null) {
|
||||
Iterator<String> it = userSessions.get(username).iterator();
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>wildfirechat-parent</artifactId>
|
||||
<groupId>cn.wildfirechat</groupId>
|
||||
<version>0.88</version>
|
||||
<version>0.89</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.2</version>
|
||||
<version>2.8.9</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<!--<relativePath>../pom.xml</relativePath>-->
|
||||
<artifactId>wildfirechat-parent</artifactId>
|
||||
<groupId>cn.wildfirechat</groupId>
|
||||
<version>0.88</version>
|
||||
<version>0.89</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>distribution</artifactId>
|
||||
|
||||
@@ -232,6 +232,9 @@ local.media.storage.root ./media
|
||||
# 建议使用false
|
||||
server.multi_endpoint false
|
||||
|
||||
## 是否支持PC多端登陆,当server.multi_endpoint为true时,此开关无意义,当为false时,可以单独打开PC端多端登录。
|
||||
server.multi_pc_endpoint false
|
||||
|
||||
# 多平台连接状态通知(仅当multi_endpoint为false时有效),true时移动端可以收到pc或web端登录的通知。
|
||||
server.multi_platform_notification true
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<artifactId>wildfirechat-parent</artifactId>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
<version>0.88</version>
|
||||
<version>0.89</version>
|
||||
<name>Wildfire Chat</name>
|
||||
<description>Wildfire Chat Server</description>
|
||||
<inceptionYear>2019</inceptionYear>
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>wildfirechat-parent</artifactId>
|
||||
<groupId>cn.wildfirechat</groupId>
|
||||
<version>0.88</version>
|
||||
<version>0.89</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.2</version>
|
||||
<version>2.8.9</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.2</version>
|
||||
<version>2.8.9</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.lang.reflect.Type;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
|
||||
public class AdminHttpUtils {
|
||||
public class AdminHttpUtils extends JsonUtils {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AdminHttpUtils.class);
|
||||
|
||||
private static String adminUrl;
|
||||
@@ -152,17 +152,4 @@ public class AdminHttpUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static <T> IMResult<T> fromJsonObject(String content, Class<T> clazz) {
|
||||
Type type = TypeBuilder
|
||||
.newInstance(IMResult.class)
|
||||
.addTypeParam(clazz)
|
||||
.build();
|
||||
return new Gson().fromJson(content, type);
|
||||
}
|
||||
|
||||
private static boolean isNullOrEmpty(String str) {
|
||||
return str == null || str.isEmpty();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.lang.reflect.Type;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
|
||||
public class ChannelHttpUtils {
|
||||
public class ChannelHttpUtils extends JsonUtils {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ChannelHttpUtils.class);
|
||||
|
||||
private String imurl;
|
||||
@@ -103,18 +103,6 @@ public class ChannelHttpUtils {
|
||||
}
|
||||
}
|
||||
|
||||
private static <T> IMResult<T> fromJsonObject(String content, Class<T> clazz) {
|
||||
Type type = TypeBuilder
|
||||
.newInstance(IMResult.class)
|
||||
.addTypeParam(clazz)
|
||||
.build();
|
||||
return new Gson().fromJson(content, type);
|
||||
}
|
||||
|
||||
private static boolean isNullOrEmpty(String str) {
|
||||
return str == null || str.isEmpty();
|
||||
}
|
||||
|
||||
public String getChannelId() {
|
||||
return channelId;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package cn.wildfirechat.sdk.utilities;
|
||||
|
||||
import cn.wildfirechat.sdk.model.IMResult;
|
||||
import com.google.gson.Gson;
|
||||
import ikidou.reflect.TypeBuilder;
|
||||
|
||||
public class JsonUtils {
|
||||
|
||||
public static <T> IMResult<T> fromJsonObject(String content, Class<T> clazz) {
|
||||
TypeBuilder builder = TypeBuilder.newInstance(IMResult.class);
|
||||
if (!clazz.equals(Void.class)) {
|
||||
builder.addTypeParam(clazz);
|
||||
}
|
||||
return new Gson().fromJson(content, builder.build());
|
||||
}
|
||||
|
||||
public static boolean isNullOrEmpty(String str) {
|
||||
return str == null || str.isEmpty();
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ import java.lang.reflect.Type;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
|
||||
public class RobotHttpUtils {
|
||||
public class RobotHttpUtils extends JsonUtils {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(RobotHttpUtils.class);
|
||||
|
||||
private final String url;
|
||||
@@ -106,18 +106,6 @@ public class RobotHttpUtils {
|
||||
}
|
||||
}
|
||||
|
||||
private static <T> IMResult<T> fromJsonObject(String content, Class<T> clazz) {
|
||||
Type type = TypeBuilder
|
||||
.newInstance(IMResult.class)
|
||||
.addTypeParam(clazz)
|
||||
.build();
|
||||
return new Gson().fromJson(content, type);
|
||||
}
|
||||
|
||||
private static boolean isNullOrEmpty(String str) {
|
||||
return str == null || str.isEmpty();
|
||||
}
|
||||
|
||||
public String getRobotId() {
|
||||
return robotId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user