:writing_hand: Introduction

February 24, 2025 · View on GitHub

a logo for iran v2ray rules in both dark and light mode

GitHub Workflow Status GitHub release GitHub Release Date GitHub

فارسی

: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

github logo in dark and light mode. From GitHub

geoip.dat

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

QR Code QrCode for downloading geoip.dat file from github

geosite.dat

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

QR Code QrCode for downloading geosite.dat file from github

geoip-lite.dat

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

QR Code QrCode for downloading geoip-lite.dat file from github

geosite-lite.dat

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

QR Code QrCode for downloading geosite-lite.dat file from github

security-ip.dat

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

QR Code QrCode for downloading security-ip.dat file from github

security.dat

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

QR Code QrCode for downloading security.dat file from github

github logo in dark and light mode. From jsDelivr CDN

geoip.dat

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

QR Code QrCode for downloading geoip.dat file from jsdelivr

geosite.dat

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

QR Code QrCode for downloading geosite.dat file from jsdelivr

geoip-lite.dat

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

QR Code QrCode for downloading geoip-lite.dat file from jsdelivr

geosite-lite.dat

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

QR Code QrCode for downloading geosite-lite.dat file from jsdelivr

security-ip.dat

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

QR Code QrCode for downloading security-ip.dat file from jsdelivr

security.dat

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

QR Code QrCode for downloading security.dat file from jsdelivr

: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

Categories in geoip.dat
  • Contains IP Addresses of all countries from Maxmind and IP2Location databases.

  • geoip:ir
    Contains Iran IP addresses from Maxmind and IP2Location databases, IP addresses of Iranian messengers such as eitaa, rubika, etc. and IP addresses of arvancloud, derakcloud, iranserver and parspack CDNs.

  • geoip:private
    Contains a list of local (LAN) IP addresses.

  • geoip:arvancloud
    Contains the IP addresses of ArvanCloud.ir CDN. :information_source: Integrated in geoip:ir and no longer needed to be written as a separate rule.

  • geoip:derakcloud
    Contains the IP addresses of Derak.cloud CDN. :information_source: Integrated in geoip:ir and no longer needed to be written as a separate rule.

  • geoip:iranserver
    Contains the IP addresses of IranServer.com CDN. :information_source: Integrated in geoip:ir and no longer needed to be written as a separate rule.

  • geoip:parspack
    Contains the IP addresses of ParsPack.com CDN. :information_source: Integrated in geoip:ir and no longer needed to be written as a separate rule.

  • geoip:cloudflare
    Contains the IP addresses of Cloudflare CDN.

  • geoip:cloudfront
    Contains the IP addresses of Cloudfront CDN.

  • geoip:fastly
    Contains the IP addresses of Fastly CDN.

  • geoip:gcore
    Contains the IP addresses of G-Core CDN.

  • geoip:google
    Contains the IP addresses of Google, GoogleCloud and GoogleBot.

  • geoip:amazon
    Contains the IP addresses of Amazon and Amazon Web Services (AWS).

  • geoip:microsoft
    Contains the IP addresses of Microsoft and Azure Platform.

  • geoip:netflix
    Contains the IP addresses of Netflix.

  • geoip:bing
    Contains the IP addresses of Bing and Bingbot.

  • geoip:github
    Contains the IP addresses of GitHub.

  • geoip:facebook
    Contains the IP addresses of the Meta ecosystem, including Facebook, Instagram and WhatsApp.

  • geoip:twitter
    Contains the IP addresses of Twitter (now called X!).

  • geoip:telegram
    Contains the IP addresses of Telegram Messenger.

  • geoip:oracle
    Contains the IP addresses of Oracle Cloud.

  • geoip:digitalocean
    Contains the IP addresses of DigitalOcean-related services.

  • geoip:linode
    Contains the IP addresses of Linode-related services.

  • geoip:openai
    Contains the IP addresses of OpenAI and ChatGPT.

  • geoip:tor
    Contains the IP addresses of Tor exit nodes.

  • geoip:phishing
    Contains Phishing IP addresses.

  • geoip:malware
    Contains Active Malware IP addresses.

Categories in geoip-lite.dat
  • geoip:ir
    Contains Iran IP addresses from Maxmind and IP2Location databases, IP addresses of Iranian messengers such as eitaa, rubika, etc. and IP addresses of arvancloud, derakcloud, iranserver and parspack CDNs.

  • geoip:private
    Contains a list of local (LAN) IP addresses.

Categories in security-ip.dat
  • geoip:phishing
    Contains Phishing IP addresses.

  • geoip:malware
    Contains Active Malware IP addresses.

Categories in geoip-services.dat
  • geoip:arvancloud
    Contains the IP addresses of ArvanCloud.ir CDN.

  • geoip:derakcloud
    Contains the IP addresses of Derak.cloud CDN.

  • geoip:iranserver
    Contains the IP addresses of IranServer.com CDN.

  • geoip:parspack
    Contains the IP addresses of ParsPack.com CDN.

  • geoip:cloudflare
    Contains the IP addresses of Cloudflare CDN.

  • geoip:cloudfront
    Contains the IP addresses of Cloudfront CDN.

  • geoip:fastly
    Contains the IP addresses of Fastly CDN.

  • geoip:gcore
    Contains the IP addresses of G-Core CDN.

  • geoip:google
    Contains the IP addresses of Google, GoogleCloud and GoogleBot.

  • geoip:amazon
    Contains the IP addresses of Amazon and Amazon Web Services (AWS).

  • geoip:microsoft
    Contains the IP addresses of Microsoft and Azure Platform.

  • geoip:netflix
    Contains the IP addresses of Netflix.

  • geoip:bing
    Contains the IP addresses of Bing and Bingbot.

  • geoip:github
    Contains the IP addresses of GitHub.

  • geoip:facebook
    Contains the IP addresses of the Meta ecosystem, including Facebook, Instagram and WhatsApp.

  • geoip:twitter
    Contains the IP addresses of Twitter (now called X!).

  • geoip:telegram
    Contains the IP addresses of Telegram Messenger.

  • geoip:oracle
    Contains the IP addresses of Oracle Cloud.

  • geoip:digitalocean
    Contains the IP addresses of DigitalOcean-related services.

  • geoip:linode
    Contains the IP addresses of Linode-related services.

  • geoip:openai
    Contains the IP addresses of OpenAI and ChatGPT.

  • geoip:tor
    Contains the IP addresses of Tor exit nodes.

Categories in Country.mmdb

Same as GeoIP but in Maxmind's MMDB format.

Categories in Country-lite.mmdb

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

Categories in Security-IP.mmdb

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

Categories in Services.mmdb

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

GeoSite

Categories in geosite.dat
  • All categories from domain-list-community are supported, plus the following categories:

  • geosite:ir
    Contains non-ir TLD Iranian domains (e.g. .com .net .org etc.) and rules to bypass all .ir domains.

  • geosite:category-ir
    Mirror of geosite:ir with inactive domains removed. All IR domains get checked every 24 hours for inactive domains.

  • geosite:ads
    Contains a list of Persian advertisement and tracking domains.

  • geosite:category-ads-all
    Contains a curated list of Persian and Foreign advertisement and tracking domains based on multiple sources. It is optimized to have as low as possible false positives while also retaining a small size and efficiency.

  • geosite:malware
    Contains a list of active malware domains.

  • geosite:phishing
    Contains a list of scam and phishing domains.

  • geosite:cryptominers
    Contains a list of cryptocurrency miners that run in the background of a web browser and affect system performance.

  • geosite:social
    Contains Domain Addresses of popular social media platforms, including Facebook, Instagram, Whatsapp, Twitter, LinkedIn, MySpace, Pinterest, Tumblr, Reddit, TikTok, clubhouse.

  • geosite:nsfw Contains a list of porn and gambling websites.

  • geosite:sanctioned Contains a list of websites that sanctioned Iran.

Categories in geosite-lite.dat
  • geosite:ir
    Contains non-ir TLD Iranian domains (e.g. .com .net .org etc.) and rules to bypass all .ir domains.

  • geosite:category-ir
    Mirror of geosite:ir with inactive domains removed. All IR domains get checked every 24 hours for inactive domains.

  • geosite:ads
    Contains a list of Persian advertisement and tracking domains.

Categories in security.dat
  • geosite:category-ads-all
    Contains a curated list of Persian and Foreign advertisement and tracking domains based on multiple sources. It is optimized to have as low as possible false positives while also retaining a small size and efficiency.

  • geosite:malware
    Contains a list of active malware domains.

  • geosite:phishing
    Contains a list of scam and phishing domains.

  • geosite:cryptominers
    Contains a list of cryptocurrency miners that run in the background of a web browser and affect system performance.

: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
CloudfrontCloudfrontHome PageAll rights reservedcloudfront
FastlyFastlyHome PageAll rights reservedfastly
G-CoreG-CoreHome PageAll rights reservedgcore
NetflixNetflixHome PageAll rights reservednetflix
TelegramTelegramHome PageAll rights reservedtelegram
TorTor ProjectHome PageAll rights reservedtor
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
DynX-AntiBan-DomainsMrDevAnonyHome PageMITsanctioned
ir-sanctioned-domainfilteryabHome PageAll rights reservedsanctioned
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