How legiz-ru/mihomo-rule-sets works
Project Type and Purpose
• This is an open-source “rule-sets” repository for Mihomo (clash-meta) and related proxy/VPN tools.
• It doesn’t implement a running service or UI—it hosts static rule files (.mrs binary sets and .yaml definitions) organized by category (ru-bundle, oisd, re-filter, other).
File-Structure Analysis
• Top-level directories:
• .github/workflows: CI definitions (jsDelivr.yml, main.yml)
• ru-bundle, oisd, re-filter, other: Each contains rule-set sources (.yaml) and prebuilt binaries (.mrs)
• examples: sample YAML usages
• README.md: usage instructions and metadata
• No “src” or server code—content-only repository.
• Workflows indicate an automated build/publish pipeline, pushing to GitHub raw URLs and external CDN.
Main Components
a. Source Code & Rule Definitions
• GitHub Repo
• Directories: ru-bundle, oisd, re-filter, other (source YAML + checked-in .mrs)
b. CI/CD Pipeline
• GitHub Actions (main.yml builds .mrs, jsDelivr.yml publishes to CDN)
c. Artifact Storage & Distribution
• GitHub raw URLs (raw.githubusercontent.com)
• jsDelivr CDN endpoints
d. Consumers
Component Interactions and Data Flow
• Developer Commit → triggers GitHub Actions
• Actions → compile or validate rule files → output .mrs binaries
• Actions → push artifacts to GitHub (committed .mrs or GitHub Releases)
• jsDelivr Workflow → mirrors files to CDN
• End-User Clients → fetch rule-sets from raw GitHub URLs or jsDelivr
• Clients apply rules in their proxy/VPN pipelines
Architectural Patterns and Principles
• “Content Pipeline” pattern: source → build → publish → consume
• Infrastructure-as-Code: workflows themselves are code in the repo
• CDN distribution for global performance and availability
• Immutable artifacts (.mrs binaries) to ensure consistency
Relevant Technologies
• GitHub (version control + raw file hosting)
• GitHub Actions (CI/CD)
• jsDelivr (public CDN)
• YAML (rule definitions) + custom binary format (.mrs)
• Mihomo/Clash/Vpnbot clients consuming HTTP rule-providers