Skip to content

Conversation

@EUForest
Copy link
Contributor

@EUForest EUForest commented Nov 13, 2025

🔒 IP-based Registration Control

  • New Feature: Implemented user registration restrictions based on IP addresses (ff2d3f8)
  • Enhanced system security by controlling user access based on geographic location

🧹 Account Management Enhancements

  • Cleanup: Remove accounts without verification methods (0fb92f3)
  • User Control: Added device deletion functionality for current users (3635d3e)
  • User Autonomy: Implemented user account cancellation feature (60d584a)

🔧 System Improvements

  • Subscription Management: Added functionality to retrieve expired subscriptions
  • Device Identification: Enhanced device ID retrieval from request parameters
  • Account Display Priority: Improved account display with priority: phone number > email > device ID

📡 Monitoring Enhancements

  • WebSocket Monitoring: Added real-time app online status monitoring via WebSocket connections

# Conflicts:
#	apis/public/subscribe.api
#	initialize/migrate/database/02115_ads.up.sql
#	internal/logic/auth/deviceLoginLogic.go
#	internal/logic/public/subscribe/queryUserSubscribeNodeListLogic.go
#	internal/logic/public/user/unbindDeviceLogic.go
#	internal/types/types.go
#	pkg/tool/encryption_test.go
- 移除 startsWith 函数在 if 条件中的使用
- 使用正确的 github.ref_type 判断标签推送
  Sync upstream changes from perfect-panel/server

  Includes updates from v1.0.1 to v1.2.5:
  - Currency configuration support
  - Subscribe improvements (short token, inventory check, etc.)
  - Node management enhancements
  - Database migrations
  - Bug fixes and optimizations
  Sync upstream changes from perfect-panel/server

  Includes updates from v1.0.1 to v1.2.5:
  - Currency configuration support
  - Subscribe improvements (short token, inventory check, etc.)
  - Node management enhancements
  - Database migrations
  - Bug fixes and optimizations
@EUForest EUForest force-pushed the master branch 2 times, most recently from 0d5c735 to 0bd210d Compare January 6, 2026 08:59
EUForest and others added 11 commits January 6, 2026 18:52
- Add optional short_code parameter to DeviceLoginRequest
- Add ShortCode field to Device model
- Save short_code to database during device registration
- Add database migration for user_device.short_code column
- Fix duplicate variable declaration in routes.go
- Add idx_refer_code index to improve query performance
- Prevents full table scan when validating invite codes during registration
- Add quota check in preCreateOrderLogic for order preview
- Move quota check inside transaction in purchaseLogic to prevent race condition
- Add quota check in activateOrderLogic as final safeguard when creating subscription
- Add quota check in redeemCodeLogic when redeeming codes for new subscriptions
- Fix task error handling: return actual errors instead of nil to enable retry
- Add idempotency check: skip processing for already finished orders
- Extend temp order cache: increase from 15 minutes to 24 hours
- Configure retry policy: add MaxRetry(5) for all payment callbacks (Epay, Alipay, Stripe)

This fixes the critical issue where paid orders were being lost due to:
1. Failed tasks being marked as successful and deleted from queue
2. Temporary order info expiring before queue processing
3. No retry mechanism for transient failures

Changes:
- queue/logic/order/activateOrderLogic.go: Fix error returns and add idempotency
- internal/logic/public/portal/purchaseLogic.go: Extend cache to 24 hours
- internal/logic/notify/*NotifyLogic.go: Add retry configuration
When new users register with trial subscription enabled, the subscription
link fails to connect in Clash clients. This is caused by missing cache
invalidation after transaction commit.

Changes:
- Add cache clearing after successful trial subscription creation
- Clear user subscription cache, subscription details cache, and server cache
- Modify activeTrial functions to return subscription object for cache clearing
- Apply fix to all registration methods: email, phone, device, and OAuth

This ensures subscription links work immediately after registration without
requiring manual subscription reset.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants