mirror of https://github.com/XTLS/Xray-core
Sniff: SniffingObject.ignoreClientIp, If the client is requesting a domain name, it can only be overridden to an IPv4 address
parent
685e29bd76
commit
c889b1dcfa
|
@ -293,8 +293,8 @@ func (d *DefaultDispatcher) Dispatch(ctx context.Context, destination net.Destin
|
|||
ob.RouteTarget = destination
|
||||
if sniffingRequest.IgnoreClientIp {
|
||||
ips, err := d.dns.LookupIP(domain, dns.IPOption{
|
||||
IPv4Enable: ob.OriginalTarget.Address.Family().IsIPv4(),
|
||||
IPv6Enable: !ob.OriginalTarget.Address.Family().IsIPv4(),
|
||||
IPv4Enable: ob.OriginalTarget.Address.Family().IsIPv4() || ob.OriginalTarget.Address.Family().IsDomain(),
|
||||
IPv6Enable: ob.OriginalTarget.Address.Family().IsIPv6(),
|
||||
FakeEnable: false,
|
||||
})
|
||||
if len(ips) == 0 || err != nil {
|
||||
|
@ -360,8 +360,8 @@ func (d *DefaultDispatcher) DispatchLink(ctx context.Context, destination net.De
|
|||
ob.RouteTarget = destination
|
||||
if sniffingRequest.IgnoreClientIp {
|
||||
ips, err := d.dns.LookupIP(domain, dns.IPOption{
|
||||
IPv4Enable: ob.OriginalTarget.Address.Family().IsIPv4(),
|
||||
IPv6Enable: !ob.OriginalTarget.Address.Family().IsIPv4(),
|
||||
IPv4Enable: ob.OriginalTarget.Address.Family().IsIPv4() || ob.OriginalTarget.Address.Family().IsDomain(),
|
||||
IPv6Enable: ob.OriginalTarget.Address.Family().IsIPv6(),
|
||||
FakeEnable: false,
|
||||
})
|
||||
if len(ips) == 0 || err != nil {
|
||||
|
|
Loading…
Reference in New Issue