How juewuy/shellcrash works
Main Components
• User Interaction Layer: Represent the shell/CLI interface through which a user interacts with ShellCrash. Indicate the installation scripts (install.sh) and startup scripts (e.g., scripts/start.sh, scripts/menu.sh).
• Script Orchestration Module: Group all the management scripts (under scripts/) that control tasks like initialization, periodic updates, and service management (e.g., scripts/task.sh, scripts/webget.sh).
• Clash & Clashpre binaries
• Singbox and Singboxp binaries
• Dashboard binaries (for the local web panel management)
• Meta and Fix binaries
• Configuration and Rules Engine: Include the “rules” directory that stores configuration files, rule sets for different modes (routing, native, etc.), and providers (both for Clash and Singbox). This component is key for dynamic configuration management.
• Geodata Component: Represent the “bin/geodata” folder which holds IP, DNS, and geo-location data files, critical for rule application in proxy management.
• Public Assets: The “public” directory providing additional resources, like lists (fake_ip_filter.list, servers.list, etc.) which might be used for real-time configuration update or fallback strategies.
• Automated CI/CD & Maintenance: Illustrate that GitHub workflows (in the .github/workflows/ folder) drive auto-updates, releases, and dependency maintenance. This shows how changes propagate from repository updates to deployment packages.
Relationships and Interactions
• That the User Interaction Layer triggers execution of the management scripts.
• The Script Orchestration Module calls the appropriate binaries from the Binary Repository and also applies configuration files from the Rules and Geodata components.
• The configuration files (including online provider configurations) affect the behavior of the binaries (Crash, Clash, Singbox).
• The Web Panel (dashboard) interacts with the binary dashboard and reflects operational status.
• CI/CD workflows (GitHub Actions) automatically update binaries and metadata, which in turn update the public binaries and configuration files.
Architectural Patterns
• Modular Design: Components are clearly separated – for instance, binaries are distinct from configuration files and from orchestration scripts.
• Dynamic Updates & Extensibility: The system supports online updates and configurations, so highlight pipelines from remote repositories (triggered by GitHub workflows) feeding into the binaries and rule provider modules.
• Multi-Platform Support: Emphasize that binaries are packaged for various architectures (amd64, arm, mips, etc.) which are organized under separate subdirectories within the “bin.”
Incorporate Relevant Technologies and Frameworks
• Use of shell scripting as the core technology.
• GitHub Actions for CI/CD.
• The built-in web panel (dashboard) for online configuration management.
• Use of compressed archives (tar.gz files) for distributing binaries.