[GH-ISSUE #3284] Xray: DNS Amnezia (172.29.172.254) блокируется на сервере новым Xray-core, клиент «подключён», но сайты не открываются #2376

Open
opened 2026-10-15 04:01:09 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @spongegot on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3284

Проблема
Клиент Amnezia (Windows) подключается по Xray (VLESS + Reality, flow xtls-rprx-vision, TCP). Статус «Подключено», но все сайты выдают ERR_TIMED_OUT.

Причина (из лога сервера, loglevel info)
В контейнере amnezia-xray работает Xray 26.7.28. В логе:

app/dispatcher: default route for udp:172.29.172.254:53
proxy/freedom: blocked target: udp:172.29.172.254:53, blackholing connection for 44s

172.29.172.254 это Amnezia DNS внутри docker-сети. Новый freedom outbound блокирует приватные адреса по умолчанию, поэтому все DNS-запросы клиента уходят в чёрную дыру (см. раздел finalRules в документации Xray: https://xtls.github.io/config/outbounds/freedom.html). В server.json от Amnezia единственный outbound это {"protocol": "freedom"} без finalRules.

Возможное решение
Добавить в freedom разрешающее правило для адреса Amnezia DNS:

{"protocol": "freedom", "settings": {"finalRules": [{"action": "allow", "port": "53", "ip": ["172.29.172.254"]}]}}

Конфиг с таким правилом проходит xray run -test. Работу через клиент Amnezia я проверить не смог (мешает другая проблема, см. отдельный issue про fingerprint), так что это предположение, а не подтверждённый фикс.

Окружение

  • Клиент Amnezia: 5.0.3.0
  • ОС клиента: Windows 11 26H2
  • Сервер: Ubuntu 22.04, свой VPS, Docker-контейнер amnezia-xray, Xray 26.7.28

Похожий симптом в обсуждении: https://github.com/amnezia-vpn/amnezia-client/discussions/2172

Originally created by @spongegot on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3284 **Проблема** Клиент Amnezia (Windows) подключается по Xray (VLESS + Reality, flow xtls-rprx-vision, TCP). Статус «Подключено», но все сайты выдают ERR_TIMED_OUT. **Причина (из лога сервера, loglevel info)** В контейнере amnezia-xray работает Xray 26.7.28. В логе: ``` app/dispatcher: default route for udp:172.29.172.254:53 proxy/freedom: blocked target: udp:172.29.172.254:53, blackholing connection for 44s ``` 172.29.172.254 это Amnezia DNS внутри docker-сети. Новый `freedom` outbound блокирует приватные адреса по умолчанию, поэтому все DNS-запросы клиента уходят в чёрную дыру (см. раздел finalRules в документации Xray: https://xtls.github.io/config/outbounds/freedom.html). В server.json от Amnezia единственный outbound это `{"protocol": "freedom"}` без finalRules. **Возможное решение** Добавить в freedom разрешающее правило для адреса Amnezia DNS: ```json {"protocol": "freedom", "settings": {"finalRules": [{"action": "allow", "port": "53", "ip": ["172.29.172.254"]}]}} ``` Конфиг с таким правилом проходит `xray run -test`. Работу через клиент Amnezia я проверить не смог (мешает другая проблема, см. отдельный issue про fingerprint), так что это предположение, а не подтверждённый фикс. **Окружение** - Клиент Amnezia: 5.0.3.0 - ОС клиента: Windows 11 26H2 - Сервер: Ubuntu 22.04, свой VPS, Docker-контейнер amnezia-xray, Xray 26.7.28 Похожий симптом в обсуждении: https://github.com/amnezia-vpn/amnezia-client/discussions/2172
Author
Owner

@sco3 commented on GitHub (Oct 23, 2026):

I can confirm that after these changes

{                  
        "protocol": "freedom",
        "settings": {
            "domainStrategy": "AsIs",
            "finalRules": [
                {
                    "action": "allow",
                    "port": "53",
                    "ip": ["172.29.172.254"]
                }
            ]
        }
    }

One can apply changes with the following commands:

sudo docker exec -it amnezia-xray sh

sed -i 's/"protocol": "freedom"/"protocol": "freedom", "settings": {"domainStrategy": "AsIs", "finalRules": [{"action": "allow", "port": "53", "ip": ["172.29.172.254"]}]}/g' /opt/amnezia/xray/server.json

exit 

sudo docker restart amnezia-xray

Xray works with amnezia dns.

Environment:

Fedora 44
Amnezia 5.0.3.0
Xray 26.7.28

On another VM with Xray 25.8.3 dns works without updating server.json

<!-- gh-comment-id:6367232259 --> @sco3 commented on GitHub (Oct 23, 2026): I can confirm that after these changes ``` { "protocol": "freedom", "settings": { "domainStrategy": "AsIs", "finalRules": [ { "action": "allow", "port": "53", "ip": ["172.29.172.254"] } ] } } ``` One can apply changes with the following commands: ``` sudo docker exec -it amnezia-xray sh sed -i 's/"protocol": "freedom"/"protocol": "freedom", "settings": {"domainStrategy": "AsIs", "finalRules": [{"action": "allow", "port": "53", "ip": ["172.29.172.254"]}]}/g' /opt/amnezia/xray/server.json exit sudo docker restart amnezia-xray ``` Xray works with amnezia dns. Environment: Fedora 44 Amnezia 5.0.3.0 Xray 26.7.28 On another VM with Xray 25.8.3 dns works without updating `server.json`
Sign in to join this conversation.
No labels
pull-request
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
amnezia-vpn/amnezia-client#2376
No description provided.