Chocolate4U/Iran-clash-rules
Fork: 2 Star: 41 (更新于 2024-12-01 23:36:56)
license: GPL-3.0
Language: Shell .
Enhanced Clash and Clash.Meta routing rules with Iranian domains ruleset and a focus on security and adblocking.
最后发布版本: 202410180555 ( 2024-10-18 13:56:26)
:writing_hand: Introduction
An enhanced and All-in-One set of geo-location routing files optimized for Iranian users to use in Clash/Clash.Meta.
:bulb: For V2Ray geolocation rules please refer to Iran V2Ray Rules
:bulb: For Sing-Box geolocation rules please refer to Iran Sing-Box Rules
:page_with_curl: Categories
[!IMPORTANT] There are two clash rule formats,
text
andyaml
.text
is preferred as it's faster to process by Clash and is supported in Clash Premium 1.15.0+ and clash.Meta 1.14.4+ . If you are using an older version of Clash/Clash.Meta, you should useyaml
format.
Classical Rules
-
apps.txt
,apps.yaml
Contains a list of Persian Android apps. -
irasn.txt
,irasn.yaml
Contains a list of Iran ASN numbers.
Domain Rules
-
ir.txt
,ir.yaml
Contains non-ir TLD Iranian domains (e.g..com
.net
.org
etc.) and rules to bypass all.ir
domains. -
ir-lite.txt
,ir-lite.yaml
Contains Active non-ir TLD Iranian domains (e.g..com
.net
.org
etc.) and rules to bypass all.ir
domains. -
ads.txt
,ads.yaml
Contains a list of Persian advertisement and tracking domains. -
category-ads-all.txt
,category-ads-all.yaml
Contains a curated list of Persian and Foreign advertisement and tracking domains based on multiple sources. It is optimized to has as low as possible false positives while also retain small size and efficiency. -
malware.txt
,malware.yaml
Contains a list of active malware domains. -
phishing.txt
,phishing.yaml
Contains a list of scam and phishing domains. -
cryptominers.txt
,cryptominers.yaml
Contains a list of cryptocurrency miners that run in the background of a web browser and affect system performance. -
social.txt
,social.yaml
Contains Domain Addresses of popular social media platforms, includingFacebook
,Instagram
,Whatsapp
,Twitter
,LinkedIn
,MySpace
,Pinterest
,Tumblr
,Reddit
,TikTok
,clubhouse
. -
nsfw.txt
,nsfw.yaml
Contains a list of porn and gambling websites.
IP Rules
-
ircidr.txt
,ircidr.yaml
Contains Iran IP addresses from Maxmind database and IP addresses of Iranian messengers such aseitaa
,rubika
, etc. -
private.txt
,private.yaml
Contains a list of local (LAN) IP addresses. -
arvancloud.txt
,arvancloud.yaml
Contains the IP addresses of ArvanCloud.ir CDN. -
derakcloud.txt
,derakcloud.yaml
Contains the IP addresses of Derak.cloud CDN. -
iranserver.txt
,iranserver.yaml
Contains the IP addresses of IranServer.com CDN. -
parspack.txt
,parspack.yaml
Contains the IP addresses of ParsPack.com CDN. -
cloudflare.txt
,cloudflare.yaml
Contains the IP addresses of Cloudflare CDN. -
google.txt
,google.yaml
Contains the IP addresses of Google, GoogleCloud and GoogleBot. -
amazon.txt
,amazon.yaml
Contains the IP addresses of Amazon and Amazon Web Services (AWS). -
microsoft.txt
,microsoft.yaml
Contains the IP addresses of Microsoft and Azure Platform. -
bing.txt
,bing.yaml
Contains the IP addresses of Bing and Bingbot. -
github.txt
,github.yaml
Contains the IP addresses of GitHub. -
facebook.txt
,facebook.yaml
Contains the IP addresses of the Meta ecosystem, including Facebook, Instagram and WhatsApp. -
twitter.txt
,twitter.yaml
Contains the IP addresses of Twitter (now called X!). -
telegram.txt
,telegram.yaml
Contains the IP addresses of Telegram Messenger. -
oracle.txt
,oracle.yaml
Contains the IP addresses of Oracle Cloud. -
digitalocean.txt
,digitalocean.yaml
Contains the IP addresses of DigitalOcean related services. -
linode.txt
,linode.yaml
Contains the IP addresses of Linode related services. -
openai.txt
,openai.yaml
Contains the IP addresses of OpenAI and ChatGPT. -
phishing-ip.txt
,phishing-ip.yaml
Contains Phishing IP addresses. -
malware-ip.txt
,malware-ip.yaml
Contains Active Malware IP addresses.
Meta GeoIP
[!NOTE] Only usable in Clash.Meta.
GeoIP database in Clash.Meta format.
-
geoip.metadb
Same as GeoIP but in Clash.Meta format. -
geoip-lite.metadb
Same as GeoIP-Lite but in Clash.Meta format. -
security-ip.metadb
Same as Security-IP but in Clash.Meta format.
:arrow_down: How to download
From GitHub
-
IR
-
IR-Lite
-
Category-ads-all
-
Malware
-
Phishing
-
CryptoMiners
-
Apps
-
IRASN
-
IRcidr
-
Private
-
ArvanCloud
-
DerakCloud
-
IranServer
-
ParsPack
From jsDelivr CDN
-
IR
-
IR-Lite
-
Category-ads-all
-
Malware
-
Phishing
-
CryptoMiners
-
Apps
-
IRcidr
-
Private
-
ArvanCloud
-
DerakCloud
-
IranServer
-
ParsPack
:computer: Usage
Clash and Clash.Meta
Add the following to the rule section of your clash/clash.meta client configuration:
TEXT Format
rule-providers:
ir:
type: http
format: text
behavior: domain
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/ir.txt"
path: ./ruleset/ir.txt
interval: 86400
ads:
type: http
format: text
behavior: domain
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/ads.txt"
path: ./ruleset/ads.txt
interval: 86400
malware:
type: http
format: text
behavior: domain
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/malware.txt"
path: ./ruleset/malware.txt
interval: 86400
phishing:
type: http
format: text
behavior: domain
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/phishing.txt"
path: ./ruleset/phishing.txt
interval: 86400
cryptominers:
type: http
format: text
behavior: domain
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/cryptominers.txt"
path: ./ruleset/cryptominers.txt
interval: 86400
apps:
type: http
format: text
behavior: classical
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/apps.txt"
path: ./ruleset/apps.txt
interval: 86400
ircidr:
type: http
format: text
behavior: ipcidr
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/ircidr.txt"
path: ./ruleset/ircidr.txt
interval: 86400
private:
type: http
format: text
behavior: ipcidr
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/private.txt"
path: ./ruleset/private.txt
interval: 86400
irasn:
type: http
format: text
behavior: classical
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/irasn.txt"
path: ./ruleset/irasn.txt
interval: 86400
rules :
- RULE-SET,private,DIRECT,no-resolve
- RULE-SET,apps,DIRECT
- RULE-SET,ads,REJECT
- RULE-SET,malware,REJECT
- RULE-SET,phishing,REJECT
- RULE-SET,cryptominers,REJECT
- RULE-SET,ir,DIRECT
- RULE-SET,ircidr,DIRECT
- RULE-SET,irasn,DIRECT
- MATCH,PROXY
YAML Format
rule-providers:
ir:
type: http
format: yaml
behavior: domain
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/ir.yaml"
path: ./ruleset/ir.yaml
interval: 86400
ads:
type: http
format: yaml
behavior: domain
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/ads.yaml"
path: ./ruleset/ads.yaml
interval: 86400
malware:
type: http
format: yaml
behavior: domain
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/malware.yaml"
path: ./ruleset/malware.yaml
interval: 86400
phishing:
type: http
format: yaml
behavior: domain
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/phishing.yaml"
path: ./ruleset/phishing.yaml
interval: 86400
cryptominers:
type: http
format: yaml
behavior: domain
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/cryptominers.yaml"
path: ./ruleset/cryptominers.yaml
interval: 86400
apps:
type: http
format: yaml
behavior: classical
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/apps.yaml"
path: ./ruleset/apps.yaml
interval: 86400
ircidr:
type: http
format: yaml
behavior: ipcidr
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/ircidr.yaml"
path: ./ruleset/ircidr.yaml
interval: 86400
private:
type: http
format: yaml
behavior: ipcidr
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/private.yaml"
path: ./ruleset/private.yaml
interval: 86400
irasn:
type: http
format: yaml
behavior: classical
url: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/irasn.yaml"
path: ./ruleset/irasn.yaml
interval: 86400
rules :
- RULE-SET,private,DIRECT,no-resolve
- RULE-SET,apps,DIRECT
- RULE-SET,ads,REJECT
- RULE-SET,malware,REJECT
- RULE-SET,phishing,REJECT
- RULE-SET,cryptominers,REJECT
- RULE-SET,ir,DIRECT
- RULE-SET,ircidr,DIRECT
- RULE-SET,irasn,DIRECT
- MATCH,PROXY
[!NOTE] Currently there is a problem with "ClashMetaForAndroid" version 2.8.6 and above, in which it can't match Android package names thus
- RULE-SET,apps,DIRECT
is completely ineffective for now.
Only CLash.Meta
Add this to the top of your configuration.
geox-url:
geoip: "https://raw.githubusercontent.com/Chocolate4U/Iran-v2ray-rules/release/geoip.dat"
geosite: "https://raw.githubusercontent.com/Chocolate4U/Iran-v2ray-rules/release/geosite.dat"
mmdb: "https://raw.githubusercontent.com/Chocolate4U/Iran-clash-rules/release/geoip.metadb"
asn: "https://raw.githubusercontent.com/Chocolate4U/Iran-v2ray-rules/geolite2/GeoLite2-ASN.mmdb"
Usage:
rules:
- GEOIP,private,DIRECT,no-resolve
- GEOSITE,category-ads-all,REJECT
- GEOSITE,malware,REJECT
- GEOSITE,phishing,REJECT
- GEOSITE,cryptominers,REJECT
- GEOIP,malware,REJECT
- GEOIP,phishing,REJECT
- GEOSITE,ir,DIRECT
- GEOIP,ir,DIRECT
- MATCH,PROXY
:information_desk_person: How is this made?
Source files are pulled from Iran V2Ray Rules and get converted to clash text
and yaml
format by a GitHub actions workflow.
geoip.metadb
and geoip-lite.metadb
are generated from geoip.dat
and geoip-lite.dat
in Iran-v2ray-rules repository using source code from metacubex/geo.
:handshake: Contribution
All contributions are welcome and appreciated. You can contribute to this project in 2 ways:
- Contribute to its upstream sources
Do you know a Domain that should be bypassed? report it to Iran Hosted Domains
Do you know a Persian advertisement domain that should be blocked or a false positive? report it to PersianBlocker
Do you know... OK, you got the idea! - Contribute directly to this project
Report issues, open pull requests, suggest new sources or categories or any idea, in general, to make this repository more useful for everyone.
:raising_hand_man: Also one more thing, if this repository was useful to you, kindly leave a :star: up there so this project can be seen by more people.
:copyright: License
This project, except for upstream sources, is licensed under the GNU GPLv3 License - see the LICENSE file for details.
All rights are reserved for All upstream sources used in this project according to their respective licenses. Please refer to Sources section for more details.
:package: Sources
GeoIP
Source | Maintainer | Home Page | License | Category |
---|---|---|---|---|
GeoLite2 | MaxMind | Home Page | CC BY-SA 4.0 | ir, ru, us |
IP2Location LITE | IP2Location | Home Page | CC BY-SA 4.0 | ir |
ITO GOV | ITO GOV | Home Page | N/A | ir(messenger IPs) |
V2ray-rules-dat | Loyalsoldier | Home Page | GPL-3.0 | cn |
Arvan Cloud | Arvan Cloud | Home Page | All rights reserved | arvancloud |
Derak Cloud | Derak Cloud | Home Page | All rights reserved | derakcloud |
IranServer | IranServer | Home Page | All rights reserved | iranserver |
ParsPack | ParsPack | Home Page | All rights reserved | parspack |
Cloudflare | Cloudflare | Home Page | All rights reserved | cloudflare |
Telegram | Telegram | Home Page | All rights reserved | Telegram |
URLhaus | abuse.ch | Home Page | CC0 | malware |
Phishing URL Blocklist | malware-filter Group | Home Page | MIT | phishing |
IPRanges | lord-alfred | Home Page | CC0 1.0 | everything else |
GeoSite
Source | Maintainer | Home Page | License | Category |
---|---|---|---|---|
Iran Hosted Domains | bootmortis | Home Page | MIT | ir |
PersianBlocker | MasterKia | Home Page | AGPL-3.0 | ads |
DNS Blocklists | Hagezi | Home Page | All rights reserved | ads |
Ad and tracking server list | Peter Lowe | Home Page | McRae GPL | ads |
GoodbyeAds | jerryn70 | Home Page | MIT | ads |
AdGuard DNS filter | Adguard Team | Home Page | GPL-3.0 | ads |
URLhaus | abuse.ch | Home Page | CC0 | malware |
Phishing URL Blocklist | malware-filter Group | Home Page | MIT | phishing |
NoCoin adblock list | hoshsadiq | Home Page | MIT | cryptominers |
Unified Hosts | StevenBlack | Home Page | MIT | social, nsfw |
Domain list community | Domain list community | Home Page | MIT | everything else |
:warning: Disclaimer
This repository is not affiliated, associated, authorized, endorsed by, or in any way officially connected to any of the aforementioned resources, websites, services, or any entity which this may concern, in any way.
The data in this repository is gathered from publicly available resources and is provided as-is, intended for informational purposes only with no guarantee of accuracy, liability or availability and We are not responsible for any harm or damage that may arise from using the data in this repository. Please do your research before using any data from this repository.
:pray: Special Thanks
- All maintainers that are mentioned in this project.
- Clash
- Clash.Meta
- Loyalsoldier
最近版本更新:(数据更新于 2024-10-18 16:55:36)
2024-10-18 13:56:26 202410180555
2024-10-17 13:56:02 202410170555
2024-10-16 13:56:16 202410160555
2024-10-15 13:56:10 202410150555
2024-10-14 13:56:08 202410140555
2024-10-13 13:56:17 202410130555
2024-10-12 13:56:12 202410120555
2024-08-15 13:56:03 202408150555
2024-08-13 13:56:13 202408130555
2024-08-12 13:55:57 202408120555
主题(topics):
adblock, clash, clash-meta, domains, geosite, gfw, iran, malware, phishing, routing
Chocolate4U/Iran-clash-rules同语言 Shell最近更新仓库
2024-12-29 10:33:59 morytyann/OpenWrt-mihomo
2024-12-25 00:13:59 j-hc/revanced-magisk-module
2024-12-19 20:39:10 chenzyadb/CuprumTurbo-Scheduler
2024-12-11 20:57:35 RROrg/rr
2024-12-09 01:05:08 rustdesk/rustdesk-server-pro
2024-12-04 20:05:03 AXEVO/Clash-MIX