# william-hunter/acl4ssr architecture

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

- Interactive diagram: https://gitdiagram.com/william-hunter/acl4ssr
- Repository: https://github.com/william-hunter/acl4ssr

## Overview

##### Project type and purpose
- This is an open-source configuration repository for SSR/Clash/Quantumult/Trojan proxy clients. It provides ad-blocking and GFW bypass rule sets (ACLs) and “rule fragments” for the Clash proxy engine, plus example configuration templates.
- It does not contain a server or web-app code; instead it is a curated collection of static rule files and sample configs, with instructions to feed them into external converter tools (subconverter, sub-web) and proxy clients.

##### File structure
- Top-level folders:
- Acl/ – SSR ACL rule files (.acl and .rule) in various flavours (banAD, onlybanAD, fullgfwlist, etc.)
- Clash/ – rule “fragments” (.list) grouped by purpose (ad-block, direct, proxy), providers metadata (.yaml), full config examples (.yml), and subconverter example configs (pref.ini).
- Tool/ – helper docs (New.md), SwitchyOmega extension package and setup files, regex cheatsheet.
- License, README.md at root. No compiled code, but many plain-text/YAML/INI artifacts.
- No build or deploy scripts—assets are consumed directly by proxy clients or by “subconverter” backends.

##### README for additional insights
- Describes:
- SSR ACL rule sets, their semantics (proxy vs direct, ad-block on/off).
- Clash rule fragments mapping to lists and providers for dynamic subscription.
- Integration points: sub-web (frontend), subconverter (backend) are external, open-source tools used to transform these fragments into client-ready subscriptions.
- Supported target types (Clash, Quantumult, Trojan, etc.) and conversion parameters.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Static Repository Layer
    subgraph "Static Rule Store" 
        direction TB
        Repo["GitHub Repository"]:::static
        AclFolder["Acl/ (SSR ACL Rule Sets)"]:::static
        banAD["banAD.acl"]:::static
        fullGFW["fullgfwlist.acl"]:::static
        userRule["gfwlist-user.rule"]:::static
        chinaIP["china_ip_list.txt"]:::static

        ClashFragments["Clash/*.list (Rule Fragments)"]:::static
        ProvidersMeta["Clash/Providers/*.yaml (Providers Metadata)"]:::static
        ProvidersRuleset["Clash/Providers/Ruleset/*.yaml"]:::static
        FullConfig["Clash/GeneralClashConfig.yml"]:::static
        INITemplates["Clash/config/*.ini"]:::static
        SubconvConfig["Clash/pref.ini"]:::static

        ToolFolder["Tool/ (Helper Tools & Docs)"]:::static
        SwitchyOmega["Tool/SwitchyOmega/"]:::static
        RegexCheatsheet["Tool/正则语法.conf"]:::static

        Readme["README.md"]:::static
        Licence["LICENCE"]:::static

        Repo --> AclFolder
        AclFolder --> banAD
        AclFolder --> fullGFW
        AclFolder --> userRule
        AclFolder --> chinaIP

        Repo --> ClashFragments
        Repo --> ProvidersMeta
        Repo --> ProvidersRuleset
        Repo --> FullConfig
        Repo --> INITemplates
        Repo --> SubconvConfig

        Repo --> ToolFolder
        ToolFolder --> SwitchyOmega
        ToolFolder --> RegexCheatsheet

        Repo --> Readme
        Repo --> Licence
    end

    %% Dynamic Conversion Layer
    subgraph "Conversion Services"
        direction TB
        UI["sub-web Frontend UI"]:::service
        Converter["subconverter Backend"]:::service
    end

    %% Client Layer
    subgraph "Proxy Clients & Devices"
        direction TB
        Clients["End Proxy Clients"]:::client
        SSRClient["SSR Clients"]:::client
        ClashClient["Clash Client"]:::client
        Quantumult["Quantumult"]:::client
        Surfboard["Surfboard"]:::client
        Trojan["Trojan"]:::client
        V2Ray["V2Ray"]:::client
        SwitchOmegaBrowser["Browser + SwitchyOmega"]:::client
        Device["User Device"]:::client
    end

    ExternalTG["Telegram Update Channel"]:::external

    %% Connections
    UI -->|"requests conversion"| Converter
    Converter -->|"fetch raw files"| AclFolder
    Converter -->|"fetch raw files"| ClashFragments
    Converter -->|"fetch metadata"| ProvidersMeta
    Converter -->|"uses templates"| INITemplates
    Converter -->|"returns subscription URL"| UI
    UI -->|"presents subscription link"| Device
    Device -->|"imports via HTTP/S"| Clients
    Clients --> SSRClient
    Clients --> ClashClient
    Clients --> Quantumult
    Clients --> Surfboard
    Clients --> Trojan
    Clients --> V2Ray
    Clients --> SwitchOmegaBrowser

    UI -->|"manual download"| AclFolder
    UI -->|"manual download"| ClashFragments

    ExternalTG -->|"notifies updates"| Device

    %% Click Events
    click Repo "https://github.com/william-hunter/acl4ssr/tree/master//"
    click AclFolder "https://github.com/william-hunter/acl4ssr/tree/master/Acl/"
    click banAD "https://github.com/william-hunter/acl4ssr/blob/master/Acl/banAD.acl"
    click fullGFW "https://github.com/william-hunter/acl4ssr/blob/master/Acl/fullgfwlist.acl"
    click userRule "https://github.com/william-hunter/acl4ssr/blob/master/Acl/gfwlist-user.rule"
    click chinaIP "https://github.com/william-hunter/acl4ssr/blob/master/Acl/china_ip_list.txt"
    click ClashFragments "https://github.com/william-hunter/acl4ssr/tree/master/Clash/"
    click ProvidersMeta "https://github.com/william-hunter/acl4ssr/tree/master/Clash/Providers/"
    click ProvidersRuleset "https://github.com/william-hunter/acl4ssr/tree/master/Clash/Providers/Ruleset/"
    click FullConfig "https://github.com/william-hunter/acl4ssr/blob/master/Clash/GeneralClashConfig.yml"
    click INITemplates "https://github.com/william-hunter/acl4ssr/tree/master/Clash/config/"
    click SubconvConfig "https://github.com/william-hunter/acl4ssr/blob/master/Clash/pref.ini"
    click ToolFolder "https://github.com/william-hunter/acl4ssr/tree/master/Tool/"
    click SwitchyOmega "https://github.com/william-hunter/acl4ssr/tree/master/Tool/SwitchyOmega/"
    click RegexCheatsheet "https://github.com/william-hunter/acl4ssr/blob/master/Tool/正则语法.conf"
    click Readme "https://github.com/william-hunter/acl4ssr/blob/master/README.md"
    click Licence "https://github.com/william-hunter/acl4ssr/tree/master/LICENCE"

    %% Styles
    classDef static fill:#E0F7FA,stroke:#006064,color:#004D40
    classDef service fill:#E8F5E9,stroke:#1B5E20,color:#2E7D32
    classDef client fill:#FFF3E0,stroke:#E65100,color:#EF6C00
    classDef external fill:#F3E5F5,stroke:#6A1B9A,color:#4A148C
```
