# wang95/fxw architecture

> Architecture diagram of the GitHub repository wang95/fxw, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wang95/fxw
- Repository: https://github.com/wang95/fxw

## Overview

##### Main Components
- FxW as the central repository containing all the configurations.
- Three primary nodes for each supported proxy tool:
- Clash: Contains multiple YAML configuration files (e.g., CFW-v0.10.4-bak.yaml, Clash-config.yaml, cfw-settings.yaml) and a “ruleset” directory that holds various YAML files (like OpenAI.yaml, PayPal.yaml, etc.).
- QuantumultX: Contains its own configuration files (QuantumultX.conf, Js.conf) along with subdirectories such as “filter” (lists for Apple, OpenAI, and more) and “script” (e.g., VSCO-unlock.js).
- Surge: Has its own configuration file (Surge-v4.conf), along with several subdirectories:
- “module”: Includes individual modules (e.g., Apple_Geo_Services.sgmodule, YouTube-AdBlock.sgmodule) and a nested “panel” subdirectory with additional scripts and configurations.
- “ruleset”: Contains various rule list files.
- “script”: Keeps individual Surge scripts.

##### Relationships Between Components
- At the top level, show the FxW repository as the central “hub.”
- Within each branch, illustrate associations such as:

##### Architectural Patterns and External Dependencies
- Reusability and modularity:
- The separation by proxy tool shows a modular design, where each module or ruleset can be maintained independently.
- Common elements among these configurations (e.g., similar naming patterns of rule files) that may suggest standardized filters and scripts across different platforms.
- Also denote external dependencies from the README:

## Diagram (Mermaid)

```mermaid
graph TD
    F["FxW – Configuration Repository"]:::external
    ER["External Resources"]:::external

    F -->|"has_proxy_config"| C["Clash"]:::external
    F -->|"has_proxy_config"| Q["QuantumultX"]:::external
    F -->|"has_proxy_config"| S["Surge"]:::external
    F -->|"depends_on"| ER

    subgraph "Clash"
        direction TB
        C_Config["Configuration Files"]:::config
        C_Rules["Rulesets"]:::rules
        C_Config --> C_CF1["CFW-v0.10.4-bak.yaml"]:::config
        C_Config --> C_CF2["Clash-config.yaml"]:::config
        C_Config --> C_CF3["cfw-settings.yaml"]:::config
        C_Rules --> CR["ruleset (directory)"]:::rules
    end

    subgraph "QuantumultX"
        direction TB
        Q_Config["Configuration Files"]:::config
        Q_Filter["Filter Lists"]:::rules
        Q_Scripts["Scripts"]:::scripts
        Q_Config --> Q_CF1["QuantumultX.conf"]:::config
        Q_Config --> Q_CF2["Js.conf"]:::config
        Q_Filter --> Q_FilterDir["filter (directory)"]:::rules
        Q_Scripts --> Q_Script["VSCO-unlock.js"]:::scripts
        Q_Scripts --> Q_Icon["icon (directory)"]:::scripts
    end

    subgraph "Surge"
        direction TB
        S_Main["Main Configuration"]:::config
        S_Modules["Modules"]:::modules
        S_Rules["Rulesets"]:::rules
        S_Scripts["Scripts"]:::scripts
        S_Main --> SMS["Surge-v4.conf"]:::config
        S_Modules --> SM["module (directory)"]:::modules
        S_Modules --> S_Panel["Module Panel (directory)"]:::modules
        S_Rules --> SR["ruleset (directory)"]:::rules
        S_Scripts --> SS["script (directory)"]:::scripts
    end

    C --> C_Config
    C --> C_Rules

    Q --> Q_Config
    Q --> Q_Filter
    Q --> Q_Scripts

    S --> S_Main
    S --> S_Modules
    S --> S_Rules
    S --> S_Scripts

    %% Click Events
    click F "https://github.com/wang95/fxw/tree/master/Repository Root"
    click C_CF1 "https://github.com/wang95/fxw/blob/master/Clash/CFW-v0.10.4-bak.yaml"
    click C_CF2 "https://github.com/wang95/fxw/blob/master/Clash/Clash-config.yaml"
    click C_CF3 "https://github.com/wang95/fxw/blob/master/Clash/cfw-settings.yaml"
    click CR "https://github.com/wang95/fxw/tree/master/Clash/ruleset"
    click Q_CF1 "https://github.com/wang95/fxw/blob/master/QuantumultX/QuantumultX.conf"
    click Q_CF2 "https://github.com/wang95/fxw/blob/master/QuantumultX/Js.conf"
    click Q_FilterDir "https://github.com/wang95/fxw/tree/master/QuantumultX/filter"
    click Q_Script "https://github.com/wang95/fxw/blob/master/QuantumultX/script/VSCO-unlock.js"
    click Q_Icon "https://github.com/wang95/fxw/tree/master/QuantumultX/icon"
    click SMS "https://github.com/wang95/fxw/blob/master/Surge/Surge-v4.conf"
    click SM "https://github.com/wang95/fxw/tree/master/Surge/module"
    click S_Panel "https://github.com/wang95/fxw/tree/master/Surge/module/panel"
    click SR "https://github.com/wang95/fxw/tree/master/Surge/ruleset"
    click SS "https://github.com/wang95/fxw/tree/master/Surge/script"

    %% Styles
    classDef external fill:#f0f0f0,stroke:#000,stroke-width:2px;
    classDef config fill:#add8e6,stroke:#000,stroke-width:2px;
    classDef rules fill:#90ee90,stroke:#000,stroke-width:2px;
    classDef scripts fill:#ffa07a,stroke:#000,stroke-width:2px;
    classDef modules fill:#dda0dd,stroke:#000,stroke-width:2px;
```
