Home

Awesome

<picture> <source media="(prefers-color-scheme: dark)" srcset="assets/logo-white.png"> <source media="(prefers-color-scheme: light)" srcset="assets/logo-dark.png"> <img alt="a logo for iran v2ray rules in both dark and light mode" src="assets/logo-dark.png"> </picture> <p align="center"> <img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/Chocolate4U/Iran-v2ray-rules/release.yml?event=schedule&style=for-the-badge&logo=github&cacheSeconds=3600"> <img alt="GitHub release" src="https://img.shields.io/github/v/release/Chocolate4U/Iran-v2ray-rules?style=for-the-badge&cacheSeconds=3600"> <img alt="GitHub Release Date" src="https://img.shields.io/github/release-date/Chocolate4U/Iran-v2ray-rules?display_date=published_at&style=for-the-badge&cacheSeconds=3600"> <img alt="GitHub" src="https://img.shields.io/github/license/Chocolate4U/Iran-v2ray-rules?style=for-the-badge&color=blue&cacheSeconds=3600"> </p>

فارسی

:writing_hand: Introduction

This is an Enhanced and All-in-One set of geo-location routing files optimized for Iranian users to use in v2ray/xray and all their compatible clients.

:bulb: For Sing-Box geolocation rules please refer to Iran Sing-Box Rules
:bulb: For Clash geolocation rules please refer to Iran Clash Rules

:arrow_down: How to download

<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.simpleicons.org/github/white"><source media="(prefers-color-scheme: light)" srcset="https://cdn.simpleicons.org/github/dark"><img height="32" width="32" alt="github logo in dark and light mode." src="https://cdn.simpleicons.org/github/dark"></picture> From GitHub

geoip.dat

https://raw.githubusercontent.com/Chocolate4U/Iran-v2ray-rules/release/geoip.dat

<details> <summary><strong>QR Code</strong></summary> <img alt="QrCode for downloading geoip.dat file from github" src="assets/geoip.png" width="200" height="200"> </details>

geosite.dat

https://raw.githubusercontent.com/Chocolate4U/Iran-v2ray-rules/release/geosite.dat

<details> <summary><strong>QR Code</strong></summary> <img alt="QrCode for downloading geosite.dat file from github" src="assets/geosite.png" width="200" height="200"> </details>

geoip-lite.dat

https://raw.githubusercontent.com/Chocolate4U/Iran-v2ray-rules/release/geoip-lite.dat

<details> <summary><strong>QR Code</strong></summary> <img alt="QrCode for downloading geoip-lite.dat file from github" src="assets/geoip-lite.png" width="200" height="200"> </details>

geosite-lite.dat

https://raw.githubusercontent.com/Chocolate4U/Iran-v2ray-rules/release/geosite-lite.dat

<details> <summary><strong>QR Code</strong></summary> <img alt="QrCode for downloading geosite-lite.dat file from github" src="assets/geosite-lite.png" width="200" height="200"> </details>

security-ip.dat

https://raw.githubusercontent.com/Chocolate4U/Iran-v2ray-rules/release/security-ip.dat

<details> <summary><strong>QR Code</strong></summary> <img alt="QrCode for downloading security-ip.dat file from github" src="assets/security-ip.png" width="200" height="200"> </details>

security.dat

https://raw.githubusercontent.com/Chocolate4U/Iran-v2ray-rules/release/security.dat

<details> <summary><strong>QR Code</strong></summary> <img alt="QrCode for downloading security.dat file from github" src="assets/security.png" width="200" height="200"> </details>

<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.simpleicons.org/jsdelivr/white"><source media="(prefers-color-scheme: light)" srcset="https://cdn.simpleicons.org/jsdelivr/dark"><img height="32" width="32" alt="github logo in dark and light mode." src="https://cdn.simpleicons.org/jsdelivr/dark"></picture> From jsDelivr CDN

geoip.dat

https://cdn.jsdelivr.net/gh/chocolate4u/Iran-v2ray-rules@release/geoip.dat

<details> <summary><strong>QR Code</strong></summary> <img alt="QrCode for downloading geoip.dat file from jsdelivr" src="assets/geoip-jsdelivr.png" width="200" height="200"> </details>

geosite.dat

https://cdn.jsdelivr.net/gh/chocolate4u/Iran-v2ray-rules@release/geosite.dat

<details> <summary><strong>QR Code</strong></summary> <img alt="QrCode for downloading geosite.dat file from jsdelivr" src="assets/geosite-jsdelivr.png" width="200" height="200"> </details>

geoip-lite.dat

https://cdn.jsdelivr.net/gh/chocolate4u/Iran-v2ray-rules@release/geoip-lite.dat

<details> <summary><strong>QR Code</strong></summary> <img alt="QrCode for downloading geoip-lite.dat file from jsdelivr" src="assets/geoip-lite-jsdelivr.png" width="200" height="200"> </details>

geosite-lite.dat

https://cdn.jsdelivr.net/gh/chocolate4u/Iran-v2ray-rules@release/geosite-lite.dat

<details> <summary><strong>QR Code</strong></summary> <img alt="QrCode for downloading geosite-lite.dat file from jsdelivr" src="assets/geosite-lite-jsdelivr.png" width="200" height="200"> </details>

security-ip.dat

https://cdn.jsdelivr.net/gh/chocolate4u/Iran-v2ray-rules@release/security-ip.dat

<details> <summary><strong>QR Code</strong></summary> <img alt="QrCode for downloading security-ip.dat file from jsdelivr" src="assets/security-ip-jsdelivr.png" width="200" height="200"> </details>

security.dat

https://cdn.jsdelivr.net/gh/chocolate4u/Iran-v2ray-rules@release/security.dat

<details> <summary><strong>QR Code</strong></summary> <img alt="QrCode for downloading security.dat file from jsdelivr" src="assets/security-jsdelivr.png" width="200" height="200"> </details>

:computer: Usage

v2ray/xray core

Add the following to your v2ray/xray client configuration:

"outbounds": [
  {
    "tag": "direct",
    "protocol": "freedom",
    "settings": {}
  },
  {
    "tag": "block",
    "protocol": "blackhole",
    "settings": {}
  }
],
"routing": {
  "domainStrategy": "IPIfNonMatch",
  "rules": [
    {
      "outboundTag": "block",
      "domain": [
        "geosite:category-ads-all",
        "geosite:malware",
        "geosite:phishing",
        "geosite:cryptominers"
      ],
      "type": "field"
    },
    {
      "outboundTag": "block",
      "ip": [
        "geoip:malware",
        "geoip:phishing"
      ],
      "type": "field"
    },
    {
      "outboundTag": "direct",
      "domain": [
        "geosite:ir"
      ],
      "type": "field"
    },
    {
      "outboundTag": "direct",
      "ip": [
        "geoip:ir",
        "geoip:private"
      ],
      "type": "field"
    },
  ]
}

:page_with_curl: Categories

GeoIP

<details> <summary><strong>Categories in <code>geoip.dat</code></strong></summary> </details> <details> <summary><strong>Categories in <code>geoip-lite.dat</code></strong></summary> </details> <details> <summary><strong>Categories in <code>security-ip.dat</code></strong></summary> </details> <details> <summary><strong>Categories in <code>geoip-services.dat</code></strong></summary> </details> <details> <summary><strong>Categories in <code>Country.mmdb</code></strong></summary>

Same as GeoIP but in Maxmind's MMDB format.

</details> <details> <summary><strong>Categories in <code>Country-lite.mmdb</code></strong></summary>

Same as GeoIP Lite but in Maxmind's MMDB format.

</details> <details> <summary><strong>Categories in <code>Security-IP.mmdb</code></strong></summary>

Same as Security-IP but in Maxmind's MMDB format.

</details> <details> <summary><strong>Categories in <code>Services.mmdb</code></strong></summary>

same as GeoIP-Services but in Maxmind's MMDB format.

</details>

GeoSite

<details> <summary><strong>Categories in <code>geosite.dat</code></strong></summary> </details> <details> <summary><strong>Categories in <code>geosite-lite.dat</code></strong></summary> </details> <details> <summary><strong>Categories in <code>security.dat</code></strong></summary> </details>

:information_desk_person: How is this made?

geoip.dat,geoip-lite.dat and Country.mmdb,Country-lite.mmdb are generated using source code from geoip repository by Loyalsoldier. Please refer to the mentioned repository for instructions on how to make custom geoip files.

geosite.dat,geosite-lite.dat is generated using source code from Domain list community. Please refer to the mentioned repository for instructions on how to make custom geosite files.

:handshake: Contribution

All contributions are welcome and appreciated. You can contribute to this project in 2 ways:

  1. 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!
  2. 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

SourceMaintainerHome PageLicenseCategory
GeoLite2MaxMindHome PageCC BY-SA 4.0Country IPs
IP2Location LITEIP2LocationHome PageCC BY-SA 4.0Country IPs
ITO GOVITO GOVHome PageN/Air(messenger IPs)
Arvan CloudArvan CloudHome PageAll rights reservedarvancloud
Derak CloudDerak CloudHome PageAll rights reservedderakcloud
IranServerIranServerHome PageAll rights reservediranserver
ParsPackParsPackHome PageAll rights reservedparspack
CloudflareCloudflareHome PageAll rights reservedcloudflare
TelegramTelegramHome PageAll rights reservedTelegram
URLhausabuse.chHome PageCC0malware
Phishing URL Blocklistmalware-filter GroupHome PageMITphishing
IPRangeslord-alfredHome PageCC0 1.0everything else

GeoSite

SourceMaintainerHome PageLicenseCategory
Iran Hosted DomainsbootmortisHome PageMITir
PersianBlockerMasterKiaHome PageAGPL-3.0ads
DNS BlocklistsHageziHome PageAll rights reservedads
GoodbyeAdsjerryn70Home PageMITads
AdGuard DNS filterAdguard TeamHome PageGPL-3.0ads
URLhausabuse.chHome PageCC0malware
Phishing URL Blocklistmalware-filter GroupHome PageMITphishing
NoCoin adblock listhoshsadiqHome PageMITcryptominers
Unified HostsStevenBlackHome PageMITsocial, nsfw
Domain list communityDomain list communityHome PageMITeverything 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