Iran-sing-box-rules

Chocolate4UGPL-3.0活跃维护

为 sing-box 及客户端提供增强路由规则集,内置伊朗域名,并强化安全防护与广告拦截,适合需要精细化分流和屏蔽恶意站点的代理用户。

Enhanced sing-box and sing-box-clients routing rules with built-in Iranian domains and a focus on security and adblocking.

202611091324发布于 2026-11-09 13:46 UTC351star +2 / 7 天28fork同步于 2026-11-10 18:01 UTC

怎么上手

由 README 提炼,执行前请确认
在 sing-box 配置的 route.rule_set 中添加远程规则,例如:{"tag":"geosite-ir","type":"remote","format":"binary","url":"https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-ir.srs"}
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

面向伊朗用户的 sing-box 增强路由规则集,内置伊朗域名与 IP,并兼顾安全与广告拦截

为 sing-box 及客户端提供增强路由规则集,内置伊朗域名,并强化安全防护与广告拦截,适合需要精细化分流和屏蔽恶意站点的代理用户。

核心能力

  • 提供 geoip-ir 与 geosite-ir 规则,覆盖伊朗本地域名和 IP
  • 内置 malware、phishing、cryptominers 分类用于拦截
  • 支持 sing-box v1.8.0+ 的 Rule-Set 二进制 .srs 格式
  • 同时提供 .db 格式兼容 sing-box v1.7.x 及更低版本
  • 可从 GitHub raw 或 jsdelivr CDN 拉取规则

容易踩的坑

sing-box v1.8.0+ 已弃用 GeoIP、GeoSite 和 .db 文件,应改用 Rule-Set;.db 资源仅适用于 v1.7.x 及更低版本;规则为远程 URL,需保证能访问 GitHub raw 或 jsdelivr CDN

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本202611091324
  1. 202611091324最新正式版2026-11-09 · 2026-11-09 13:46 UTC
    • Updated on Monday 2026-11-09 13:24:21 UTC
  2. 2026110711212026-11-07 · 2026-11-07 11:40 UTC
    查看更新说明
    • Updated on Saturday 2026-11-07 11:21:36 UTC
  3. 2026110612302026-11-06 · 2026-11-06 12:51 UTC
    查看更新说明
    • Updated on Friday 2026-11-06 12:30:42 UTC
  4. 2026110512462026-11-05 · 2026-11-05 13:08 UTC
    查看更新说明
    • Updated on Thursday 2026-11-05 12:46:31 UTC
  5. 2026110312242026-11-03 · 2026-11-03 12:47 UTC
    查看更新说明
    • Updated on Tuesday 2026-11-03 12:24:04 UTC

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    فارسی

    :writing_hand: Introduction

    This is an Enhanced and All-in-One set of geo-location routing files optimized for Iranian users to use in sing-box and all its compatible clients.

    :bulb: For V2Ray geolocation rules please refer to Iran V2Ray Rules
    :bulb: For Clash geolocation rules please refer to Iran Clash Rules

    :arrow_down: How to download

    From GitHub

    Rule-Set

    New Geo-Assets format introduced in sing-box v1.8.0+ in order to replace GeoIP and GeoSite.
    For more information visit rule-set

    See here for a list of all supported rule-set assets.

    [!WARNING] GeoIP, GeoSite and all .db files in general are deprecated in sing-box v1.8.0+ and you should use Rule-Set instead. Only use .db assets if you are using sing-box v1.7.x and lower.

    :bulb: Rule-Set assets are in these formats: geoip-xx.srs and geosite-xx.srs. Replace xx with your desired category. For example:

    Rule-Set https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-ir.srs
    Rule-Set https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-ir.srs

    DB

    GeoIP https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/release/geoip.db
    GeoSite https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/release/geosite.db

    GeoIP-Lite https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/release/geoip-lite.db
    GeoSite-Lite https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/release/geosite-lite.db

    Security-IP https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/release/security-ip.db
    Security https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/release/security.db

    From jsdelivr CDN

    Rule-Set

    Rule-Set https://cdn.jsdelivr.net/gh/chocolate4u/Iran-sing-box-rules@rule-set/geoip-ir.srs
    Rule-Set https://cdn.jsdelivr.net/gh/chocolate4u/Iran-sing-box-rules@rule-set/geosite-ir.srs

    DB

    GeoIP https://cdn.jsdelivr.net/gh/chocolate4u/Iran-sing-box-rules@release/geoip.db
    GeoSite https://cdn.jsdelivr.net/gh/chocolate4u/Iran-sing-box-rules@release/geosite.db

    GeoIP-Lite https://cdn.jsdelivr.net/gh/chocolate4u/Iran-sing-box-rules@release/geoip-lite.db
    GeoSite-Lite https://cdn.jsdelivr.net/gh/chocolate4u/Iran-sing-box-rules@release/geosite-lite.db

    Security-IP https://cdn.jsdelivr.net/gh/chocolate4u/Iran-sing-box-rules@release/security-ip.db
    Security https://cdn.jsdelivr.net/gh/chocolate4u/Iran-sing-box-rules@release/security.db

    :computer: Usage

    sing-box core

    Add the following to your sing-box client configuration:

    "outbounds": [
      {
        "type": "direct",
        "tag": "direct"
      },
      {
        "type": "block",
        "tag": "block"
      }
    ],
    "route": {
        "rules": [
          {
            "ip_is_private": true,
            "outbound": "direct"
          },
          {
            "rule_set": [
              "geosite-category-ads-all",
              "geosite-malware",
              "geosite-phishing",
              "geosite-cryptominers",
              "geoip-malware",
              "geoip-phishing"
            ],
            "outbound": "block"
          },
          {
            "rule_set": [
              "geosite-ir",
              "geoip-ir"
            ],
            "outbound": "direct"
          }
        ],
        "rule_set": [
          {
            "tag": "geosite-ir",
            "type": "remote",
            "format": "binary",
            "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-ir.srs"
          },
          {
            "tag": "geosite-category-ads-all",
            "type": "remote",
            "format": "binary",
            "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-category-ads-all.srs"
          },
          {
            "tag": "geosite-malware",
            "type": "remote",
            "format": "binary",
            "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-malware.srs"
          },
          {
            "tag": "geosite-phishing",
            "type": "remote",
            "format": "binary",
            "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-phishing.srs"
          },
          {
            "tag": "geosite-cryptominers",
            "type": "remote",
            "format": "binary",
            "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-cryptominers.srs"
          },
          {
            "tag": "geoip-ir",
            "type": "remote",
            "format": "binary",
            "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-ir.srs"
          },
          {
            "tag": "geoip-malware",
            "type": "remote",
            "format": "binary",
            "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-malware.srs"
          },
          {
            "tag": "geoip-phishing",
            "type": "remote",
            "format": "binary",
            "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-phishing.srs"
          }
        ]
      },
      "experimental": {
        "cache_file": {
          "enabled": true
        }
      }
    

    Add the following to your sing-box client configuration:

    "outbounds": [
      {
        "type": "direct",
        "tag": "direct"
      },
      {
        "type": "block",
        "tag": "block"
      }
    ],
    "route": {
      "geoip": {
          "download_url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/release/geoip.db"
      },
      "geosite": {
        "download_url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/release/geosite.db"
      },
      "rules": [
        {
          "geosite": [
            "category-ads-all",
            "malware",
            "phishing",
            "cryptominers"
          ],
          "outbound": "block"
        },
        {
          "geoip": [
            "malware",
            "phishing"
          ],
          "outbound": "block"
        },
        {
          "geosite": "ir",
          "outbound": "direct"
        },
        {
          "geoip": [
            "ir",
            "private"
          ],
          "outbound": "direct"
        }
      ]
    }
    

    :page_with_curl: Categories

    GeoIP

    • 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: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: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:phishing
      Contains Phishing IP addresses.

    • geoip:malware
      Contains Active Malware IP addresses.

    • 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:phishing
      Contains Phishing IP addresses.

    • geoip:malware
      Contains Active Malware IP addresses.

    • 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: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: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.

    GeoSite

    • 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: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:ir
      Contains non-ir TLD Iranian domains (e.g. .com .net .org etc.) with dead domains removed and rules to bypass all .ir domains.
      All IR domains from normal GeoSite get checked every 24 hours and after the removal of non-active domains, will get in this category.
      The test may not be very accurate, so I recommend updating this list daily or regularly.
    • 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.

    :information_desk_person: How is this made?

    geoip.db,geoip-lite.db are generated using source code from my fork of sing-geoip. It uses Country.mmdb,Country-lite.mmdb from Iran V2Ray Rules to generate geoip.db,geoip-lite.db.
    geosite.db,geosite-lite.db are generated using source code from my fork of sing-geosite. It uses geosite.dat,geosite-lite.dat from Iran V2Ray Rules to generate geosite.db,geosite-lite.db.

    :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)
    V2ray-rules-datLoyalsoldierHome PageGPL-3.0cn
    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
    Ad and tracking server listPeter LoweHome PageMcRae GPLads
    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 to 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 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.
    • Project S