yichya / luci-app-xray

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

How to setup: Bypass All except list of domains #326

Closed MrYadro closed 9 months ago

MrYadro commented 11 months ago

I want to setup my xray proxy routing this way: all traffic is direct but list of domains from dlc.dat I compiled myself is going through proxy.

image

Seems like it should work like that but it doesn't. I even tried to switch Default Ports Policy to Bypass in Transparent Proxy Rules tab. I tried to clear out all of domains in Bypassed domain rules thinking none = every but list in forward.

So I did more digging around from what I found here: https://xtls.github.io/document/level-1/routing-lv1-part2.html#_6-%E9%9C%B8%E4%B8%9A%E5%88%9D%E5%AE%9A-%E8%B7%AF%E7%94%B1%E8%A7%84%E5%88%99%E6%95%B4%E4%BD%93%E5%9B%9E%E9%A1%BE it should be achieved by removing all Bypassed domain rules:

[1-block] (None) --> [2-direct] (None) --> [3-proxy] (List of domains) --> [4-first-outbound] (Other domains)

First outbound is Direct but for some reason other domains still goes through proxy.

Thank you!

KovAlex commented 9 months ago

У вас получилось найти решение? тоже бьюсь над решением.

yichya commented 9 months ago

v3.0.0 Added FakeDNS feature. Disable Transparent proxy in core settings and add domains you want to proxy in FakeDNS tab.

MrYadro commented 9 months ago

So I updated to v3 did what you told me to do.

image

And traffic still bypasses proxy.

image

Did I make some mistakes or I did not understand something? Maybe I need to pass proxy ports anywhere in OpenWrt?

yichya commented 9 months ago

try nslookup notifiarr.com and check if it is correctly resolved to FakeDNS pool addresses (198.18.x.x)

MrYadro commented 9 months ago

LMAO, so what I did I enabled FakeDNS, enabled Transparent Proxy for the same lists, put Xray DNS Server Port into my adguard resolver and everything works now. Is it a right solution - maybe not, but it works, and I'm happy! Thank you!

KovAlex commented 9 months ago

You can show in the screenshots how it is configured?

MrYadro commented 9 months ago

@KovAlex please dm me on telegram t.me/mryadro and I will help you ASAP