SSPanel UIM Documentation

repository·master·Indexed 27 days ago

https://github.com/anankke/sspanel-uim

A PHP-based management system for proxy services supporting Shadowsocks 2022, V2Ray, Trojan, and TUIC. It features user and node management, automated billing with gateways like PayPal and Stripe, a universal subscription interface, and LLM integration for support. Includes a CLI tool (xcat) for database migrations, configuration updates, and automated client downloads, as well as a Telegram bot for user account management and check-ins.

Tokens
2.6K
Snippets
10
Records
19
Agent score
94%

What's inside SSPanel UIM

  1. Overview of SSPanel UIM

    master
    SSPanel UIM is a PHP-based multi-purpose proxy service management system. It is designed to manage protocols such as Shadowsocks (2022), V2Ray, Trojan, and TUIC. The system provides comprehensive features for user management, node management, and financial systems.
  2. Key Features of SSPanel UIM

    master

    SSPanel UIM includes the following core capabilities:

    • Multi-Protocol Support: Supports Shadowsocks 2022, V2Ray, Trojan, and TUIC. It features a universal subscription interface that distributes in json, clash, sip008, and sing-box formats.
    • Payment System: Integrates gateways like Alipay F2F, PayPal, Stripe, and Cryptomus. Supports various billing modes including annual/monthly, pay-as-you-go, and access type billing.
    • Notification System: Built-in mail queue supporting multiple mail services. Integrates with Telegram, Discord, and Slack bots.
    • User Interface: Modern, responsive Tabler theme based on Bootstrap 5.
    • Smart Features: Deep LLM integration (OpenAI, Google AI, Anthropic) for intelligent ticket replies and document generation.
    • Operations Management: Refactored cron system where all scheduled tasks can be completed with a single command. Includes user/node management and traffic statistics.
  3. Configure client downloads in clients.json

    master

    The ClientDownload command relies on a config/clients.json file to determine which software to update. Each client entry in the clients array should include:

    • name: The identifier for the client.
    • gitRepo: The GitHub repository path (e.g., owner/repo).
    • tagMethod: Determines how to find the version. Supported values:
      • github_pre_release: Fetches the latest pre-release tag.
      • (default): Fetches the latest official release tag.
    • savePath: The local directory where files will be stored.
    • downloads: An array of download objects containing:
      • sourceName: The filename pattern on GitHub (supports %taskName%, %tagName%, and %tagName1% placeholders).
      • saveName: The filename pattern to use locally (supports %taskName%, %tagName%, and %tagName1% placeholders). If empty, sourceName is used.

    Placeholders:

    • %taskName%: The name of the client task.
    • %tagName%: The full version tag (e.g., v1.2.3).
    • %tagName1%: The version tag with the first character removed (e.g., 1.2.3).
  4. Use the /my Telegram bot command

    master

    The /my command allows users to retrieve their personal profile and account information via the Telegram bot.

    • In Private Chat: Triggers the menu command to show user options.
    • In Groups/Supergroups: Displays user traffic information and provides a check-in button (if applicable).

    Note on Group Usage: If the system configuration telegram_group_quiet is enabled, or if the chat ID does not match the configured telegram_chatid, the command will not respond in groups.

    /my
  5. Use the /checkin Telegram bot command

    master

    The /checkin command allows users to perform a daily check-in via Telegram (in private chats or authorized groups). Successful check-ins grant the user a specified amount of traffic reward.

    Behavioral Rules:

    • In Groups: The command only responds if telegram_group_quiet is disabled in the configuration and if the group's chat ID matches the configured telegram_chatid.
    • User Binding: Users must be bound to the system to use this command. If not bound, the bot returns a 'user not bound' error message.
    • Daily Limit: Users can only check in once per day. If they attempt to check in again, the bot notifies them that they have already checked in today.
    • Rewards: Upon successful check-in, the bot issues a traffic reward and notifies the user of the amount received (e.g., 获得了 X MB 流量).
  6. Use the /ping Telegram command to retrieve IDs

    master

    The /ping command is used to test connectivity and retrieve unique identifiers for users or groups.

    • In Private Chat: Returns 'Pong!' and the User's ID.
    • In Groups/Supergroups: Returns 'Pong!', the User's ID, and the Group's ID (provided that the telegram_group_quiet configuration setting is not enabled).

    Note: The command uses Markdown parsing for private messages.

    /ping
  7. Use the /start Telegram bot command

    master

    The /start command initializes the bot session. Its behavior depends on the chat type and the system configuration:

    • Private Chats: The bot responds with a message instructing the user to 发送 /help 获取帮助 (Send /help to get help).
    • Groups/Supergroups: The bot responds with a ? (question mark) if the telegram_group_quiet configuration setting is not enabled. If telegram_group_quiet is enabled, the bot remains silent in groups.

    In both cases, the bot simulates a 'typing' action before responding.

    /start
  8. Use the /help Telegram bot command

    master

    The /help command displays a list of all available commands within the system. It can be used in both private chats and group chats.

    Behavioral Notes:

    • Group Chats: If the configuration telegram_group_quiet is enabled, the command will not respond in groups or supergroups.
    • Command Triggering: The command can be triggered via /help or by including the bot's username (e.g., /help @YourBotName). If help_any_command is enabled in the configuration, the bot may respond to other command patterns as well.
    • Output Format: The bot replies with a Markdown-formatted list containing the command name and its description.
  9. Environment variables for ClientDownload

    master

    The following environment variables control the behavior of the ClientDownload command:

    VariableDescription
    github_access_tokenGitHub personal access token used to authenticate API requests to GitHub, helping to bypass rate limits.
    enable_r2_client_downloadIf set, the command will upload downloaded files to Cloudflare R2 using Cloudflare::uploadR2 and then remove the local file.
  10. Reference the xcat Migration command arguments

    master

    The Migration command accepts the following arguments for the [version] parameter:

    ├─=: php xcat Migration [版本]
    │ ├─ <version> - 迁移至指定版本(前进/退回)
    │ ├─ latest    - 迁移至最新版本
    │ ├─ new       - 导入全新数据库至最新版本