Skip to content

inoribea/patchomo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patchomo

简体中文 | English

NetPatch Firewall Groups → Clash Rule Provider Converter

Automatically converts NetPatch Firewall group rules to Clash rule-provider format with daily updates.

⚠️ Disclaimer

Caution

Prohibited Distribution

Any form of reprinting or posting to 🇨🇳 mainland China public platforms is prohibited.

Warning

Compliance Warning

This project is for technical exchange and learning only. Mainland China users must comply with local laws and regulations.

Features

  • 🔄 Daily Auto-Update - GitHub Actions runs daily at UTC 00:00
  • 📦 Release Artifacts - Download ready-to-use rulesets from Releases
  • 🌍 200+ Country IPs - Complete country/region IP rulesets
  • 🛡️ Ad Blocking - Built-in ad/malware/tracking domain rules

Quick Start

Download Rulesets

Visit Releases to download the latest:

  • rulesets-YYYY-MM-DD.tar.gz - Tarball archive
  • rulesets-YYYY-MM-DD.zip - ZIP archive

Use in Clash

Extract and reference in your Clash configuration:

rule-providers:
  amt:
    type: file
    behavior: classical
    path: ./ruleset/amt.yaml

  bdc:
    type: file
    behavior: classical
    path: ./ruleset/bdc.yaml

  CN:
    type: file
    behavior: classical
    path: ./ruleset/CN.yaml

rules:
  - RULE-SET,amt,REJECT
  - RULE-SET,bdc,PROXY
  - RULE-SET,CN,DIRECT
  - MATCH,PROXY

Available Rulesets

Domain Rulesets

Ruleset Description Source
amt.yaml Ad/Malware/Tracking domains amt.txt
bdc.yaml Bypass Domain Categories bdc.txt

Country IP Rulesets

All country codes available (200+):

  • CN.yaml - China
  • US.yaml - United States
  • JP.yaml - Japan
  • HK.yaml - Hong Kong
  • TW.yaml - Taiwan
  • SG.yaml - Singapore
  • ... and more

Data Sources

Project Structure

patchomo/
├── scripts/
│   └── convert.py          # Conversion script
├── .github/
│   └── workflows/
│       └── update.yml      # Daily update workflow
└── README.md

Note: output/ directory is auto-generated by GitHub Actions and distributed via Releases.

Local Development

git clone https://github.com/inoribea/patchomo.git
cd patchomo
python scripts/convert.py

Update Schedule

  • Automatic: Daily at UTC 00:00
  • Manual: Trigger via GitHub Actions → "Run workflow"

License

Acknowledgments

About

Automatically fetches NetPatch Firewall group rules and converts them to Clash rule-provider format with daily updates via GitHub Actions. Supports domain rules (ads/malware/tracking) and 200+ country IP rulesets.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages