Xray-rules-dat
English | 简体中文 | Русский | فارسی
GeoIP and GeoSite data for Xray.
GeoIP is based on IPinfo Lite, supplemented with IP data for regional routing needs and commonly used services. It supports both IPv4 and IPv6.
GeoSite is based on v2fly/domain-list-community, supplemented with blacklist and whitelist datasets for essential access needs in various regions.
Data is built daily at a scheduled time of 18:00 UTC (02:00 the following day in Beijing, 21:00 in Moscow, and 21:30 in Tehran).
Due to GitHub Actions workflow queues and scheduling, builds may finish a few minutes to several hours later than scheduled.
Quick downloads
| Data |
File |
Contents |
GitHub Releases |
| GeoIP Lite |
geoip-lite.dat |
Blacklists and whitelists for mainland China, Russia, and Iran, plus IP data for private networks, commonly used services, and more |
dat / dat.gz |
| GeoIP Full |
geoip-full.dat |
All routing data from the Lite edition, plus global IP geolocation data and Anycast IP addresses |
dat / dat.gz |
| GeoSite Standard |
geosite.dat |
Upstream domain categories, plus domain blacklists and whitelists for mainland China, Russia, and Iran |
dat / dat.gz |
| GeoSite Expanded |
geosite-expand.dat |
All categories from the Standard edition, plus domain blacklists and whitelists with broader coverage for mainland China, Russia, and Iran |
dat / dat.gz |
* The GeoIP Lite edition is suitable for basic direct/proxy routing in mainland China, Russia, and Iran.
* The GeoIP Full edition supports more granular routing by destination country, as well as direct/proxy routing needs in other countries and regions.
* Xray releases include GeoIP Lite and GeoSite Standard by default, named geoip.dat and geosite.dat, respectively.
* You can use the Geo Data Viewer to browse categories, search rules, or check which rules match an IP address or domain.
GeoIP Lite vs. Full
| Type |
Category names |
Lite |
Full |
| IP geolocation |
Two-letter country codes (see the table below) |
Not included |
Included |
| Global Anycast addresses |
anycast |
Not included |
Included |
| Region-specific sets (whitelists) |
in-cn, in-ru, in-ir |
Included |
Included |
| Region-specific sets (blacklists) |
blacklist-ru, blacklist-ir |
Included |
Included |
| Private networks and commonly used services |
private, cloudflare, cloudfront, doh, facebook, fastly, google, netflix, telegram, twitter, tor |
Included |
Included |
| Compatibility aliases |
cn → in-cn, ru → in-ru, ir → in-ir |
Available |
Not available |
* Compatibility aliases preserve established community usage and are available only in the Lite edition.
* in-cn contains IP addresses suitable for direct connections from mainland China; it does not imply that these IP addresses are located in mainland China. In the Full edition, cn is strictly based on IP geolocation; the same applies to ru and ir.
For the category design and data sources, see the GeoIP documentation.
Per-category files
If you need only a few categories, download their individual files instead of the larger geoip-full.dat.
For example, you can keep using the Lite edition as geoip.dat and continue to access its in-cn category through geoip:in-cn. Download the U.S. IP category file us.dat into the same directory, then access its us category through ext:us.dat:us.
Per-category DAT files are available in the /geoip/dat/ directory on the release branch.
All countries and territories
The Full edition includes the following 250 country and territory categories.
Expand the full list (sorted by code)
| Code |
Country or territory |
Code |
Country or territory |
Code |
Country or territory |
ad |
Andorra |
ae |
United Arab Emirates |
af |
Afghanistan |
ag |
Antigua and Barbuda |
ai |
Anguilla |
al |
Albania |
am |
Armenia |
ao |
Angola |
aq |
Antarctica |
ar |
Argentina |
as |
American Samoa |
at |
Austria |
au |
Australia |
aw |
Aruba |
ax |
Åland Islands |
az |
Azerbaijan |
ba |
Bosnia and Herzegovina |
bb |
Barbados |
bd |
Bangladesh |
be |
Belgium |
bf |
Burkina Faso |
bg |
Bulgaria |
bh |
Bahrain |
bi |
Burundi |
bj |
Benin |
bl |
Saint Barthélemy |
bm |
Bermuda |
bn |
Brunei |
bo |
Bolivia |
bq |
Caribbean Netherlands |
br |
Brazil |
bs |
Bahamas |
bt |
Bhutan |
bv |
Bouvet Island |
bw |
Botswana |
by |
Belarus |
bz |
Belize |
ca |
Canada |
cc |
Cocos (Keeling) Islands |
cd |
Democratic Republic of the Congo |
cf |
Central African Republic |
cg |
Republic of the Congo |
ch |
Switzerland |
ci |
Côte d’Ivoire |
ck |
Cook Islands |
cl |
Chile |
cm |
Cameroon |
cn |
China |
co |
Colombia |
cr |
Costa Rica |
cu |
Cuba |
cv |
Cape Verde |
cw |
Curaçao |
cx |
Christmas Island |
cy |
Cyprus |
cz |
Czechia |
de |
Germany |
dj |
Djibouti |
dk |
Denmark |
dm |
Dominica |
do |
Dominican Republic |
dz |
Algeria |
ec |
Ecuador |
ee |
Estonia |
eg |
Egypt |
eh |
Western Sahara |
er |
Eritrea |
es |
Spain |
et |
Ethiopia |
fi |
Finland |
fj |
Fiji |
fk |
Falkland Islands |
fm |
Micronesia |
fo |
Faroe Islands |
fr |
France |
ga |
Gabon |
gb |
United Kingdom |
gd |
Grenada |
ge |
Georgia |
gf |
French Guiana |
gg |
Guernsey |
gh |
Ghana |
gi |
Gibraltar |
gl |
Greenland |
gm |
Gambia |
gn |
Guinea |
gp |
Guadeloupe |
gq |
Equatorial Guinea |
gr |
Greece |
gs |
South Georgia and the South Sandwich Islands |
gt |
Guatemala |
gu |
Guam |
gw |
Guinea-Bissau |
gy |
Guyana |
hk |
Hong Kong SAR, China |
hm |
Heard Island and McDonald Islands |
hn |
Honduras |
hr |
Croatia |
ht |
Haiti |
hu |
Hungary |
id |
Indonesia |
ie |
Ireland |
il |
Israel |
im |
Isle of Man |
in |
India |
io |
British Indian Ocean Territory |
iq |
Iraq |
ir |
Iran |
is |
Iceland |
it |
Italy |
je |
Jersey |
jm |
Jamaica |
jo |
Jordan |
jp |
Japan |
ke |
Kenya |
kg |
Kyrgyzstan |
kh |
Cambodia |
ki |
Kiribati |
km |
Comoros |
kn |
Saint Kitts and Nevis |
kp |
North Korea |
kr |
South Korea |
kw |
Kuwait |
ky |
Cayman Islands |
kz |
Kazakhstan |
la |
Laos |
lb |
Lebanon |
lc |
Saint Lucia |
li |
Liechtenstein |
lk |
Sri Lanka |
lr |
Liberia |
ls |
Lesotho |
lt |
Lithuania |
lu |
Luxembourg |
lv |
Latvia |
ly |
Libya |
ma |
Morocco |
mc |
Monaco |
md |
Moldova |
me |
Montenegro |
mf |
Saint Martin (French part) |
mg |
Madagascar |
mh |
Marshall Islands |
mk |
North Macedonia |
ml |
Mali |
mm |
Myanmar |
mn |
Mongolia |
mo |
Macao SAR, China |
mp |
Northern Mariana Islands |
mq |
Martinique |
mr |
Mauritania |
ms |
Montserrat |
mt |
Malta |
mu |
Mauritius |
mv |
Maldives |
mw |
Malawi |
mx |
Mexico |
my |
Malaysia |
mz |
Mozambique |
na |
Namibia |
nc |
New Caledonia |
ne |
Niger |
nf |
Norfolk Island |
ng |
Nigeria |
ni |
Nicaragua |
nl |
Netherlands |
no |
Norway |
np |
Nepal |
nr |
Nauru |
nu |
Niue |
nz |
New Zealand |
om |
Oman |
pa |
Panama |
pe |
Peru |
pf |
French Polynesia |
pg |