Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to bypass all domains except one? #440

Open
Blabter opened this issue Dec 6, 2024 · 3 comments
Open

How to bypass all domains except one? #440

Blabter opened this issue Dec 6, 2024 · 3 comments

Comments

@Blabter
Copy link

Blabter commented Dec 6, 2024

How to set up luci-app-xray to bypass all domains except myexternalip.com?

In "DNS" tab there is fields "Bypassed domain rules" and "Forwarded domain rules" but since by default all domains are forwarded I'm not sure how to change mode from "Forward all except domains in bypassed domain rules" to "Bypass all except domains in forwarded domain rules".


UPD: I tried to

  1. In "General settings" tab empty following fields:
    "TCP Server (IPv4)"
    "UDP Server (IPv4)"
    "TCP Server (IPv6)"
    "UDP Server (IPv6)"

  2. Create rule in FakeDNS for "domain:myexternalip.com" to force forward traffic into my server.

But nothing changed, traffic for myexternalip.com is still going directly.

@yichya
Copy link
Owner

yichya commented Dec 16, 2024

Try dig myexternalip.com (or nslookup myexternalip.com if you don't have dig installed) and check if it resolves to FakeDNS address pools. For example github.com here resolves to 198.19.70.29 which is in subnet 198.18.0.0/15

image

image

@Blabter
Copy link
Author

Blabter commented Dec 21, 2024

Try dig myexternalip.com (or nslookup myexternalip.com if you don't have dig installed) and check if it resolves to FakeDNS address pools. For example github.com here resolves to 198.19.70.29 which is in subnet 198.18.0.0/15

dig myexternalip.com resolves through FakeDNS and curl myexternalip.com/raw returns VPN ip.

Turns out I'm using software with hardcoded DNS 8.8.8.8 and because of it DNS queries are not resolved properly. Is it possible to route only certain domains through VPN without changing DNS ip?

@yichya
Copy link
Owner

yichya commented Dec 21, 2024

Turns out I'm using software with hardcoded DNS 8.8.8.8 and because of it DNS queries are not resolved properly. Is it possible to route only certain domains through VPN without changing DNS ip?

Try DNS hijacking (in preview app; if not enabled, toggle that in Extra Options)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants