Giter VIP home page Giter VIP logo

iran-hosted-domains's Introduction

Iran Hosted Domains

A lot of services and domains are outside of Iran and they are restricted or blocked, for accessing this service you need to use VPN or proxies with tunneling option, apart from these problems, when we use proxies the domestic services are unavailable because our IP is not in Iran; for bypassing these issues we gathered a list of Iranian domains and services to help our people bypass this situation.

Disclaimer

This repository is a compiled list of public information about websites hosted in Iran. It is intended for informational purposes only and is not intended to provide guidance on how to connect to or create or manage a virtual private network (VPN). The content in this repository is provided as-is and we make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability of the information contained in this repository. Any reliance you place on such information is strictly at your own risk. We will not be liable for any errors or omissions in the information or for any losses, damages, or other liabilities that may arise from its use. Please use caution and consult with a qualified professional before using any information from this repository.

Usage

This can differ depending on which tool you use. You can download the domains list from the release page.
for quick review of all release files see Files section.
In v2ray/Xray clients you can set Domain Resolution Strategy to IPIfNonMatch for better routing, or AsIs for better performance. See #83 for more info.

iran.dat/iran-geosite.db general rules

iran.dat can be used in v2fly, v2ray, and xray clients. Similarly, cores related to SingBox can use the iran-geosite.db file.

  1. Download iran.dat file from here.

  2. Copy/Import the file to your client. For example:

    • v2ray macOS: /usr/local/share/v2ray
  3. Add proper rules:

    • ext:iran.dat:all in bypass section
    • ext:iran.dat:ads in block section
  4. Reconnect.

Full categories

  • ir: handpicked .ir domains, use as direct.
  • other: non .ir domains, use as direct.
  • tld-ir: all .ir domains, use as direct.
  • all: a combination of other and tld-ir, should be used as direct.
  • ads: Iran-related advertising services that need to be blocked.
  • proxy: Iran-related domains that are blocked inside of iran and need to be proxied.

In the release section, you'll find the qv2ray_schema file.

  1. Download the file.
  2. open preferences and click on Advanced Route Settings.
  3. From the bottom of the screen, click on import schema....
  4. choose the downloaded file (qv2ray_schema.json).
  5. in the opened dialogue box, click on yes.
  6. Click on OK.
  1. Download iran.dat file from here.

  2. Import .dat file from Route -> Three dots -> Manage Route Assets:

  3. Add proper rules Route -> Create Route: - Block Ads: - domain: geosite:category-ads-all - outbound: Block - Block Iran Ads: - domain: ext:iran.dat:ads - outbound: Block - Bypass Iran Domains: - domain: ext:iran.dat:all - outbound: Bypass - Bypass Iran geoip: - ip: geoip:ir - outbound: Bypass

    for screenshots of routing settings click here.

  4. Reconnect.

  1. Download iran-geosite.db file from here.
  2. Rename it to geosite.db
  3. Import .db file from Route -> Three dots -> Manage Route Assets:
  4. Add proper rules Route -> Create Route:
    • Block Iran Ads:
      • domain: geosite:ads
      • outbound: Block
    • Bypass Iran Domains:
      • domain: geosite:all
      • outbound: Bypass
    • Bypass Iran geoip:
      • ip: geoip:ir
      • outbound: Bypass
  5. Reconnect.

⚠️ Important: You are replacing default geosite with iran-geosite.db by doing this, so you can't use default geosite categories like category-ads-all. You can switch back to default geosite by updating geosite.db from Manage Route Assets section.

  1. Download shadowrocket.conf file.
  2. Tap Import From Cloud in the Shadowrocket app and then import the file.
  3. Finally, tap on the shadowrocket.conf and select Use Config.
  1. Make sure you are using at least version 2023.04.13 of Clash Premium Core Or v1.14.4 of Clash.Meta Core. If not, you can use the old version format described in the third step.
  2. Open your current profile/config that you use.
  3. Add these lines to the file:
rule-providers:
  iran_other:
    type: http
    format: text
    behavior: domain
    url: "https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/clash_rules_other.txt"
    path: ./ruleset/iran_other.txt
    interval: 432000
  iran_ads:
    type: http
    format: text
    behavior: domain
    url: "https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/clash_rules_ads.txt"
    path: ./ruleset/iran_ads.txt
    interval: 432000

⚠️ Note: If you are using older versions add these instead :

rule-providers:
  iran_other:
    type: http
    behavior: domain
    url: "https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/clash_rules_other.yaml"
    path: ./ruleset/iran_other.yaml
    interval: 432000
  iran_ads:
    type: http
    behavior: domain
    url: "https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/clash_rules_ads.yaml"
    path: ./ruleset/iran_ads.yaml
    interval: 432000
  1. Add these lines to rules: section
- RULE-SET,iran_ads,REJECT
- DOMAIN-SUFFIX,ir,DIRECT
- RULE-SET,iran_other,DIRECT
- GEOIP,IR,DIRECT
  1. Save the file.
  2. Based on the client, you may need to set clash on Rule mode.
  1. Open your current profile/config that you use.
  2. Add these lines to [Rule] section
DOMAIN-SET,https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/surge_domainset_ads.txt,REJECT,update-interval=432000
DOMAIN-SUFFIX,ir,DIRECT
DOMAIN-SET,https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/surge_domainset_other.txt,DIRECT,update-interval=432000
GEOIP,IR,DIRECT

Surfboard ignore update-interval at this moment, consider updating from Tool>External resources

⚠️ Note: If you are using older Surge versions (before Surge for Mac v3.5.1/Surge for iOS v4.2.2) add these instead:

RULE-SET,https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/surge_ruleset_ads.txt,REJECT,update-interval=432000
DOMAIN-SUFFIX,ir,DIRECT
RULE-SET,https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/surge_ruleset_other.txt,DIRECT,update-interval=432000
GEOIP,IR,DIRECT
  1. Save the file.
  2. Set 'Outbound Mode' to 'Rule-based'.

⚠️ Note : in case that blocked websites are not working with 'Rule-based' mode, consider adding this rule before 'FINAL' rule:

DOMAIN-KEYWORD,,YourFinalProxy/ProxyGroup,force-remote-dns

Use your own Proxy/ProxyGroup instead of 'YourFinalProxy/ProxyGroup'

🚨 You can also use Surge's Rule-Set or Domain-Set in Loon / LanceX.

📽️ Video tutorial

  1. First download iran.dat from here.
  2. From the menu, go to the Geo asset files section, press + from the top, and select the iran.dat file.
  3. From the menu, go to Settings and make sure Domain Strategy is set to IpIfNonMatch.
  4. Go to the Custom rules section in Settings.
  • In the DIRECT URL OR IP tab, write ext:iran.dat:all,geoip:ir, then press 🗸 from the top.
  • In the BLOCKED URL OR IP tab, write ext:iran.dat:ads and then press 🗸 from the top again.
  1. Hit back, and that's it.

For blocking local domains and IPs in the server side follow this instructions (also be sure to check #58 too).

⚠️ Nekoray can use both sing-box and Xray cores. Please use the corresponding routing rules according to your selected Nekoray core.

ℹ️ You can see your current Nekoray core by going to preferences > Basic Settings > Core.

  1. Download iran-geosite.db from release section.
  2. Rename it to geosite.db.
  3. Rename geosite.db in Nekoray folder to backup-geosite.db.
  4. Copy the downloaded geosite.db to Nekoray folder.
  5. Open preferences and click on Routing Setting.
  6. Go to Simple Route tab.
  7. Copy the following lines to the corresponding fields:
  • Direct, IP
geoip:ir
geoip:private
  • Direct, Domain
geosite:all
  • Block, Domain
geosite:ads
  1. Press OK button and restart the app.

⚠️ Important: By changing the default geosite.db, you can't use default geosite categories like category-ads-all. You can switch back to default geosite by removing the new geosite.db and renaming backup-geosite.db back to geosite.db. You can also download the original geosite.db from sing-geosite.

  1. Download iran.dat from release section.
  2. Copy iran.dat to Nekoray folder.
  3. Open preferences and click on Routing Setting.
  4. Go to Simple Route tab.
  5. Copy the following lines to the corresponding fields:
  • Direct, IP
geoip:ir
geoip:private
  • Direct, Domain
ext:iran.dat:all
  • Block, Domain
ext:iran.dat:ads
  1. Press OK button and restart the app.
  1. Download iran.dat file from here and place in v2rayN directory and inside bin folder.
  2. Open v2ray and select Settings and then select RoutingSetting
  3. In the new window click on Advanced Function and choose Add
  4. In the new window, in Remarks field choose any name and in the Rule List empty area right-click and select Rule Add
  5. In the new window choose direct for outboundTag and the domain section type ext:iran.dat:all
  6. Click on Confirm until you reach the main app window
  7. Make sure that your rule is selected from the bottom of the page. If not choose it from the drop down menu.
  1. Open SwitchyOmega Options.
  2. Go to auto switch Or any other Switch type profile that you use.
  3. Check Rule list rules box and choose Direct for it's profile.
  4. Choose your proxy's profile for Default rule.
  5. Use Switchy for Rule List Format.
  6. Enter this URL for Rule List URL:
https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/switchy_omega.sorl
  1. Tap Download Profile Now.
  2. Apply Changes.
  3. Set SwitchyOmegas's mode to auto switch or your other Switch type profile that you use.

    For updating rules's list just repeat step 7.

geosite.srs formatting:

Open the sing-box config file and edit the Route section in this format:

{
  "route": {
    "rule_set": [
      {
        "tag": "iran-geosite-ads",
        "type": "remote",
        "format": "binary",
        "update_interval": "7d",
        "url": "https://github.com/bootmortis/sing-geosite/releases/latest/download/geosite-ads.srs"
      },
      {
        "tag": "iran-geosite-all",
        "type": "remote",
        "format": "binary",
        "update_interval": "7d",
        "url": "https://github.com/bootmortis/sing-geosite/releases/latest/download/geosite-all.srs"
      }
    ],
    "rules": [
      {
        "rule_set": [
          "iran-geosite-ads"
        ],
        "outbound": "block"
      },
      {
        "rule_set": [
          "iran-geosite-all"
        ],
        "outbound": "direct"
      }
    ]
  }
}

geosite.db formatting:

⚠️ Important: Geosite is deprecated and may be removed in the future, check Migration or here.

  1. Download iran-geosite.db file from here and place it in the sing-box working directory.
  2. Open the sing-box config file and edit the Route section in this format
{
  "route": {
    "geosite": {
      "path": "iran-geosite.db",
      "download_url": "https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/iran-geosite.db"
    },
    "rules": [
      {
        "geosite": "all",
        "outbound": "direct"
      },
      {
        "geosite": "ads",
        "outbound": "block"
      },
      {
        "domain_suffix": [".ir"],
        "outbound": "direct"
      }
    ]
  }
}
  1. For more information about the sing-box config template see here.
  1. Download hysteria_client.acl OR hysteria_server.acl based on your usage from here.
    • hysteria_client.acl : block Iran ADs and bypass other Iran Domains/IPs (for client)
    • hysteria_server.acl : block all Iran Domains/IPs (for server)
  2. Add these lines to your conifg:
    "acl": "acl_file_path",
    "mmdb": "GeoLite2-Country.mmdb"

'acl_file_path': path of downloaded .acl file

Only tested with Xray core. (v2ray core may work too)

  1. Download iran.dat file from here.
curl -LO https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/iran.dat
  1. Move iran.dat to /usr/share/v2ray/ directory. (you can see the correct directory in Pass Wall -> Rule Manage -> Location of V2ray/Xray asset)
mv iran.dat /usr/share/v2ray/
  1. Create these new Shunt Rules in Pass Wall -> Rule Manage -> Shunt Rules in this order:
    1. Block:
      • Remarks: Block
      • Domain: ext:iran.dat:ads
    2. Proxy:
      • Remarks: Proxy
      • Domain: ext:iran.dat:proxy
    3. Direct:
      • Remarks: Direct
      • Domain: ext:iran.dat:all (you can use other, ir or tld-ir instead of all if you want. For more info see Full categories)
      • IP: geoip:ir (you can also add geoip:private too in a new line)
  2. Create new node in Pass Wall -> Node List -> Add:
    • Node Remarks: Shunt
    • Type: Xray
    • Protocol: Shunt
    • Block: Blackhole
    • Proxy: Default
    • Direct: Direct Connection
    • Default: One of your other nodes
    • Domain Strategy: AsIs for better performance or IPIfNonMatch for better routing.
  3. Go to Pass Wall -> Basic Settings -> Main then:
    • TCP Node: [Shunt]
    • UDP Node: Same as the tcp node
    • Hit Save & Apply
    • You can also go to DNS tab and hit Clear IPSET.
  1. Download iran.dat file from here and place it in assets directory.
  2. Use the following rules (More Info):
default: proxy

domain(ext:"iran.dat:ads")->block
domain(ext:"iran.dat:proxy")->proxy
domain(ext:"iran.dat:all")->direct
ip(geoip:ir)->direct

Automatically Updating the iran.dat File

Ensuring that you have the latest version of the iran.dat file is crucial for accurate filtering of Iranian domains. This section will guide you on how to set up an automated process to update the file on a regular basis.

Linux

Prerequisites

  • You should have curl and shasum installed on your system.

Usage

  1. Download the update_iran_dat.sh script from this repository. (if you use ash, like OpenWrt, download update_iran_dat.ash instead)
    curl -LO https://raw.githubusercontent.com/bootmortis/iran-hosted-domains/main/scripts/update_iran_dat.sh
  2. Make the script executable by running the following command in the terminal:
    chmod +x update_iran_dat.sh
  3. Open your crontab file by running the following command:
    crontab -e
  4. In the crontab editor, add the following line to schedule the script to run every Tuesday (a day after we update iran.dat):
    0 0 * * 2 /path/to/update_iran_dat.sh /path/to/iran.dat
    Make sure to replace /path/to/update_iran_dat.sh with the actual path to the script on your system and /path/to/iran.dat with the actual path to the iran.dat file that you want to update.
  5. Save the crontab file and exit the editor.

Windows

Prerequisites

  • Since the script is not signed, you must have the appropriate execution policy to run it.
  • This can be achieved by running the following command in a Powershell window with administrative rights:
    Set-ExecutionPolicy unrestricted

Usage

  1. Download the update_iran_dat.ps1 script from this repository and move it to your preferred location (next to iran.dat file should be good).

  2. Run the Windows command prompt as Administrator and execute the following command:

    SCHTASKS /CREATE /SC WEEKLY /D TUE /TN "UPDATE IRAN.DAT" /TR "powershell -File '<path\to\update_iran_dat.ps1>' '<path\to\iran.dat>'" /ST 19:00

    Make sure to replace <path\to\update_iran_dat.ps1> with the actual path to the script on your system and <path\to\iran.dat> with the actual path to the iran.dat file that you want to update.

The scripts handle the process of updating the iran.dat file. They check if the file already exists and compare the checksum of the existing file with the latest version available on the repository. If a new version is available, they download the updated file and replace the existing one. If the local file doesn't exist, they simply download the latest version and save it to the specified path.

Note: The script assumes that you have the necessary permissions to write to the directory where the iran.dat file is located. If you encounter any issues, ensure that the script has appropriate write permissions or modify the script accordingly.

It is recommended to test the script manually before setting up the cron job or SCHTASK to ensure it executes correctly.

Create .dat file manually (Tutorial)

1. Install golang

It's important to install the right version. Always check it from v2fly/domain-list-community.

git clone https://github.com/v2fly/domain-list-community

3. Prepare domains

In a .dat file, you can have as many distinct groups as you want. Each of these groups can be in bypass, proxy or blocked sections. Each group can have as many domains as you want.

Each group is a txt file containing domains. For example, you can have an ads.txt file containing ad domains.

4. Move files to /data

When cloning domain-list-community, you also clone all the groups that have been there before. Since you don't need them, delete everything in /data directory.

Now you have to copy your files to /data directory. Make sure to remove their file extension. So for example, ads.txt needs to be ads.

cd domain-list-community
rm data/*

cp ~/ads.txt data/ads

5. Run the program

go run ./ --outputdir=../

Files

You can always find the latest version of these files in the release page.
You can click on app name to see the usage instructions.
Also, for each file there is a .sha256 file that contains sha256 hash of that file.

  • clash_rules_ads.txt, clash_rules_ads.yaml, clash_rules_other.txt and clash_rules_other.yaml: Contains all ADs and non-ir domains for clash in two different formats.
  • domains.txt: Contains all websites hosted in Iran.
  • hysteria_client.acl and hysteria_server.acl: see Hysteria section.
  • iran-geosite.db: for sing-box core see Sing-Box section.
  • geosite-*.srs files: for sing-box v1.8 and later, these files are available here.
  • iran.dat: Contains all websites hosted in Iran, ADs and proxy related domains for v2ray/xray, see Full Categories for more info.
  • qv2ray_schema.json: Importable json schema that can be used in Qv2ray.
  • shadowrocket.conf: Importable conf file that can be used in Shadowrocket.
  • surge_domainset_ads.txt, surge_domainset_other.txt, surge_ruleset_ads.txt and surge_ruleset_other.txt: Contains all ADs and non-ir websites hosted in Iran for Surge in two different formats.
  • switchy_omega.sorl: Contains domains for SwitchyOmega.

Sources & Acknowledgements

If you know of any other source, or you found a website that isn't here, please open an issue or add that specific website to custom_domains.py and make a PR.

How does it work?

A Python script is executed by Github Action and generates files that are on the release page.

iran-hosted-domains's People

Contributors

alirbara avatar amin2plus avatar amir-fo avatar bootmortis avatar chocolate4u avatar dozheiny avatar emranovin avatar fakhamatia avatar hawshemi avatar m-gholami avatar m0ckinguy avatar m4hbod avatar mahanmi avatar mmrabbani avatar morteza561 avatar shirleywilkinson avatar srezasm avatar tirbod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iran-hosted-domains's Issues

⚠️ Change ADS source

اینطور که من از اینجا تازه متوجه شدم لایسنس این پروژه با لایسنس سورس تبلیغات ما یعنی MasterKia/PersianBlocker سازگاری نداره.
از این جهت باید سورس تبلیغات به سورسی که سازگار باشه تغییر پیدا کنه.

طبق پیشنهادی که @MasterKia در اینجا داد می‌تونیم از یکی از دو تا سورس زیر استفاده کنیم:

این ایشو رو قبل از اینکه تغییرات اعمال بشه می‌زارم چند روز باز باشه تا اینکه ببینم سورس بهتری سراغ دارید یا نه و اینکه اطلاع رسانی بشه بابت تغییر سورس
پ.ن.: در نحوه‌ی استفاده از پروژه تغییر و ناسازگاری‌ای نداریم.

read more:

Tutorial for v2rayN

سلام،

اگر به آخر هر دامنه توی فایل دامنه ها کاما ( , ) اضافه بشه میشه توی v2rayN از طریق منوی settings -> routing settings -> advance functions - > add وبعد انتخاب یک نام و کلیک توی قسمت خالی و انتخاب Rule Add و کپی کردن تمام دامنه ها در قسمت دامنه و انتخاب direct، ارتباط مستقیم با دامنه ها گرفت.
من کاما رو اضافه کردم وفایل نوت رو پیوست کردم که اگر خواستید اضافه کنید.
domains.txt

تغییر ساختار route

Feature Request

https://github.com/iranxray/hope/blob/main/routing.md#%D9%85%D8%B3%D8%AF%D9%88%D8%AF%D8%B3%D8%A7%D8%B2%DB%8C-%D8%A7%D8%B2-%D8%B3%D9%85%D8%AA-%D8%B3%D8%B1%D9%88%D8%B1

Description

مورد که وجود دارد اینکه در آموزش مطرح شده زمانیکه vpn روشن می باشد هر سایت ایرانی که باز شود از سمت سرور مسدود می شود و کاربر با vpn نمی تواند وارد سایت ایرانی شود.

Suggested Solution

اما عملکرد اصلی ک در برنامه مثل v2rayng و امثال اینها برای گزینه direct تعریف شده باز کردن سایت یا برنامه ایرانی با ایپی ایران است یا همان real ip بهتر هست کانفیگ را جوری تغییر دهید که کاربر برای رفتن به سایت یا نرم افزار ایرانی نیاز به قطع کردن vpn نداشته باشد و با همان ایپی ایران بتواند به راحتی اینکار را انجام دهد در حالتی که vpn هم وصل می باشد و این تنظیمات هم از سمت سرور اعمال شده باشد.

استفاده از لیست اینماد

با سلام
استفاده از لیست اینماد، می‌تواند لیست را بسیار غنی تر کند. بسیاری فروشگاه های ایرانی برای عضویت در ترافیک نیم بها اقدام نکردند. ولی به دلیل اجبار درگاه پرداخت، مجبور هستند در سایت اینماد ثبت نام کنند. لذا اضافه کردن این لیست می‌تواند کمک کننده باشد
https://enamad.ir/DomainListForMIMT

به عنوان یک مثال، فروشگاه sarabara.com و banimode.com و bimebazar.com فروشگاه های داخل ایران هستند که در سایت نیم بها ثبت نام نکرده و در نتیجه در این مخزن لیست نشده اند.

باتشکر فراوان

Add `kakohost.com`

Add/Remove Domain

Domain Name

Please provide the name of the domain you would like to add or remove.
Also, specify whether you want to add/remove this domain from the Bypass List or the Block List.

Reason for Add/Remove

Why do you want to add or remove this domain from the list?

Supporting Evidence

If possible, please provide any relevant supporting evidence for your request (e.g. screenshot).

Additional Information

Any additional information you would like to provide.

اضافه کردن سایت جدید

sb24.ir
pmlm.ir
pay98.app
sdb247.com
iranicard.ir
giftcardgo.ir
arvancloud.ir
zoomit.ir
nextpay.org
qr-code.ir
javab24.com
opizo.com
zoomg.ir
hard-repair.com
masterkala.com
mobone.ir
apktops.ir
androidkade.com
numberland.ir
datisnetwork.com
hivanetwork.com
webhostingtalk.ir
sarvdata.com
parsdev.com
takhfifan.com
intrack.ir
mehrafarinorg.ir
mehrafarinorg.com

لطفا این لیست را اضافه کنید

Add blocked webistes in Iran

Feature Request

If we have a list of well used blocked websites with their resources (e.g., css) we can easily choose only blocked websites to use proxy. This will help to have a seamless access to internet.

We have a script that test blocked websites from ooni and extract the resources and external links.
Please checkout our repository: https://github.com/hiddify/filterchi_report

TODO: v2rayA (RoutingA) rules

Rules for v2rayA

Place iran.dat in the v2ray assets directory.

default: proxy

domain(ext:"iran.dat:ads")->block
domain(regexp: ^.+\.ir$)->direct
domain(ext:"iran.dat:other")->direct
ip(geoip:ir)->direct

More info

P.S. For readers: if you need clarification about whether check docs or issues for guides, I use issues as my to-do list for future updates to the repo, so wait for updates in the main branch or use these issues as is.

Sanctioned websites

Feature Request

Add a category for sanctioned websites

Description

Please see this file

Even that it is not updated, it can be a good starting point

Motivation

We can have whitelist and blacklist domains to help user to choose bypass or proxy specific domains

Example

chatgpt is blocked in Iran

Shadowrocket not Working.

Shadowrocket after updating to support vision flow, is not working with the shadowrocket.conf file in this repo.
For example, it will proxy google.com but it will block Instagram and youtube.
something is wrong with the config file.

Thanks

سایت همراه کارت

این دامین هم باید اضافه بشه به لیست
hamrahcard.net

اپلیکیشن آیفون همراه کارت هم تشخیص میده که به vpn وصل هستیم. یعنی سرویسش توی این لیست نیست و نمیدونم از چه دامینی استفاده میکنه.

Add/Remove `digimovie.vip`

اگر امکان پذیر هست این سایت رو بررسی کنید.

من با استفاده از این اموزش #58 (comment)

در سرور سایت های ایرانی رو مسدود کردم و برای باز کردن سایت های داخلی با ایپی ایران از clash استفاده میکنم.

ولی متاسفانه clash این ادرس digimovie.vip در rule ها پیدا نمی کنه جهت direct کردن و باعث مسدودی و لود نشدن سایت میشه.

[Feature] Surge RULE-SET/DOMAIN-SET

Feature Request

Description

Add Rule-Set and Domain-Set for Surge.

Motivation

Many proxy tools including ShadowRocket, Surge, SurfBoard , Loon , lanceX, Quantumult X, etc. support Surge's Domain-Set or Rule-Set format, so it would be great if added.

Example

Current clash_rules.yaml equivalent:
Domain-Set:
surge-domainset.txt
Rule-Set:
surge-ruleset.txt

This repo is great example.

Suggested Solution

Most tools including Surfboard, Surge, ShadowRocket, etc. follow Surge's rules format.

[Rule]
#other rules
DOMAIN-SET,url,DIRECT # OR RULE-SET,url,DIRECT
#other rules

Additional Information

Domain-Set is more suitable for large number of rules but some apps only support Rule-Set.

Current shadowrocket.conf direct rules could be replaced with:

DOMAIN-SET,url,DIRECT
GEOIP,IR,DIRECT

OR
RULE-SET,url,DIRECT

Surge's Domain-Set isn't compatible with clash, but with classical behavior and new text format Surge's Rule-Set could be also used with clash.

Additional Request

Addition of separate domain-set/rule-set without .ir domains and separate domain-set/rule-set that include ir-ads would be great.

Thanks for this great repo.

Add `google.com`

سلام وقت بخیر اولا ممنون بابت زحماتتون
یه پیشنهاد داشتم باتوجه به اینکه اخیرا گوگل آی پی سرور هارو بلاک کرده و اجازه نمیده از طریق فیترشکن سرچ انجام بشه، گوگل و بقیه سایت های خارجی که فیلتر نیستن رو هم اضافه و یا یه لیست دیگه ازشون تهیه کنید که bypass بشن

sha256 checksum files

Please add sha256 checksums to release files.
Needed for auto download on both clients and servers so it's verified and don't overwrite older files if the new downloaded file is corrupted.

Auto update .dat file on clients

#!/bin/bash

url="https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/iran.dat"
current_file="iran.dat"

if [ -f "$current_file" ]; then
    new_checksum=$(curl -L "$url.sha256" | cut -d " " -f 1)
    current_checksum=$(shasum -a 256 "$current_file" | cut -d " " -f 1)

    # Compare the two checksums
    if [ "$new_checksum" != "$current_checksum" ]; then
        curl -L "$url" -o "$current_file.temp"
        # Replace the current file with the new file only if the new one is valid
        if [ "$(shasum -a 256 "$current_file.temp" | cut -d " " -f 1)" == "$new_checksum" ]; then
            mv "$current_file.temp" "$current_file"
            echo "Domains file updated successfully."
        else
            rm "$current_file.temp"
            echo "Domains file is invalid."
        fi
    else
        echo "Domains file is already up to date."
    fi
else
    curl -L "$url" -o "$current_file"
    echo "Domains file downloaded successfully."
fi

Add `parsvds.com`

Add/Remove Domain

Domain Name

Please provide the name of the domain you would like to add or remove.
Also, specify whether you want to add/remove this domain from the Bypass List or the Block List.

Reason for Add/Remove

Why do you want to add or remove this domain from the list?

Supporting Evidence

If possible, please provide any relevant supporting evidence for your request (e.g. screenshot).

Additional Information

Any additional information you would like to provide.

مشکل در v2rayng

وقتی که فایل iran.dot سرجاش کپی میشه و rule ها ست میشن، موقع وصل شدن ارور
Start service failed
رو میده و هیچ کانفیگی وصل نمیشه دیگه، مگر rule ها رو پاک کنی

اشتباه در فایل shadowrocket.conf

سلام
در فایل shadowrocket.conf در خط ۸ تا مانده به آخر

نوشته شده:
DOMAIN-SUFFIX,zzzagros.com,DIRECTUSER-AGENT,Line*,PROXY

که احتمالا باید اصلاح شود به شکل:
DOMAIN-SUFFIX,zzzagros.com,DIRECT
USER-AGENT,Line*,PROXY

و با توجه به الگوهایی که در سایر خطوط وجود دارد به نظر میرسد این دو خط به اشتباه در یک خط امده است
و باید جدا شوند
هر چند معنی خط USER-AGENT,Line*,PROXY را دقیق نمیدانم چه چیزی است و دقیقا چه چیزی به proxy هدایت میشود و ایا نیاز هست یا نه. ولی در هر حال اشتباه چسبیدن دو خط رخ داده است

مشکل کانفیگ شدوراکت

سلام
فایل کانفیگ شدوراکت رو وقتی ست کردم، سایت های ایرانی رو باز میکنه ولی سایت های خارجی رو باز نمیکنه

create geoip in addition to geosite

سلام
نمیدونم این پیشنهادی که خدمتتون میدم، در حوزه این پروژه است یا خیر. اگر لیست IP های ایران را با دقت بیشتری داشته باشیم، تعداد زیادی دامنه را یکباره اضافه در نظر گرفتیم
پروژه v2ray لیست IP را از پروژه زیر می‌گیرد
https://github.com/v2fly/geoip
این پروژه هم لیست را از Maxmind می‌گیرد و آن را به فایل DAT برای استفاده v2ray تبدیل می‌کند.
https://dev.maxmind.com/geoip/geoip2/geolite2/
متاسفانه پروژه Maxmind چندان بر روی IP های ایران دقیق نیست.

این پروژه می‌تواند از همان کد v2fly/geoip استفاده کند و به جای دیتابیس Maxmind، از دیتابیس‌های دیگر استفاده کند تا لیست خیلی کامل‌تری از IP های ایران ایجاد کند. در این صورت سایت ها و سرویس های زیادی به یکباره در نظر گرفته می‌شوند.
چند دیتابیس که می‌تواند استفاده شود را در زیر نوشتم. طبیعتا لیست های دیگری هم میتوانند در نظر گرفته بشوند.
۱. دیتابیس IP2location
https://lite.ip2location.com/iran-(islamic-republic-of)-ip-address-ranges
این سایت اطلاعات را به صورت رایگان و در فرمت های مختلف مانند csv و txt برای دانلود قرار داده است.
۲. وبسایت nirsoft که دیتابیس را به فرمت csv در اختیار می‌گذارد. البته اطلاعات چندان جدید نیست
https://www.nirsoft.net/countryip/ir_date.html
۳. لیست IPهای آروان. بعضی از این لیست برای کشورهای مختلف ثبت شدند. البته که با استفاده از anycast این IP ها جای مشخصی ندارند و می‌توانیم آن را ایرانی در نظر بگیریم.
https://www.arvancloud.ir/fa/dev/ips
این لیست هم به صورت txt در دسترس است.

مسدود سازی آیپی های ایران در نرم افزار NapsternetV

ممنون بابت تاپیک بسیار مفیدی که ایجاد کردید
با توجه به اینکه اگر بخوایم کانفیگ رو بدیم کسی استفاده کنه ممکنه پخش بشه بنابراین من از برنامه NapsternetV برای اتصال استفاده میکنم و با hardwarecode اون کانفیگ رو قفل میکنم که فقط روی سیستم خودش استفاده بشه (همچنین چون نسخه IOS هم داره کار رو راحت میکنه برای کسانی که اپل دارن و همه از یه نرم اقزار استفاده میکنند)
اما مشکلی که برام پیش آمده اینه که میخواستم روی این فایل کانفیگ تغییراتی اعمال کنم که IP های ایران رو هم مستقیم وصل بشه و از پروکسی عبور نکنه مشابه همین مورد که توضیح داده شده برای برنامه V2rayNG ممنون میشم راهنمایی کنید در NapsternetV چطور باید این تغییرات ایجاد بشه؟ خودم تلاش کردم فایل کانفیگ رو ویرایش کنم اما با پیامی روبرو شدم که میگه failed to load geoip:ir

تنظیمات در برنامه نکوباکس

سلام و سپاس. تنظیمات برنامه نکوباکس به چه صورت هست چون نکوباکس پسوند dat رو قبول نمیکنه!
ممنون میشم راهنمایی بفرمائید.

Nekoray tutorial is not correct

Bug Report

Description

Hi,
The Nekoray tutorial to add domains misses a point where each line of the domains should start with "domain:".
eg. "tci.ir" should be converted to "domain: tci.ir" and then placed under direct domain category on routing settings of Nekoray.

Steps to Reproduce

Just copied the contents of domains.txt in direct domain category on routing settings of Nekoray without any change to the contents.

Expected Outcome

Expected to open Iranian websites like tci.ir with Nekoray started.

Actual Outcome

Couldn't open the websites.

Additional Information

Used Notepad++ to add a "domain:" text to each line of domains.txt and then copied the contents to direct domain category on routing settings of Nekoray.
The problem was solved after the mentioned change to contents.
Find and Replace settings used in Notepad++ to add the "domain:" text:
image

add new domain myirancell

Add/Remove Domain

Domain Name

tapture.ir

Reason for Add/Remove

گویا در نسخه جدید مای ایرانسل آدرس جدیدی اضافه شده که برای ورود نیاز هست که با ایپی ایران باز بشه لطفا یک بررسی کنید مرسی

داکیومنت فارسی اشتباه است

سلام

در داکیومنت فارسی به اشتباه گفته شده که ext:iran.dat:other باید route شود به پروکسی

در صورتی که این لیست شامل سایتهای ایرانی میباشد که دامنه انها به ir ختم نمیشود مانند varzesh3.com

در نتیجه این لیست نیز باید direct route باشد .

خلاصه اینکه هم ext:iran.dat:other

و هم ext:iran.dat:ir که شامل دامنه های ایرانیست که به ir ختم میشوند
هر دو باید direct route باشند

در داکیومنت فارسی در دو بخش
v2rayng
v2ray server
این اشتباه وجود دارد و در سایر قسمتها درست است

مرج کردن با لیست v2fly

درود

از انجایی که روتر های بسیاری به PassWall و هسته xray و هسته v2ray مجهزند، امکان افزودن فایل dat شما توسط افراد مبتدی وجود ندارد لذا با دولوپر های v2fly و همینطور loyalsoldier صحبت کنید تا دامین های ایرانی رو در لیستشون قرار بدند و پیگیر این مساله در هر دو ریپو نامبرده باشید

سپاس

استفاده در Nekoray

سلام وقت بخیر
نمیشه از فایل iran.dat توی Nekoray استفاده کرد ؟ من هر کاری میکنم لود نمیشه . فایل dat هم داخل پوشه assets که تنظیم کردم قرار دادم .

image

image

راهنمایی در مورد آموزش ریپوی iranxray/hope

Bug Report

سلام گویا فایل dat دچار تغییراتی شده که باعث شده این آموزش
https://github.com/iranxray/hope/blob/main/routing.md

دیگه جوابگو نباشه چون موقع استفاده خطا میده که category مورد استفاده پیدا نشد

Description

image

        "regexp:.*\\.ir$",
        "ext:iran.dat:ir",
        "ext:iran.dat:other",
        "geosite:category-ir-gov",
        "geosite:category-ir-news",
        "geosite:category-ir-bank",
        "geosite:category-ir-tech",
        "geosite:category-ir-travel",
        "geosite:category-ir-shopping",
        "geosite:category-ir-insurance",
        "geosite:category-ir-scholar",

منظور بنده این بخش است.

اگر تغییراتی کرده لطفا سریعتر اطلاع رسانی کنید و آموزش مورد نظر هم بروزرسانی بشه

یک مشکل در برنامه clash meta

image

image

من در برنامه بلوبانک و مثلا مای شاتل خواستم ورود کنم اجازه نمیده به دلیل اینکه ایپی دایرکت نمیشه براشون و با ایپی سرور ورود میکنه

image

لاگ نگاه کردم دیدم برای این آدرس درخواست میره sdb247.com به فایل رول clash_rules_other.txt اضافه کردم برای yaml و سورف برد هم اضافه کردم ، در سورف برد و کلش اندروید کار میکنه اما در کلش متا جواب نمیده !!!

نحوه استفاده از فایل در نکوباکس

درود
لطفا دستورات لازم برای بخش route در نرم افزار Nekobox با استفاده از فایل iran-geosite.db را در ریپو قرار دهید
نکوباکس کلاینت مشابه ماتسوری (از همان دولوپر) ولی مبتنی بر هسته sing box بوده و همچنین، فایل های geo آن در بخش route با فرمت db می باشند

درخواست

7leecher.net
parsget.com

را به لیست بای پس بیفزایید لطفا

Imessage blocks too

سلام ممنون از کد خوبتون
فقط اینکه آی مسیج هم بلاک میشه با این کد

اضافه شدن دامنه جامانده

          سلام وقت بخیر این دامنه ها هنوز اضافه نشدن باتشکر

pmlm.ir
pay98.app
giftcardgo.ir
qr-code.ir
javab24.com
opizo.com
hard-repair.com
masterkala.com
mobone.ir
androidkade.com
datisnetwork.com
hivanetwork.com
webhostingtalk.ir
sarvdata.com
parsdev.com
mehrafarinorg.ir
mehrafarinorg.com

Originally posted by @matador7495 in #7 (comment)

⚠️ تغییرات در قوانین کلش ۲⚠️

قوانین کلش مجددا تغییر کرده، پس از اینکه در #60 دومین‌های بسیاری به پروژه اضافه شد، حالت بهینه این هست که تمامی دومین‌های ir جداگانه در قوانین bypass شوند و صرفا دومین‌های غیر ir در قوانین لیست بشن، همچنین در قوانین جدید دومین‌های ads هم برای block کردن اضافه شده (#64).

پس لطفا از فرمت جدید قوانین استفاده کنید.

[Feature] Add New Clash Rule Provider Format

Feature Request

Description

Add a clash rule provider with domain behavior and text format.

Motivation

Domain behavior is more efficient for large numbers of rules and new text format have better matching performance and less memory usage.

Example

rule-providers:
  iran:
    type: http
    behavior: domain
    format: 'text'
    url: ""
    path: ./ruleset/iran.txt
    interval: 432000

Current clash_rules.yaml would look like this with domain behavior and in text format:
clash_rules.txt

Suggested Solution

classical's DOMAIN-SUFFIX equivalent is +. wildcard in domain .

Additional Information

With domain behavior , GEOIP rule should be added separately.

Additional Request

It would be great if another clash_rules file without .ir domains would be added, it would reduce file size and improve matching speed, and all .ir domains could be bypassed separately with DOMAIN-SUFFIX,ir .

Add/Remove `blubank.sb24.ir`

Add Domain

blubank.sb24.ir

add the domain to the bypass list, please.

Reason for Add

the app's traffic always goes through VPN and apparently it's not on the bypass list.

اسم ثابت برای فایل

سلام
اسم فایل ثابت باشه بهتره که بشه همیشه از یک آدرس مشخص فراخوانی کرد.

ممنون

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.