wildfire chat server source initial submit

This commit is contained in:
heavyrain2012
2019-03-16 17:04:23 +08:00
parent e59217bd10
commit cab3ca0916
1466 changed files with 528862 additions and 15919 deletions
+15
View File
@@ -0,0 +1,15 @@
#Generated by Git-Commit-Id-Plugin
#Sat Mar 16 16:47:17 CST 2019
git.commit.id.abbrev=80d2a9d
git.commit.user.email=[email protected]
git.commit.message.full=update\n
git.commit.id=80d2a9d1c84db6f17845c6c43de6c84e6de2a913
git.commit.message.short=update
git.commit.user.name=heavyrain.lee
git.build.user.name=heavyrain.lee
git.commit.id.describe=v0.10-411-g80d2a9d-dirty
git.build.user.email=[email protected]
git.branch=IM
git.commit.time=20190315085044
git.build.time=20190316164717
git.remote.origin.url=https\://github.com/heavyrain2012/wildfirechat.git
+130
View File
@@ -0,0 +1,130 @@
<hazelcast
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hazelcast.com/schema/config
http://www.hazelcast.com/schema/config/hazelcast-config-3.5.xsd"
xmlns="http://www.hazelcast.com/schema/config">
<group>
<!--<name>wfc-dev</name>-->
<name>wfc-pro</name>
</group>
<network>
<join>
<multicast enabled="true"/>
</join>
</network>
<!-- map eviction -->
<!-- http://docs.hazelcast.org/docs/latest-development/manual/html/Distributed_Data_Structures/Map/Map_Eviction.html -->
<map name="messages_map">
<!-- 7 days -->
<time-to-live-seconds>604800</time-to-live-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="PER_NODE">1000000</max-size>
<eviction-percentage>10</eviction-percentage>
<map-store enabled="true">
<class-name>io.moquette.persistence.MessageLoader</class-name>
<write-delay-seconds>0</write-delay-seconds>
</map-store>
</map>
<map name="groups_map">
<!-- 7 days -->
<time-to-live-seconds>604800</time-to-live-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="PER_NODE">1000000</max-size>
<eviction-percentage>10</eviction-percentage>
<map-store enabled="true">
<class-name>io.moquette.persistence.GroupLoader</class-name>
<write-delay-seconds>0</write-delay-seconds>
</map-store>
</map>
<map name="users">
<time-to-live-seconds>604800</time-to-live-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="PER_NODE">1000000</max-size>
<eviction-percentage>10</eviction-percentage>
<map-store enabled="true">
<class-name>io.moquette.persistence.UserLoader</class-name>
<write-delay-seconds>0</write-delay-seconds>
</map-store>
</map>
<map name="user_status">
<time-to-live-seconds>604800</time-to-live-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="PER_NODE">1000000</max-size>
<eviction-percentage>10</eviction-percentage>
<map-store enabled="true">
<class-name>io.moquette.persistence.UserStatusLoader</class-name>
<write-delay-seconds>0</write-delay-seconds>
</map-store>
</map>
<set name="node_ids"/>
<multimap name="user_setting">
</multimap>
<multimap name="group_members">
</multimap>
<map name="chatrooms">
<time-to-live-seconds>604800</time-to-live-seconds>
<eviction-policy>LRU</eviction-policy>
<map-store enabled="true">
<class-name>io.moquette.persistence.ChatroomLoader</class-name>
<write-delay-seconds>0</write-delay-seconds>
</map-store>
</map>
<map name="user_chatroom">
</map>
<map name="robots">
<!-- 7 days -->
<time-to-live-seconds>604800</time-to-live-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="PER_NODE">1000000</max-size>
<eviction-percentage>10</eviction-percentage>
<map-store enabled="true">
<class-name>io.moquette.persistence.RobotLoader</class-name>
<write-delay-seconds>0</write-delay-seconds>
</map-store>
</map>
<map name="things">
</map>
<multimap name="user_robots">
</multimap>
<multimap name="user_things">
</multimap>
<multimap name="chatroom_members">
</multimap>
<multimap name="user_friends">
</multimap>
<multimap name="user_friends_request">
</multimap>
<map name="channels_map">
<!-- 7 days -->
<time-to-live-seconds>604800</time-to-live-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="PER_NODE">1000000</max-size>
<eviction-percentage>10</eviction-percentage>
<map-store enabled="true">
<class-name>io.moquette.persistence.ChannelLoader</class-name>
<write-delay-seconds>0</write-delay-seconds>
</map-store>
</map>
<multimap name="channel_listeners">
</multimap>
</hazelcast>
-22
View File
@@ -1,22 +0,0 @@
##############################################
# Moquette configuration file.
#
# The synthax is equals to mosquitto.conf
#
##############################################
port 1883
websocket_port 8080
host 0.0.0.0
password_file config/password_file.conf
#false to accept only client connetions with credentials
#true to accept client connection without credentails, validating only the one that provides
allow_anonymous true
#false to prohibit clients from connecting without a clientid.
#true to allow clients to connect without a clientid. One will be generated for them.
allow_zero_byte_client_id false
-2
View File
@@ -1,2 +0,0 @@
#the password is sha256(passwd)
testuser:0d6be69b264717f2dd33652e212b173104b4a647b7c11ae72e9885f11cd312fb
+101
View File
@@ -0,0 +1,101 @@
#*********************************************************************
# Server configuration
#*********************************************************************
#服务器的接入IP。给客户端提供是${server.ip}和${http_port}。
#客户端会从${http_port}端口获取到长链接端口。
server.ip 0.0.0.0
##原生客户端长链接端口
port 1883
##客户端短链接端口
http_port 8080
##WEB客户端长链接端口
websocket_port 8083
#管理端口
http.admin.port 18080
##节点ID,当集群部署时,一定不能有重复。
node_id 1
##绑定IP,保持不变即可
host 0.0.0.0
##本地绑定端口
local_port 8080
##是否使用内置DB。0使用mysql;1使用h2db
embed.db 1
##服务器管理接口密钥
http.admin.secret_key 123456
##客户端协议栈密钥,需要与客户端协议栈文件libemqq.cc文件中的aes_key值保持一致,16进制byte用逗号分割
client.proto.secret_key 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F
#*********************************************************************
# hazelcase configuration
#*********************************************************************
hazelcast.configuration config/hazelcast.xml
#*********************************************************************
# Media server configuration
#*********************************************************************
##是否使用七牛云存储。1使用七牛;0使用内存文件服务器。
media.server.use_qiniu 0
##媒体类型分类
#Media_Type_GENERAL = 0,
#Media_Type_IMAGE = 1,
#Media_Type_VOICE = 2,
#Media_Type_VIDEO = 3,
#Media_Type_FILE = 4,
#Media_Type_PORTRAIT = 5,
#Media_Type_FAVORITE = 6
# qiniu media server configuration
qiniu.server_url http://up.qbox.me
qiniu.access_key tU3vdBK5BL5j4N7jI5N5uZgq_HQDo170w5C9Amnn
qiniu.secret_key YfQIJdgp5YGhwEw14vGpaD2HJZsuJldWtqens7i5
qiniu.bucket_general_name media
qiniu.bucket_general_domain http://pghnpyzos.bkt.clouddn.com
qiniu.bucket_image_name media
qiniu.bucket_image_domain http://pghnpyzos.bkt.clouddn.com
qiniu.bucket_voice_name media
qiniu.bucket_voice_domain http://pghnpyzos.bkt.clouddn.com
qiniu.bucket_video_name media
qiniu.bucket_video_domain http://pghnpyzos.bkt.clouddn.com
qiniu.bucket_file_name media
qiniu.bucket_file_domain http://pghnpyzos.bkt.clouddn.com
qiniu.bucket_portrait_name storage
qiniu.bucket_portrait_domain http://cdn2.wildfirechat.cn
qiniu.bucket_favorite_name storage
qiniu.bucket_favorite_domain http://cdn2.wildfirechat.cn
# local media server configuration
# 本地媒体服务器配置。
local.media.storage.root media
#*********************************************************************
# Push server configuration
#*********************************************************************
##安卓推送服务器地址
push.android.server.address http://localhost:8085/android/push
##苹果推送服务器地址
push.ios.server.address http://localhost:8085/ios/push
#*********************************************************************
# Sensitive configuration
#*********************************************************************
##文本敏感词过滤处理方法,0 发送失败;1 发送成功但消息被服务器直接丢弃;2 命中的敏感词被替换成***
sensitive.filter.type 0
#*********************************************************************
# Message forward configuration
#*********************************************************************
##消息转发地址
#message.forward.url http://localhost:8087/message/forward