From bf1fafd05302e5a138ccd3100d745f980dc3579a Mon Sep 17 00:00:00 2001 From: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com> Date: Thu, 23 Apr 2020 10:04:38 +0800 Subject: [PATCH] Add usage example --- README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/README.md b/README.md index 3124c1b2..b559e96b 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,61 @@ This project is not opinionated. In other words, it does NOT endorse, claim or i - **dlc.dat**:[https://github.com/v2ray/domain-list-community/raw/release/dlc.dat](https://github.com/v2ray/domain-list-community/raw/release/dlc.dat) - **dlc.dat.sha256sum**:[https://github.com/v2ray/domain-list-community/raw/release/dlc.dat.sha256sum](https://github.com/v2ray/domain-list-community/raw/release/dlc.dat.sha256sum) +## Usage example + +Each file in the `data/` directory can be used as a rule in this format: `geosite:filename`. + +```json +"routing": { + "domainStrategy": "IPIfNonMatch", + "rules": [ + { + "type": "field", + "outboundTag": "Reject", + "domain": [ + "geosite:category-ads-all", + "geosite:category-porn" + ] + }, + { + "type": "field", + "outboundTag": "Direct", + "domain": [ + "domain:v2ex.com", + "domain:icloud.com", + "domain:icloud-content.com", + "domain:cdn-apple.com", + "geosite:jsdelivr", + "geosite:cn" + ] + }, + { + "type": "field", + "outboundTag": "Proxy-1", + "domain": [ + "geosite:category-anticensorship", + "geosite:category-media", + "geosite:category-vpnservices" + ] + }, + { + "type": "field", + "outboundTag": "Proxy-2", + "domain": [ + "geosite:category-dev" + ] + }, + { + "type": "field", + "outboundTag": "Proxy-3", + "domain": [ + "geosite:geolocation-!cn" + ] + } + ] +} +``` + ## Structure of data All data are under `data/` directory. Each file in the directory represents a sub-list of domains, named by the file name. File content is in the following format.