Skip to content

routing is Incapable for domains with different IP behaviors and also routeOnly is restrictive #4335

Open
@patterniha

Description

I use cloudflare worker as a Proxy outbound.(vless-ws)

P0: as you know, you can't connect to cloudflare IPs from cloudflare worker.

some websites like Twitter image: pbs.twimg.com are both behind fastly and cloudflare which means dns query sometimes return an ip that belongs to fastly and sometimes return an ip that belongs to cloudflare.(because Twitter use load balancing)

i use browser-socks5 to connect to xray-core which means socks5-inbound receive hostname directly(without converting to ip).

my goal is use worker as much as possible, so all websites with non-cloudflare-Ips should route to "worker-proxy" and others should route to "other-proxy"(because of P0)

because we have hostname and because we have ip-rules, in routing i should use "IPIfNonMatch/IPOnDemand" domainStrategy.

but suppose the returned ip is an ip behind fastly so pbs.twimg.com is route to worker-proxy.

because we have hostname at the beginning, sniffing and "route-only" has no effect -> we have hostname at outbound.

it means that pbs.twimg.com:443 go through worker-proxy and convert to ip in worker.

but if returned ip of pbs.twimg.com in worker is one of cloudflare IPs the connection fails!!! (because of P0)

///

** even if we use fake-dns --> we have hostname at inbound --> we have hostname at outbound --> This problem occurs again.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions