ProxyMedia vs. ProxyGFWlist
Relevant source files
The following files were used as context for generating this wiki page:Within the Self-Rule repository, ProxyMedia.yaml and ProxyGFWlist.yaml are two distinct Clash rule providers that define which network traffic should be routed through a proxy. While both serve to bypass network restrictions, they differ significantly in scope, content, and intended use case.
ProxyGFWlist.yaml is a comprehensive, broad-coverage rule set designed to unblock a vast number of domains and IP addresses affected by the Great Firewall (GFW). In contrast, ProxyMedia.yaml is a more specialized and curated list focusing primarily on international streaming media platforms, AI services, and other specific applications. The choice between them allows a user to tailor their proxy behavior, either by proxying a wide range of potentially blocked sites or by targeting only a select group of services.
File Structure and Rule Types
Both provider files share a common YAML structure, consisting of a payload key followed by a list of rule entries. This structure is generated by the update_providers.py script from corresponding .list source files.
Sources: update_providers.py:16-19, Clash/Providers/ProxyGFWlist.yaml:1, Clash/Providers/ProxyMedia.yaml:1
The following diagram illustrates the basic structure of these YAML provider files.
The rule sets utilize several standard Clash rule types to match traffic:
| Rule Type | Description | Example | Source File |
|---|---|---|---|
DOMAIN-SUFFIX | Matches domains ending with the specified suffix. | DOMAIN-SUFFIX,google.com | ProxyGFWlist.yaml:608 |
DOMAIN-KEYWORD | Matches if the specified keyword is found anywhere in the domain name. | DOMAIN-KEYWORD,google | ProxyGFWlist.yaml:45 |
DOMAIN | Matches the exact domain name. | DOMAIN,atv-ps.amazon.com | ProxyMedia.yaml:50 |
IP-CIDR | Matches if the destination IP address falls within the specified CIDR block. | IP-CIDR,8.41.4.0/24,no-resolve | ProxyMedia.yaml:302 |
Sources: Clash/Providers/ProxyGFWlist.yaml, Clash/Providers/ProxyMedia.yaml, update_sing_box.py:65-74
ProxyGFWlist.yaml: Comprehensive GFW Bypass
ProxyGFWlist.yaml is the most extensive rule set, designed for broad circumvention of the GFW. It aggregates thousands of rules from multiple sources, including a large, standardized GFW list.
Content and Composition
The file is composed of several distinct sections, providing multiple layers of coverage.
This diagram shows the layered composition of the ProxyGFWlist.yaml file, from manually curated lists to large, automated GFW lists.
Sources: Clash/Providers/ProxyGFWlist.yaml
- MyList & Other: A manually curated list of popular international services like
1password.comandchat.openai.com.
Sources: Clash/Providers/ProxyGFWlist.yaml:4-27 - 国外域名 (Foreign TLDs): A list of top-level domains for countries/regions like
.hk,.jp,.tw, and.us.
Sources: Clash/Providers/ProxyGFWlist.yaml:30-38 - 国外域名关键字 (Foreign Domain Keywords): Common keywords found in blocked domains, such as
google,facebook, andtwitter.
Sources: Clash/Providers/ProxyGFWlist.yaml:41-61 - GFW list: A very large, standardized list containing thousands of
DOMAIN-SUFFIXrules for sites known to be blocked. This forms the bulk of the file.
Sources: Clash/Providers/ProxyGFWlist.yaml:64-5705 - Service-Specific Blocks: Explicit rule groups for major services like Google, Facebook, Amazon, and Telegram, often including both domain rules and
IP-CIDRblocks.
Sources: Clash/Providers/ProxyGFWlist.yaml:5708-5967
Use Case
ProxyGFWlist.yaml is ideal for users who want maximum coverage to access the open internet without needing to manually add rules for every blocked site they encounter. Its comprehensiveness comes at the cost of potentially proxying traffic that may not be strictly necessary.
ProxyMedia.yaml: Curated Media & AI Services
ProxyMedia.yaml is a more focused and curated rule provider. Its primary purpose is to proxy traffic for specific international streaming media, AI platforms, and related services. It is significantly smaller than ProxyGFWlist.yaml.
Content and Composition
The file is organized by service, making it clear what is being proxied.
This diagram illustrates the main categories of services included in the ProxyMedia.yaml rule set.
Sources: Clash/Providers/ProxyMedia.yaml
Key categories include:
- AI Platforms: A prominent section covering services like OpenAI (ChatGPT), Anthropic (Claude), Google (Gemini/Bard), and Microsoft (Copilot). This is a key differentiator from other lists.
Sources: Clash/Providers/ProxyMedia.yaml:9-47, Clash/Providers/Ruleset/AI.yaml - Streaming Video: Netflix, YouTube, Disney+, HBO, Hulu, AbemaTV, and others. These sections often include
IP-CIDRblocks in addition to domain rules.
Sources: Clash/Providers/ProxyMedia.yaml:49-148, Clash/Providers/ProxyMedia.yaml:276-319 - Streaming Audio: Spotify, Deezer, SoundCloud, TIDAL.
Sources: Clash/Providers/ProxyMedia.yaml:333-352 - Social Media: TikTok and Twitch.
Sources: Clash/Providers/ProxyMedia.yaml:355-376
The file also contains commented-out USER-AGENT rules, which suggest it is designed to be used with tools that can parse these rules for more specific client-side matching.
Sources: Clash/Providers/ProxyMedia.yaml:48, 80, 93
Use Case
ProxyMedia.yaml is suitable for users who only want to proxy specific, known international services. This approach avoids routing traffic for a vast number of other foreign sites through the proxy, which can be more efficient and desirable for users with limited proxy bandwidth or those who prefer most foreign traffic to be direct.
Comparative Analysis
The fundamental difference between the two files is their scope and philosophy: broad coverage versus curated precision.
| Feature | ProxyGFWlist.yaml | ProxyMedia.yaml | ProxyLite.yaml (for context) |
|---|---|---|---|
| Primary Goal | Comprehensive GFW circumvention | Access specific media & AI services | A balanced middle-ground |
| Rule Count | Very High (~6000+ rules) | Medium (~400 rules) | High (~500+ rules) |
| Scope | Broad, general-purpose | Narrow, service-specific | Broad, but less exhaustive than GFWlist |
| Key Content | GFW list, common blocked TLDs | Netflix, YouTube, OpenAI, Disney+ | "Top Blocked Sites", Google, Facebook |
| Maintenance | Relies on aggregated GFW list | Manually curated by service | Curated list of most common sites |
Sources: Clash/Providers/ProxyGFWlist.yaml, Clash/Providers/ProxyMedia.yaml, Clash/Providers/ProxyLite.yaml
Rule Generation Process
The .yaml provider files in this repository are not manually written. They are generated from simpler .list files by the update_providers.py script. This allows for easier maintenance and reuse of rule lists for different proxy clients.
The generation process is as follows:
This flowchart shows how the update_providers.py script converts .list files into Clash-compatible .yaml provider files.
Sources: update_providers.py
The script specifically handles and comments out certain rule types that are not standard in Clash payloads, such as USER-AGENT and PROCESS-NAME.
# Source: update_providers.py:23-32
...
elif line.lstrip().startswith("#"):
if not line.lstrip().startswith("# "):
f_out.write(f" # {line.strip()[1:]}")
else:
f_out.write(f" {line.strip()}")
elif line.lstrip().startswith("USER-AGENT"):
f_out.write(f" # {line.strip()}")
elif line.lstrip().startswith("URL-REGEX"):
f_out.write(f" # {line.strip()}")
elif line.lstrip().startswith("PROCESS-NAME"):
f_out.write(f" # {line.strip()}")
...
Sources: update_providers.py:23-32
A parallel script, update_sing_box.py, uses the same .list files to generate JSON rule sets for the sing-box proxy client, demonstrating the modularity of the rule system.
Sources: update_sing_box.py
Conclusion
ProxyGFWlist.yaml and ProxyMedia.yaml serve different user needs within the Self-Rule project's ecosystem. ProxyGFWlist acts as a comprehensive, "set-it-and-forget-it" solution for bypassing the GFW, while ProxyMedia provides a targeted, performance-oriented approach for users who only need to proxy specific international media and AI services. The choice between them is a trade-off between the breadth of coverage and the precision of traffic routing. The underlying build scripts ensure that these rule sets can be easily maintained and adapted for multiple proxy applications.