1 Star 6 Fork 2

程序员阿鑫/基于IOS短信接码平台

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

基于IOS短信接码平台

前言

作者:程序员阿鑫(博客:www.cxyax.com

警告:切勿做违法用途,仅供学习交流~ 转载请标注出处,请遵守开源协议!

一、介绍

img.png

本项目基于IOS快捷指令的特性实现,通过快捷指令的http请求,实现短信验证码的发送和接收。

1.1、适用场景

  1. 朋友间账号共享(视频会员、网盘会员、做图网站会员等)
  2. 账号租借服务
  3. SMS租借服务
  4. 等其他场景等你来发现~

1.2、功能介绍

  • 登录注册
    • 注册发送邮箱验证码核实邮箱
    • 登录验证码,防止脚本登录
  • 验证码接收
    • websocket监听,实时接收短信
    • 权限验证,防止越权监听验证码
  • 个人中心
    • 开启/关闭/重置/查看/复制 ticket秘钥功能,保证用户分享短信安全
    • 个人头像修改
    • 退出登录
  • 后台管理
    • 用户管理
    • SMS类型管理
    • 短信历史
    • 权限管理
    • 短信统计(今日接码数量、7日接码次数)

1.3、页面展示

初代版本,无PC后端,仅管理端 img.png

1.4、预计后续版本功能

以下功能均为预估,可能会出现在后续开源版本,也可能会在付费版本中实现

  • 邮件订阅短信验证码
    • 验证码来了之后可以直接推送到注册邮箱,或者直接推送到手机号
  • 增加短信验证
    • 注册接收验证码,绑定手机号
  • 增加会员制功能
    • 付费模式,短信数量限制
  • 优化验证码接收组概念
    • 细化短信组,目前是所有短信一起接收,仅展示最新的
  • 优化管理端
    • 优化操作流程,设置开关等,可进行自由配置
  • 个人中心升级
    • 修改个人资料,邮箱、手机号换绑,密码修改等操作
  • 在线升级功能
    • 新版本发布自动推送并在同意授权直接覆盖更新,无需重新安装app

1.5、项目目录介绍

com.cxyax.receive.verification.code
├── annotation            // 自定义注解处理
├── bean                 // Spring Bean配置
├── common               // 通用工具类,如Redis前缀
├── config               // 配置类,包括MVC、WebSocket等
├── controller           // 控制层,处理前端请求
├── convert              // 数据转换层,实现DTO和Entity的转换
├── entity               // 实体类定义
├── enums                // 枚举类,定义字段通用枚举
├── exception            // 异常处理类,定义项目特定异常
├── handler              // 处理器,如WebSocket和全局异常处理
├── interceptor          // 拦截器,如JWT令牌、SQL拦截
├── mapper               // MyBatis Mapper接口,数据库操作定义
├── model                // 数据模型定义,包括DTO和VO
├── service              // 服务层接口及其实现,业务逻辑处理
├── utils                // 工具类,包括邮件、密码、JWT等处理
├── resources            // 资源文件,配置文件和MyBatis映射文件
│   ├── application-dev.yml    // 开发环境配置
│   ├── application-prod.yml   // 生产环境配置
│   ├── application.yml        // 应用主配置
│   ├── mapper                 // MyBatis映射文件
│   ├── static                 // 静态资源,如头像
│   └── templates              // 邮件模板
└── test                // 测试类,包括WebSocket测试

二、核心技术栈

类别 依赖 版本 说明
Java版本 Java 1.8 使用Java 8作为开发语言
Spring Boot spring-boot-starter-web 2.7.6 用于构建Web应用程序的Spring Boot启动器
MyBatis mybatis-spring-boot-starter 2.3.0 提供MyBatis整合的Spring Boot启动器
MyBatis Plus mybatis-plus-boot-starter 3.5.2 MyBatis的增强工具MyBatis Plus
邮件 spring-boot-starter-mail 提供邮件发送功能的Spring Boot启动器
Thymeleaf spring-boot-starter-thymeleaf 提供Thymeleaf模板引擎的Spring Boot启动器
Redis spring-boot-starter-data-redis 提供Redis数据访问的Spring Boot启动器
Lombok lombok 1.18.24 自动化处理getter/setter等代码生成的库
JWT java-jwt 4.0.0 Auth0的Java实现的JWT处理库
Fastjson2 fastjson2 2.0.46 阿里巴巴的快速JSON处理库
Guava guava 32.0.1-jre Google的核心库,提供集合处理等功能
Hutool hutool-all 5.8.20 一个Java工具类库,涵盖了很多常用的API
MapStruct mapstruct 1.5.5.Final 数据转换工具,用于DTO和Entity之间的映射
Knife4j knife4j-openapi2-spring-boot-starter 4.4.0 为Spring Boot应用提供Swagger增强UI界面
WebSocket spring-boot-starter-websocket 支持WebSocket的Spring Boot启动器

这些依赖和配置为项目提供了Web开发、数据处理、邮件发送、模板渲染、JSON处理、数据缓存和WebSocket通信等功能。

三、安装教程

此处安装文档仅提供粗略的介绍,更详细的使用说明请见文档!

3.1、前提条件

本站使用宝塔面板的进行部署,请您检查以下环境:

  • JDK 1.8+
  • MySQL 5.7+
  • Nginx
  • Redis
  • HBuilder X工具

若您没有宝塔面板,则自行安装宝塔!

Q:为什么使用宝塔?

A:宝塔更适合小白上手,不用繁琐的敲命令进行配置。

3.2、步骤

3.2.1、jar包上传服务器并外置配置文件

jar包在 'api'目录下,包括数据库 文件名称为:application.yml (于项目根目录下) img_1.png

#下面这些内容是为了让MyBatis映射
#指定Mybatis的Mapper文件
mybatis:
  mapper-locations: classpath:mapper/*xml
  #指定Mybatis的实体目录
  type-aliases-package: com.cxyax.receive.verification.code.entity
# 应用服务 WEB 访问端口
server:
  port: 8080
#数据库连接
spring:
  datasource:
    url: jdbc:mysql://localhost:3306/数据库名称?useUnicode=true&characterEncoding=utf-8&useSSL=false
    username: 数据库用户名
    password: 数据库密码
    driver-class-name: com.mysql.cj.jdbc.Driver
  #redis配置
  redis:
    host: localhost
    port: 6379
    password: '' # redis密码,可不填
    database: 0
  #邮箱配置(如果你的邮箱不是QQ邮箱,请从网络自行查询发件地址、端口等信息)
  mail:
    host: smtp.qq.com
    port: 465
    username: 你的邮箱地址
    password: 发件邮箱密码
    protocol: smtp
    properties:
      mail:
        smtp:
          auth: true
          starttls:
            enable: true
            required: true
          ssl:
            enable: true
  jackson:
    # 序列化设置
    default-property-inclusion: always
  web:
    resources:
      static-locations: classpath:/static/,file:./uploads/
#mybatis-plus配置
mybatis-plus:
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  mapper-locations: classpath:mapper/*.xml
  global-config:
    db-config:
      id-type: auto
#自定义配置
ypjh:
  path:
    fileType: jpg,png,jpeg,mp4,pdf,doc,docx
    # 配置文件上传目录
    upload: ./uploads
#日志配置
logging:
  level:
    com.cxyax.receive.verification.code: INFO
    com.app.mapper: DEBUG

3.2.2. 在宝塔面板打开网站——Java项目——添加Java项目

img.png

3.2.3.选择打包好的jar包目录,有域名绑域名,点击确定即可

img.png 如果前端是部署在微信,那么需要强制HTTPS访问,则需要部署完成后去设置SSL证书。

3.2.4.运行前端

后端运行起来后该运行前端文件了,将common/apiUtil.js的httpUrl更改为你的域名或者ip 前端可以直接运行,无需npm install,具体打包事宜请自行搜索

3.2.5.配置快捷指令

img.png 打开快捷指令 — 选择【自动化】— 新建【自动化】— 信息包含输入你想要监听的类型(具体看图)— 选择立即运行 — 点击完成

  • 创建流水线
  • 选择【匹配】输入 \d{4,}
  • 然后选择【获取URL内容】输入标准接口地址,比如:“http://你的ip或域名:端口(有就填,根据你自己情况来)/codelist/receiveCode?code=【选择变量 匹配 的内容】&ticket=【在软件个人中心开启后复制】” img.png 提示:如果ticket泄露可以进行重置,点击小眼睛才能复制ticket

如果你不会或嫌复杂,可以咨询我

四、交流群

请加我好友,拉你进群(微信扫描即可) img.png

五、开源协议

Apache Licence 2.0 (英文原文) Apache Licence是著名的非盈利开源组织Apache采用的协议。该协议和BSD类似,同样鼓励代码共享和尊重原作者的著作权,同样允许代码修改,再发布(作为开源或商业软件)。 需要满足的条件如下: 需要给代码的用户一份Apache Licence 如果你修改了代码,需要在被修改的文件中说明。 在延伸的代码中(修改和有源代码衍生的代码中)需要带有原来代码中的协议,商标,专利声明和其他原来作者规定需要包含的说明。** 如果再发布的产品中包含一个Notice文件,则在Notice文件中需要带有Apache Licence。你可以在Notice中增加自己的许可,但不可以表现为对Apache Licence构成更改。 Apache Licence也是对商业应用友好的许可。使用者也可以在需要的时候修改代码来满足需要并作为开源或商业产品发布/销售。

六、用户权益

允许免费用于学习、毕设、公司内部使用、私活等,但请保留源码作者信息。 对未经过授权和不遵循 Apache 2.0 协议二次开源或者商业化我们将追究到底。 参考请注明:参考自 IOS-Message:https://gitee.com/cxyax/ios-message

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.

简介

一款基于IOS快捷指令使用Java开发的接码平台,有账号校验能分配验证码接收权限,保障验证码安全,开发此项目纯属自用,切勿做非法用途 展开 收起
README
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cxyax/ios-message.git
git@gitee.com:cxyax/ios-message.git
cxyax
ios-message
基于IOS短信接码平台
master

搜索帮助