yichya / luci-app-xray

(Almost) full feature Xray client for OpenWrt
Mozilla Public License 2.0
543 stars 317 forks source link

lucy-app-xray: "Forwarded domain rules" doesnt work #396

Closed ashkart closed 4 months ago

ashkart commented 4 months ago

My configs looks like that outbounds: image DNS: image

Rest tabs are default, except general with my xray server.

I only can get it to forward when setting the ports (80, 443). If i remove ports, it turns off any forwarding even if there are domains set in "Forwarded domain rules" on DNS tab.

Generally, i can only get "forward all", or "bypass all".

I expect bypassing all, but those domains i've set in "Forwarded domain rules" field. Am i do something wrong?

yichya commented 4 months ago

For your case use FakeDNS only (do not select any server in General Settings).

Ports policy is applied prior to domain names matching so you also need to change "Default Ports Policy" back to "Forwarded".

ashkart commented 4 months ago

@yichya thanks a lot, it works via fakeDNS like you said.

For those who will find this topic in future.

When i just made those settings it didnt start work in a moment (actually it did, but i couldnt see it). To really chek if it works after every time u change DNS settings you need to flush your operating system's DNS caches (it was unexpected for me that OS keeps caches for browser). For my ubuntu 20.04 i did this command:

sudo systemd-resolve --flush-caches

And its better to test DNS settings changes with firefox browser or somoething like that. Not chromium-based, because it keeps its own caches and it takes pretty long time to make it "understand" that its time to invalidate those caches.