Răsfoiți Sursa

提交代码

lip 3 luni în urmă
părinte
comite
2fc35e844f
5 a modificat fișierele cu 118 adăugiri și 196 ștergeri
  1. 72 0
      LICENSE
  2. 0 147
      README.en.md
  3. 46 44
      example.env
  4. 0 3
      start_for_win.bat
  5. 0 2
      vendor/.gitignore

+ 72 - 0
LICENSE

@@ -0,0 +1,72 @@
+Apache License 
+Version 2.0, January 2004 
+http://www.apache.org/licenses/
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License"); 
+you may not use this file except in compliance with the License. 
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software 
+distributed under the License is distributed on an "AS IS" BASIS, 
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+See the License for the specific language governing permissions and 
+limitations under the License.

+ 0 - 147
README.en.md

@@ -1,147 +0,0 @@
-[简体中文](./README.md) | English 
-
-# Instant Messaging
-
-### Introduce
-Raingad-IM is an open source instant communication demo, which needs to be used together with the front and back ends. It is mainly used for learning and communication, and provides you with the development ideas of instant communication. Many functions need to be developed by itself, and the original intention of development is to quickly establish the internal communication system, Intranet communication and community communication.
-
-|  type | url |
-| --------- | ---- |
-| Front-end source code    | https://gitee.com/raingad/im-chat-front |
-| Back-end source code | https://gitee.com/raingad/im-instant-chat |
-| Web Demo | http://im.raingad.com/index.html |
-| H5 Demo | http://im.raingad.com/h5 |
-
-
-Dmeo account:13800000002  password:123456
-
-The ending number can be modified to 2、3、4......18、19、20 
-
-Dmeo account:13800000020  password:123456 
-
-### Supported features
-
--Supports single chat and group chat, and supports sending emoticons, images, voice, video, and file messages
--Single chat supports displaying the status of messages that have been read but not read, and displaying online status
--Group chat creation, deletion, group member management, group announcements, group bans, etc
--Support for top contacts and message privacy;
--Support for setting new message sound reminders and browser notifications
--Support administrator to recall group member messages
--Support group members cannot add friends to each other
--Supports one-on-one audio and video calls (connected to both web and mobile devices, not supported by mini programs)
--Supports online preview of files, images, and most media files
--Support for mobile devices (H5, APP, and mini programs, some functions are not compatible)
--New support for enterprise mode and community mode, with community mode supporting registration and adding friends functions
--The app supports online and offline push of single chat messages (requires self application for unipush service)
--Support simple backend management, including user management, group management, system settings, etc
-
-
-### Software architecture
-
-Back-end technology stack:`thinkphp6+workerman+redis`
-
-Front-end technology stack:`vue2+Lemon-IMUI+element-UI`
-
-
-### Installation
-
-> Due to the particularity of instant messaging, it is strictly prohibited to use the source code for Trojan horses, viruses, pornography, gambling, fraud and other industries in violation of local laws and regulations, as well as to engage in criminal activities, such as the use of this software for illegal activities, will be reported to the relevant departments and assist the relevant administrative law enforcement agencies to check!
-
-> The installation program needs to have some experience in PHP and server operation and maintenance, if not, please join the communication group to contact the author, the author provides paid deployment services!
-
-#### Preparatory work
-You need to install the running environment first. The BAOTA server is recommended. The LNMP architecture is recommended. The following software needs to be installed:
-
-|  environment | version | remark | Recommended |
-| --------- | ---- | ---- | ---|
-| linux(centOS)    | >= 7.0 |  The following versions were not tested   | 7.9 |
-| nginx    | >= 1.17 |     | latest |
-| php | >= 7.1 |  incompatible php8    | 7.3 |
-| mysql    | >= 5.7 | Must be 5.7 and above     | 5.7 |
-| redis    | >= 5.0 |     | 7.0 |
-
-**Important operation**
-
-1. PHP needs to install an extension : `redis` `fileinfo`
-
-2. PHP needs to undisable the function : `shell_exec` `chown` `exec` `putenv` `proc_open` `pcntl_exec` `pcntl_alarm` `pcntl_fork` `pcntl_waitpid` `pcntl_wait` `pcntl_signal` `pcntl_signal_dispatch`
-
-#### Source code download
-Download the full source code and put it on your own server. Take a look at the  [(releases)](https://gitee.com/raingad/im-instant-chat/releases) at the top of the gitee project home page and download the latest release in the distribution.
-
-#### Start installation
-1. Create a website by pointing the site's running directory to the 'public' directory in the project root.
-
-
-
-2. Enable pseudo-static and set the reverse proxy, the following only shows the pseudo-static and reverse proxy configuration of nginx, Apache is not supported for the time being.
-
-
-``` 
-location ~* (runtime|application)/{
-	return 403;
-}
-location / {
-	if (!-e $request_filename){
-		rewrite  ^(.*)$  /index.php?s=$1  last;   break;
-	}
-}
-
-#Reverse proxy port 8282, no modification required
-
-location /wss
-    {
-      proxy_pass http://127.0.0.1:8282;
-      proxy_http_version 1.1;
-      proxy_set_header Upgrade $http_upgrade;
-      proxy_set_header Connection "Upgrade";
-      proxy_set_header X-Real-IP $remote_addr;
-    }
-```
-
-3. If you have a domain name and want to use services such as audio and video calls and voice messaging, you also need to configure a certificate to enable HTTPS. You can use a free 'Let's Encrypt' certificate. If you don't need these services, you can directly use the HTTP protocol, but the functionality will be limited.
-   
-4. Access your IP or domain name to enter the custom installation wizard.
-   
-
-#### If installation fails
-1.  Enter  `public\sql\database.sql`  to import the database into your own database.
-
-2.  Enter the project root directory, modify  `example.env` to `.env` , and modify the corresponding database parameters. **Please carefully read the configuration instructions in env**.
-
-> if you want to save chat files to oss, you need to configure them in the background. Do not modify the environment configuration files after configuration.
-
-### Start the message push service
-As the chat software requires the use of WebSocket, we need to start Workerman. The system has already built-in the corresponding service, and you can run the service from the backend management homepage ( **accessible from the bottom-left corner after logging in with an administrator account** ). If the backend service fails to start successfully, you need to perform the following debugging steps:
-
-**Reasons for system service startup failure**:
-
-1. If you have started the `php think worker:gateway start` or `php start.php start` commands in the terminal, please run `killall -9 php` in the terminal or restart the server before running again.
-
-2. It could be that PHP is not the default version. Execute `php -v` in the terminal to check if the version number is inconsistent with the selected PHP version when creating the website. If inconsistent, you need to modify the website's version to the default PHP version and install the corresponding dependencies and remove disabled functions for PHP.
-
-3. It could be due to insufficient directory permissions for execution. Reset all directory permissions to `755` for user `www` and try again.
-
-**If the startup fails, you can perform debugging**
-
-4. Enter the project root directory to run `php think worker:gateway start`, or run `php start.php start` to run the message service. Do not use `- d` during testing. Under windows, run the `start_for_ win.bat` file in the root directory directly. Since there are many restrictions on the use of Workerman under Windows, it is recommended to use Linux system in formal environment, while windows system is only recommended for development environment.
-
-5. The message service needs to release port 8282. If you need to modify it, please modify the corresponding parameters in the `WORKER` section of the environment configuration file. For windows users, please modify port 8282 in [`app\worker\start_gateway.php`]. The port number needs to be changed according to the situation.
-   
-6. The system uses the domain name as the address of the websocket service directly, so it needs to configure the proxy in the nginx of the website and listen to port 8282. The parameters of the proxy configuration have been written in the pseudo-static.
-
-7. For more information about the use of workerman, please visit [workerman official website](https://www.workerman.net/) official website.
-
-8. After the deployment, the password for the administrator account is: `administrator``123456`, and the management entry is located in the lower left corner of the chat interface.
-
-### Install deployment Services
-
-The author provides the installation services of the system, including the back-end and front-end deployment to the online, to ensure the perfect operation of the project, 200 yuan per time, the installation service can provide detailed installation tutorials and interface documents, if necessary, you can contact the author!
-
-### QQ Communication group
-If you have any questions, please leave a message or join our QQ group!
-
-It's not easy to create. Click a star.
-
-[QQ Communication group:1031495465](https://qm.qq.com/q/RgHdvLGiMk)
-

+ 46 - 44
example.env

@@ -1,22 +1,48 @@
-APP_DEBUG = true
+APP_DEBUG = false
 
 [APP]
-NAME = IM
+NAME = KeFu
 LOGO = 
-# 如果安卓和ios不同步更新,请到/config/version.php中单独设置版本号
-VERSION = 6.1.0
-RELEASE = 20250916
-# 主域名必填,例如:https://im.example.com
-HOST = 
+
+# 接口域名
+HOST = "https://kefuapi.sp2509.cc"                                      #【必须修改】
 DEFAULT_TIMEZONE = Asia/Shanghai
-#开放api的开关
+ID = cBR8Ze9Y
+SECRET = 11a665c58268ae2b674d8d9308910448
 API_STATUS = true
-#开放api接口的配置信息
-ID = a1b2c3d4e5f
-SECRET = 1234sddsc56ssdfghjkl
 
-#google翻译
-GOOGLE_KEY = 'AIzaSyCQmhmpEIm0ysoTznbm1NrDASovMxhmeSc'
+#数据库配置
+[DATABASE]
+TYPE = mysql
+HOSTNAME = 127.0.0.1
+DATABASE = kefu                                                           #【必须修改】
+USERNAME = kefu                                                           #【必须修改】
+PASSWORD = AJhNFAQK5AwNdJtw                                               #【必须修改】
+HOSTPORT = 3306
+CHARSET = utf8mb4
+DEBUG = false
+prefix = la_
+[LANG]
+default_lang = zh-cn
+
+#redis配置
+[REDIS]
+HOST = 127.0.0.1
+PORT = 6379
+PASSWORD =
+PREFIX = kefu_
+
+#google翻译的配置
+GOOGLE_KEY = 'AIzaSyCQmhmpEIm0ysoTznbm1NrDASovMxhmeSc'                    #【必须修改】
+GOOGLE_SDK_PHP_LOGGING=true
+
+#视频封面截取配置,需要单独安装,宝塔安装默认地址为/www/server/ffmpeg/ffmpeg-6.1
+[FFMPEG]
+BIN_PATH = /www/server/ffmpeg/ffmpeg-6.1                                  #【必须修改】 
+
+# 如果安卓和ios不同步更新,请到/config/version.php中单独设置版本号
+VERSION = 6.2.0
+RELEASE = 20251204
 
 # thinkapi的令牌,目前只用于敏感词过滤,其他接口自行接入
 THINKAPI_TOKEN =
@@ -36,40 +62,16 @@ WIN_WEBCLIP =
 #mac下载地址
 MAC_WEBCLIP = 
 
-[DATABASE]
-TYPE = mysql
-HOSTNAME = 127.0.0.1
-DATABASE = im
-USERNAME = root
-PASSWORD = My01020304
-HOSTPORT = 3306
-CHARSET = utf8mb4
-DEBUG = true
-prefix = yu_
-[LANG]
-default_lang = zh-cn
-
-[REDIS]
-HOST = 127.0.0.1
-PORT = 6379
-PASSWORD =
-PREFIX = 
-
-视频封面截取配置,需要单独安装,宝塔安装默认地址为/www/server/ffmpeg/ffmpeg-6.1
-[FFMPEG]
-BIN_PATH = /www/server/ffmpeg/ffmpeg-6.1
-
 [AES]
-TOKEN_KEY = tHTisd8USApxsdfnhTM
-LOGIN_KEY = t2fe6HddMnmssswDVi2
-#最是自定义自己能记的,不要太长,不要太短,不要太简单,不要太复杂,不要太难记,一旦确定之后就不需要再修改。否者无法解析聊天记录,开启后聊天记录不可被搜索
-CHAT_KEY  =
+TOKEN_KEY = rl6F4xHuDwGqJCt0dfGBDbu4leex9zq2
+LOGIN_KEY = cHowhXpUP4mRzLcgVRAKnkAOR0ku8cxr
+#最好是自定义自己能记的,不要太长,不要太短,不要太简单,不要太复杂,不要太难记,一旦确定之后就不需要再修改。否者无法解析聊天记录,开启后聊天记录不可被搜索
+CHAT_KEY  = 
 
 [JWT]
-SECRET = 17b190sdfcxw321f94f57325ae5a8b4c
+SECRET = 041de22f7d0e1ef7c62be4d6ecb0152f
 TTL = 2592000
 
-
 [WORKER]
 NAME = businessWorker
 PORT = 8282
@@ -86,9 +88,9 @@ REGISTER_DEPLOY = true
 # 自带预览系统URL,主要用于预览媒体文件,已内置,必须要有最后的/斜杠
 own=
 # 永中云文件预览,主要用于文档预览,必须要有最后的/斜杠
-yzdcs=http://domain/
+yzdcs= 
 # 永中云api code
-keycode=17444844212312
+keycode=
 
 [UNIPUSH]
 # unipush的云函数转url地址,主要用于推送

+ 0 - 3
start_for_win.bat

@@ -1,3 +0,0 @@
-CHCP 65001
-php app\worker\start_register.php app\worker\start_gateway.php app\worker\start_businessworker.php
-pause

+ 0 - 2
vendor/.gitignore

@@ -1,2 +0,0 @@
-*
-!.gitignore