A rule repository that keeps source files on main and publishes ready-to-use artifacts to the surge, sing-box, and mihomo branches.
- syncs domain artifacts from
nekolsd/sing-geosite - syncs IP artifacts from
nekolsd/geoip - builds local custom domain and IP rules into all supported client formats
- publishes client-specific branches:
surge,sing-box, andmihomo
main: source files, scripts, workflows, and documentationsurge: final Surge artifacts onlysing-box: final sing-box artifacts onlymihomo: final mihomo artifacts only
.
|-- .github/ # CI workflows
|-- docs/ # conversion and maintenance notes
|-- scripts/ # sync/build/publish scripts
|-- sources/ # editable rule sources only
|-- tools/ # vendored helper code and generators
`-- README.md
sources/: hand-maintained rule inputs. Custom sources live undersources/custom/.tools/: vendored helper code or upstream tooling kept in-repo for maintenance.tools/geoip/contains the geoip generator source that was previously mixed intosources/..output/: local build output directory, ignored onmain, and used as the publish source for client-specific branches.
- editable custom inputs live under
sources/custom/ - generated client artifacts are written to
.output/ - intermediate conversion formats are documented in Intermediate Artifacts
GitHub Actions will:
- lint custom rule sources
- choose between a full sync or a custom-only fast path
- resolve the latest official
sing-boxandmihomocore versions - sync upstream rule artifacts when a full refresh is needed
- build local custom artifacts
- verify artifact integrity
- publish to client-specific branches
The main branch does not keep synced upstream artifacts. Generated files are built in CI or locally under .output/ and then published to the client branches.
Each published client branch is trimmed to README.md, domain/, and ip/ only.
The tool bootstrap layer resolves the latest official sing-box and mihomo releases at runtime instead of pinning them in the repo.
Build scripts are intended for GitHub Actions or non-Windows shell environments.
Triggers:
- manual
workflow_dispatchwithauto,custom, orfullscope - scheduled sync once per day at 08:00 UTC
- pushes that modify workflows, scripts, custom sources, or vendored tooling
Pushes that only add or edit sources/custom/** now reuse the currently published client branches as the artifact baseline, rebuild custom outputs, and skip the expensive upstream sync step. Scheduled runs, workflow/tooling changes, custom deletions, and manual full runs still refresh all upstream artifacts.
Surge:
[Rule]
DOMAIN-SET,https://raw.githubusercontent.com/KuGouGo/Rules/surge/domain/cn.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/KuGouGo/Rules/surge/ip/cn.list,DIRECTsing-box:
{
"route": {
"rule_set": [
{
"tag": "cn",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/KuGouGo/Rules/sing-box/domain/cn.srs"
},
{
"tag": "cn-ip",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/KuGouGo/Rules/sing-box/ip/cn.srs"
}
]
}
}mihomo:
rule-providers:
cn:
type: http
behavior: domain
format: mrs
url: "https://raw.githubusercontent.com/KuGouGo/Rules/mihomo/domain/cn.mrs"
interval: 86400
cn-ip:
type: http
behavior: ipcidr
format: mrs
url: "https://raw.githubusercontent.com/KuGouGo/Rules/mihomo/ip/cn.mrs"
interval: 86400- Domain Surge / sing-box: https://github.com/nekolsd/sing-geosite
- IP Surge / sing-box / mihomo: https://github.com/nekolsd/geoip
- mihomo converter: https://github.com/MetaCubeX/mihomo