[GH-ISSUE #5112] [Bug]: قوانین مسیریابی #3594

Closed
opened 2026-10-31 20:33:34 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @alirezani on GitHub (Jun 9, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5112

Describe the bug

سلام در قسمت قوانین مسیر یابی دامنه ها و ip های ایران را مستقیم نمی کنه

How to reproduce the problem

1

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.3.0

Xray-core version

No response

How did you install 3x-ui?

install.sh script

Operating system

debian 12

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

None

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @alirezani on GitHub (Jun 9, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5112 ### Describe the bug سلام در قسمت قوانین مسیر یابی دامنه ها و ip های ایران را مستقیم نمی کنه ### How to reproduce the problem 1 ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.3.0 ### Xray-core version _No response_ ### How did you install 3x-ui? install.sh script ### Operating system debian 12 ### Which parts of the panel are affected? _No response_ ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? None ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
Author
Owner

@github-actions[bot] commented on GitHub (Jun 9, 2026):

سلام،

مشکل از اینجاست که قوانین مسیریابی ایران در پنل از فایل‌های جداگانه‌ای به نام‌های geoip_IR.dat و geosite_IR.dat استفاده می‌کنند (در قالب ext:geoip_IR.dat:ir و ext:geosite_IR.dat:ir). این فایل‌ها به‌صورت پیش‌فرض هنگام نصب دانلود نمی‌شوند و باید جداگانه دریافت شوند.


راه‌حل

روی سرور دستور زیر را اجرا کنید:

x-ui update-all-geofiles

این دستور فایل‌های geoip_IR.dat و geosite_IR.dat را از مخزن chocolate4u/Iran-v2ray-rules دانلود کرده و Xray را ری‌استارت می‌کند.

یا از منوی مدیریت:

x-ui

سپس گزینه Update Geo files را انتخاب کنید و chocolate4u (geoip_IR.dat, geosite_IR.dat) را برگزینید.


تأیید

بعد از دانلود، بررسی کنید فایل‌ها وجود دارند:

ls -lh /usr/local/x-ui/bin/geoip_IR.dat /usr/local/x-ui/bin/geosite_IR.dat

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


توضیح فنی

قوانینی مثل «ایران - آی‌پی» و «ایران - دامنه» در تنظیمات پایه مسیریابی به این شکل در پیکربندی Xray ثبت می‌شوند:

{ "ip": ["ext:geoip_IR.dat:ir"], "outboundTag": "direct", "type": "field" }
{ "domain": ["ext:geosite_IR.dat:ir"], "outboundTag": "direct", "type": "field" }

Xray این فایل‌ها را در پوشه bin جستجو می‌کند. اگر فایل‌ها وجود نداشته باشند، قانون نادیده گرفته می‌شود و ترافیک مستقیم نمی‌شود.


لطفاً بعد از اجرای دستور نتیجه را اعلام کنید.

<!-- gh-comment-id:4656774166 --> @github-actions[bot] commented on GitHub (Jun 9, 2026): سلام، مشکل از اینجاست که قوانین مسیریابی ایران در پنل از فایل‌های جداگانه‌ای به نام‌های **`geoip_IR.dat`** و **`geosite_IR.dat`** استفاده می‌کنند (در قالب `ext:geoip_IR.dat:ir` و `ext:geosite_IR.dat:ir`). این فایل‌ها **به‌صورت پیش‌فرض هنگام نصب دانلود نمی‌شوند** و باید جداگانه دریافت شوند. --- ## راه‌حل روی سرور دستور زیر را اجرا کنید: ```bash x-ui update-all-geofiles ``` این دستور فایل‌های `geoip_IR.dat` و `geosite_IR.dat` را از مخزن [chocolate4u/Iran-v2ray-rules](https://github.com/chocolate4u/Iran-v2ray-rules) دانلود کرده و Xray را ری‌استارت می‌کند. یا از منوی مدیریت: ```bash x-ui ``` سپس گزینه **Update Geo files** را انتخاب کنید و **chocolate4u (geoip_IR.dat, geosite_IR.dat)** را برگزینید. --- ## تأیید بعد از دانلود، بررسی کنید فایل‌ها وجود دارند: ```bash ls -lh /usr/local/x-ui/bin/geoip_IR.dat /usr/local/x-ui/bin/geosite_IR.dat ``` اگر هر دو فایل نمایش داده شدند، قوانین مسیریابی ایران باید به درستی کار کنند. --- ## توضیح فنی قوانینی مثل «ایران - آی‌پی» و «ایران - دامنه» در تنظیمات پایه مسیریابی به این شکل در پیکربندی Xray ثبت می‌شوند: ```json { "ip": ["ext:geoip_IR.dat:ir"], "outboundTag": "direct", "type": "field" } { "domain": ["ext:geosite_IR.dat:ir"], "outboundTag": "direct", "type": "field" } ``` Xray این فایل‌ها را در پوشه `bin` جستجو می‌کند. اگر فایل‌ها وجود نداشته باشند، قانون نادیده گرفته می‌شود و ترافیک مستقیم نمی‌شود. --- لطفاً بعد از اجرای دستور نتیجه را اعلام کنید.
Author
Owner

@alirezani commented on GitHub (Jun 11, 2026):

تمام مراحله انجام شد ولی جواب نداد
[
{
"type": "field",
"inboundTag": [
"api"
],
"outboundTag": "api"
},
{
"type": "field",
"inboundTag": [
"in-12345-tcpudp"
],
"balancerTag": "USA"
},
{
"type": "field",
"ip": [
"ext:geoip_IR.dat:ir"
],
"outboundTag": "direct"
},
{
"type": "field",
"domain": [
"regexp:.\.xn--mgba3a4f16a$",
"regexp:.
\.ir$",
"ext:geosite_IR.dat:ir"
],
"outboundTag": "direct"
}
]

<!-- gh-comment-id:4682746116 --> @alirezani commented on GitHub (Jun 11, 2026): تمام مراحله انجام شد ولی جواب نداد [ { "type": "field", "inboundTag": [ "api" ], "outboundTag": "api" }, { "type": "field", "inboundTag": [ "in-12345-tcpudp" ], "balancerTag": "USA" }, { "type": "field", "ip": [ "ext:geoip_IR.dat:ir" ], "outboundTag": "direct" }, { "type": "field", "domain": [ "regexp:.*\\.xn--mgba3a4f16a$", "regexp:.*\\.ir$", "ext:geosite_IR.dat:ir" ], "outboundTag": "direct" } ]
Author
Owner

@alirezani commented on GitHub (Jun 11, 2026):

root@VPN:# ls -lh /usr/local/x-ui/bin/geoip_IR.dat /usr/local/x-ui/bin/geosite_IR.dat
-rw-r--r-- 1 root root 18M Jun 10 12:04 /usr/local/x-ui/bin/geoip_IR.dat
-rw-r--r-- 1 root root 7.5M Jun 10 12:04 /usr/local/x-ui/bin/geosite_IR.dat
root@VPN:
#

<!-- gh-comment-id:4682956401 --> @alirezani commented on GitHub (Jun 11, 2026): root@VPN:~# ls -lh /usr/local/x-ui/bin/geoip_IR.dat /usr/local/x-ui/bin/geosite_IR.dat -rw-r--r-- 1 root root 18M Jun 10 12:04 /usr/local/x-ui/bin/geoip_IR.dat -rw-r--r-- 1 root root 7.5M Jun 10 12:04 /usr/local/x-ui/bin/geosite_IR.dat root@VPN:~#
Author
Owner

@majidyahyayimomo commented on GitHub (Jul 25, 2026):

منظورتون از مستقیم میدونید چیه دیگه؟
به این معنی نیست که آیپی سیستم خودتون نمایش بده اگر تو سرور میزنید به معنی اینه که آیپی سرور نمایش داده بشه
چون خودم قبلا درک نادرستی داشتم گفتم شاید 1 درصد احتمال این مشکلو شما هم داشته باشید.

<!-- gh-comment-id:5079140970 --> @majidyahyayimomo commented on GitHub (Jul 25, 2026): منظورتون از مستقیم میدونید چیه دیگه؟ به این معنی نیست که آیپی سیستم خودتون نمایش بده اگر تو سرور میزنید به معنی اینه که آیپی سرور نمایش داده بشه چون خودم قبلا درک نادرستی داشتم گفتم شاید 1 درصد احتمال این مشکلو شما هم داشته باشید.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#3594
No description provided.