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

routing problem for domains with different IP behaviors #4424

Open
patterniha opened this issue Feb 22, 2025 · 0 comments
Open

routing problem for domains with different IP behaviors #4424

patterniha opened this issue Feb 22, 2025 · 0 comments

Comments

@patterniha
Copy link

patterniha commented Feb 22, 2025

the #4335 issue has become very messy and confusing and many people have misunderstood the problem.
although it was my fault that I couldn't express the problem correctly.

Problem:

assume that built-in-dns return [ip1, ip2] in answer of dns-query for the domain "example.com".
and we want to use ip2 in outbound.

but with the current capabilities of Xray-core this is not possible, even with using features like: loopback, dialerProxy, IPOnDemand, sniffing,...

Application1:

assume that twimg.com return [ip1, ip2]
and ip1 is behind cloudflare and ip2 is behind fastly.
and we have two outbounds: the first is cloudflare-worker(that doesn't support cloudflare ips) and the second is freedom-fragment.

and we want to use worker as much as possible.
so we should choose ip2 and worker-outbound.

Application2:

we have two outbounds: the first is tls-repack-domain-fronting and the second is freedom-fragment: example

cloudflare-ips doesn't support domain-fronting.
but we want to use domain-fronting as much as possible.
so we should choose ip2 and tls-repack outbound.

Suggested solutions:

  1. this
  2. in routing rules we save all matched-things in ctx and then use in outbound
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

1 participant