"Iran Hosted Domains" is a comprehensive list of Iranian domains and services that are hosted within the country.
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.
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.
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 rulesiran.dat
can be used in v2fly, v2ray, and xray clients. Similarly, cores related to SingBox can use the iran-geosite.db
file.
Download iran.dat
file from here.
Copy/Import the file to your client. For example:
/usr/local/share/v2ray
Add proper rules:
ext:iran.dat:all
in bypass sectionext:iran.dat:ads
in block sectionReconnect.
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.
preferences
and click on Advanced Route Settings
.import schema...
.Download iran.dat
file from here.
Import .dat file from Route -> Three dots -> Manage Route Assets
:
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.
Reconnect.
iran-geosite.db
file from here.geosite.db
Route -> Three dots -> Manage Route Assets
:Route -> Create Route
:
geosite:ads
Block
geosite:all
Bypass
geoip:ir
Bypass
⚠️ 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.
shadowrocket.conf
file.Import From Cloud
in the Shadowrocket app and then import the file.shadowrocket.conf
and select Use Config
.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.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
rules:
section- RULE-SET,iran_ads,REJECT
- DOMAIN-SUFFIX,ir,DIRECT
- RULE-SET,iran_other,DIRECT
- GEOIP,IR,DIRECT
Rule
mode.[Rule]
sectionDOMAIN-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
⚠️ 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.
iran.dat
from here.Geo asset files
section, press +
from the top, and select the iran.dat
file.Settings
and make sure Domain Strategy
is set to IpIfNonMatch
.Custom rules
section in Settings
.DIRECT URL OR IP
tab, write ext:iran.dat:all,geoip:ir
, then press 🗸
from the top.BLOCKED URL OR IP
tab, write ext:iran.dat:ads
and then press 🗸
from the top again.For blocking local domains and IPs in the server side follow this instructions (also be sure to check #58 too).
:warning: Nekoray can use both sing-box and Xray cores. Please use the corresponding routing rules according to your selected Nekoray core.
:information_source: You can see your current Nekoray core by going to preferences
> Basic Settings
> Core
.
iran-geosite.db
from release section.geosite.db
.geosite.db
in Nekoray folder to backup-geosite.db
.geosite.db
to Nekoray folder.preferences
and click on Routing Setting
.Simple Route
tab.Direct, IP
geoip:ir
geoip:private
Direct, Domain
geosite:all
Block, Domain
geosite:ads
:warning: 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.
iran.dat
from release section.iran.dat
to Nekoray folder.preferences
and click on Routing Setting
.Simple Route
tab.Direct, IP
geoip:ir
geoip:private
Direct, Domain
ext:iran.dat:all
Block, Domain
ext:iran.dat:ads
iran.dat
file from here and place in v2rayN directory and inside bin
folder.Settings
and then select RoutingSetting
Advanced Function
and choose Add
Remarks
field choose any name and in the Rule List
empty area right-click and select Rule Add
direct
for outboundTag
and the domain section type ext:iran.dat:all
Confirm
until you reach the main app windowauto switch
Or any other Switch type profile that you use.Rule list rules
box and choose Direct for it's profile.Default
rule.Switchy
for Rule List Format
.Rule List URL
:https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/switchy_omega.sorl
Download Profile Now
.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.
iran-geosite.db
file from here and place it in the sing-box working directory.{
"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"
}
]
}
}
hysteria_client.acl
OR hysteria_server.acl
based on your usage from here.
"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)
iran.dat
file from here.curl -LO https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/iran.dat
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/
Pass Wall -> Rule Manage -> Shunt Rules
in this order:
Block
:
Block
ext:iran.dat:ads
Proxy
:
Proxy
ext:iran.dat:proxy
Direct
:
Direct
ext:iran.dat:all
(you can use other
, ir
or tld-ir
instead of all
if you want. For more info see Full categories)geoip:ir
(you can also add geoip:private
too in a new line)Pass Wall -> Node List -> Add
:
Shunt
Xray
Shunt
Blackhole
Default
Direct Connection
AsIs
for better performance or IPIfNonMatch
for better routing.Pass Wall -> Basic Settings -> Main
then:
[Shunt]
Same as the tcp node
Save & Apply
DNS
tab and hit Clear IPSET
.iran.dat
file from here and place it in assets directory.default: proxy
domain(ext:"iran.dat:ads")->block
domain(ext:"iran.dat:proxy")->proxy
domain(ext:"iran.dat:all")->direct
ip(geoip:ir)->direct
iran.dat
FileEnsuring 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.
curl
and shasum
installed on your system.curl -LO https://raw.githubusercontent.com/bootmortis/iran-hosted-domains/main/scripts/update_iran_dat.sh
chmod +x update_iran_dat.sh
crontab -e
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.Set-ExecutionPolicy unrestricted
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).
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.
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
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.
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
go run ./ --outputdir=../
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.
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.
A Python script is executed by Github Action and generates files that are on the release page.