394 Commits

Author SHA1 Message Date
Chang lue Tsen
ec4e95451b fix(log): insert reset traffic log during subscription activation 2025-08-21 10:53:12 -04:00
Chang lue Tsen
fcdb9f72ef fix(log): add traffic reset logging for subscription resets 2025-08-21 10:35:40 -04:00
Chang lue Tsen
7c707f2ecf fix(login): remove debug logs and error logging during user login process 2025-08-21 09:18:14 -04:00
Chang lue Tsen
70815c0d50 fix(log): remove unused Id field from SystemLog during login log insertion 2025-08-21 09:15:37 -04:00
Chang lue Tsen
38706c0b29 fix(email): set EmailTypeVerify in task payload and update content type conversion for verification email 2025-08-21 09:07:48 -04:00
Chang lue Tsen
5e903868c4 fix(log): change MessageLog list to use value type for improved performance and memory efficiency 2025-08-21 08:49:13 -04:00
Chang lue Tsen
c04923015e fix(types): change Content field type in MessageLog to interface{} for improved flexibility 2025-08-21 08:24:30 -04:00
Chang lue Tsen
87c771bbd4 refactor(log): consolidate logging models and update related logic for improved clarity and functionality 2025-08-20 13:36:06 -04:00
Chang lue Tsen
4f32d67113 fix(email): convert RegisterStartTime and RegisterEndTime to time.Time for accurate query filtering 2025-08-20 08:22:48 -04:00
Chang lue Tsen
bc1e6315a8 fix(subscribe): rename variable for clarity and add special handling for Stash user agent 2025-08-18 02:54:00 -04:00
Chang lue Tsen
3a98616093 fix(subscribe): update Id field tag to use primaryKey and improve model queries 2025-08-18 02:33:17 -04:00
Chang lue Tsen
41c51fbbff fix(subscribe): update Id field tag to use primaryKey and improve save method query 2025-08-18 02:30:35 -04:00
Chang lue Tsen
3bb83edf05 fix(subscribe): update delete method to use Where clause for improved query accuracy 2025-08-18 02:09:15 -04:00
Chang lue Tsen
245f347d22 refactor(swagger): remove deprecated app.json check from swagger configuration 2025-08-17 12:39:17 -04:00
Chang lue Tsen
70a0fd96ab refactor(swagger): remove deprecated app.json generation from swagger configuration 2025-08-17 12:37:27 -04:00
Chang lue Tsen
8996a62b54 refactor(api): remove deprecated application-related endpoints and types 2025-08-17 12:14:55 -04:00
Chang lue Tsen
14a86c50b2 feat(subscribe): add user agent limit configuration to system settings 2025-08-17 11:52:14 -04:00
Chang lue Tsen
5d80d95568 fix(subscribe): improve error handling and logging for subscription requests 2025-08-17 10:01:12 -04:00
41423ca666 fix: 修复订阅列表查询逻辑并更新Dockerfile配置
修复订阅列表查询中服务器组为空时的处理逻辑,避免潜在错误
在getSubscribeListLogic.go中添加服务器数量统计功能
更新Dockerfile添加logs目录拷贝
清理ppanel.yaml配置文件中的合并冲突和冗余配置
2025-08-17 04:28:32 -07:00
Chang lue Tsen
6580cc9d44 feat(subscribe): implement user agent limit feature with configurable list 2025-08-16 13:37:09 -04:00
Chang lue Tsen
4f2aafd8b2 refactor(subscribe): replace V2 handler with a unified Handler method for subscription logic 2025-08-16 12:59:28 -04:00
Chang lue Tsen
81a46d1f13 feat(panDomain): update subscription logic to use V2 handler for improved functionality 2025-08-16 06:18:44 -04:00
Chang lue Tsen
2dfb1030e1 refactor: rename queryannouncementhandler.go to queryAnnouncementLogic.go for clarity 2025-08-15 14:58:01 -04:00
Chang lue Tsen
2be1c4f6ed feat(subscription): enhance subscription cache management and improve error handling 2025-08-15 14:45:54 -04:00
Chang lue Tsen
740dd48763 feat(subscribe): update subscription route to use V2 handler 2025-08-15 13:05:36 -04:00
Leif Draven
41d660bb9e
Develop (#64)
* fix(database): correct name entry for SingBox in initialization script

* fix(purchase): update gift amount deduction logic and handle zero-amount order status

* feat: add type and default fields to rule group requests and update related logic

* feat(rule): implement logic to set a default rule group during creation and update

* fix(rule): add type and default fields to rule group model and update related logic

* feat(proxy): enhance proxy group handling and sorting logic

* refactor(proxy): replace hardcoded group names with constants for better maintainability

* fix(proxy): update group selection logic to skip empty and default names

* feat(proxy): enhance proxy and group handling with new configuration options

* feat(surge): add Surge adapter support and enhance subscription URL handling

* feat(traffic): implement traffic reset logic for subscription cycles

* feat(auth): improve email and mobile config unmarshalling with default values

* fix(auth) upbind email not update

* fix(order) discount set default 1

* fix(order) discount set default 1

* fix: refactor surfboard proxy handling and enhance configuration template

* fix(renewal) discount set default 1

* feat(loon): add Loon configuration template and enhance proxy handling

* feat(subscription): update user subscription status based on expiration time

* fix(renewal): update subscription retrieval method to use token instead of order ID

* feat(order): enhance order processing logic with improved error handling and user subscription management

* fix(order): improve code quality and fix critical bugs in order processing logic

- Fix inconsistent logging calls across all order logic files
- Fix critical gift amount deduction logic bug in renewal process
- Fix variable shadowing errors in database transactions
- Add comprehensive Go-standard documentation comments
- Improve log prefix consistency for better debugging
- Remove redundant discount validation code

* fix(docker): add build argument for version in Docker image build process

* feat(version): add endpoint to retrieve application version information

* fix(auth): improve user authentication method logic and update user cache

* feat(user): add ordering functionality to user list retrieval

* fix(RevenueStatistics) fill list

* fix(UserStatistics) fill list

* fix(user): implement user cache clearing after auth method operations

* fix(auth): enhance OAuth login logic with improved request handling and user registration flow

* fix(user): implement sorting for authentication methods based on priority

* fix(user): correct ordering clause for user retrieval based on filter

* refactor(user): streamline cache management and enhance cache clearing logic

* feat(logs) set logs volume in develop

* fix(handler): implement browser interception to deny access for specific user agents

* fix(resetTraffic) reset daily server

* refactor(trojan): remove unused parameter and clean up logging in slice

* fix(middleware): add domain length check and improve user-agent handling

* fix(middleware): reorder domain processing and enhance user-agent handling

* fix(resetTraffic): update subscription reset logic to use expire_time for monthly and yearly checks

* fix(scheduler): update reset traffic task schedule to run daily at 00:30

* fix(traffic): enhance traffic reset logic for subscriptions and adjust status checks

* fix(activateOrder): update traffic reset logic to include reset day check

* feat(marketing): add batch email task management API and logic

* feat(application): implement CRUD operations for subscribe applications

* feat(types): add user agent limit and list to subscription configuration

* feat(application): update subscription application requests to include structured download links

* feat(application): add scheme field and download link handling to subscribe application

* feat(application): add endpoint to retrieve client information

* feat(application): move DownloadLink and SubscribeApplication types to types.api

* feat(application): add DownloadLink and SubscribeClient types, update client response structure

* feat(application): remove ProxyTemplate field from application API

* feat(application): implement adapter for client configuration and add preview template functionality

* feat(application): move DownloadLink type to types.api and remove from common.api

* feat(application): update PreviewSubscribeTemplate to return structured response

* feat(application): remove ProxyTemplate field from application API

* feat(application): enhance cache key generation for user list and server data

* feat(subscribe): add ClearCache method to manage subscription cache invalidation

* feat(payment): add Description field to PaymentMethodDetail response

* feat(subscribe): update next reset time calculation to use ExpireTime

* feat(purchase): include handling fee in total amount calculation

* feat(subscribe): add V2SubscribeHandler and logic for enhanced subscription management

* feat(subscribe): add output format configuration to subscription adapter

* feat(application): default data

---------

Co-authored-by: Chang lue Tsen <tension@ppanel.dev>
Co-authored-by: NoWay <Bob455668@hotmail.com>
2025-08-15 12:30:21 -04:00
e898e6afbe init 2025-08-12 07:52:04 -07:00
a52c7142ee feat: 添加在线设备统计功能并优化订阅相关逻辑
- 在DeviceManager中添加GetOnlineDeviceCount方法用于获取在线设备数
- 在统计接口中增加在线设备数返回
- 优化订阅查询逻辑,增加服务组关联节点数量计算
- 添加AnyTLS协议支持及相关URI生成功能
- 重构邀请佣金计算逻辑,支持首购/年付/非首购不同比例
- 修复用户基本信息更新中IsAdmin和Enable字段类型不匹配问题
- 更新数据库迁移脚本和配置文件中邀请相关配置项
2025-08-12 07:46:45 -07:00
2e01ba0e3d ci(docker): 更新Docker工作流和配置
清理Go模块缓存并移除go.sum文件
更新Docker网络名称和数据库连接配置
2025-08-10 00:28:32 -07:00
25db7ea428 chore(deploy): 更新GITEA_RUNNER_NAME为ubuntu-latest 2025-08-09 08:32:09 -07:00
e37ad50410 ci: 将linux作业的运行环境从vpn改为ubuntu-latest 2025-08-09 08:17:36 -07:00
c503e06c9c ci(workflow): 将linux作业的运行环境改为vpn
避免使用公共runner以提高构建安全性
2025-08-09 08:00:12 -07:00
0992c2ad7b ci(docker): 更新Docker工作流以包含构建步骤
添加checkout步骤并使用环境变量进行认证
包含构建Linux可执行文件的步骤
2025-08-09 07:18:58 -07:00
e78b93d6fb ci: 移除不必要的检出步骤 2025-08-09 07:13:25 -07:00
79020ccea0 1 2025-08-09 06:55:11 -07:00
8a8ece76b1 ci: 将Linux构建任务运行环境从vpn改为ubuntu-latest 2025-08-09 06:26:21 -07:00
0316345e9f ci: 将linux job的运行环境从vpn-runner改为vpn 2025-08-09 06:25:23 -07:00
b56b1240f3 ci(workflow): 将linux job的运行环境改为vpn-runner并移除build-linux步骤 2025-08-09 06:23:30 -07:00
77b3af8015 init 2025-08-09 05:18:44 -07:00
634f43d644 fix: 更新MySQL和Redis的连接地址为具体IP
将MySQL和Redis的连接地址从服务名称改为具体IP地址,以便在特定网络环境下能够正确连接
2025-08-05 10:37:47 -07:00
e5b4dc75d7 fix(deploy): 更新docker-compose配置和数据库连接地址
- 在docker-compose中添加时区环境变量
- 将MySQL和Redis连接地址从localhost改为服务名
- 更新Makefile中的docker compose命令语法
2025-08-05 10:12:29 -07:00
40b8c07036 chore: 在docker-run命令中添加当前工作目录打印 2025-08-05 10:00:07 -07:00
b261ddeeb1 ci(docker): 更新Docker工作流,添加构建步骤并注释发布步骤
添加应用构建步骤以确保镜像包含最新代码
暂时注释发布步骤以进行本地测试
2025-08-05 09:52:27 -07:00
62f07b7f6b ci(docker): 移除构建应用的步骤并修复docker-compose命令
移除docker.yml中冗余的go mod tidy和build-linux步骤,这些步骤已在其他流程中处理
将docker compose命令改为docker-compose以兼容旧版本
2025-08-05 09:46:27 -07:00
31a2aa0e84 ci(workflow): 优化Docker工作流配置并简化步骤
- 添加DOMAIN环境变量以替代硬编码的域名
- 简化git克隆流程,使用凭证存储提高安全性
- 移除不必要的SSH文件复制步骤
- 添加构建和发布Docker镜像的详细日志输出
2025-08-05 09:24:13 -07:00
7965c33790 ci(docker): 更新Gitea工作流以使用容器化构建环境
将Linux作业改为在golang容器中运行,简化Go环境设置步骤
移除不必要的SSH步骤,优化构建流程
2025-08-05 09:22:37 -07:00
fcae874fd2 ci: 移除不再需要的Node.js安装步骤 2025-08-05 09:20:50 -07:00
dad83339c1 ci(docker): 更新Gitea工作流配置并优化构建步骤
- 使用标准actions/checkout@v4替代自定义checkout
- 添加Go环境设置步骤并启用缓存
- 优化SSH action使用标准appleboy/ssh-action
- 调整工作空间路径变量为github标准
2025-08-05 09:18:32 -07:00
84842ec3dd ci(docker): 添加 Node.js 设置步骤以支持前端构建 2025-08-05 09:16:06 -07:00
59bc008b69 ci(docker): 更新SSH action的版本引用
使用明确的版本号v1替代隐式引用,提高工作流的稳定性
2025-08-05 09:13:06 -07:00