1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-28 06:46:14 -04:00

Disable routing for platform initialized detour

This commit is contained in:
Shelikhoo 2021-02-28 19:57:57 +00:00
parent 6925870600
commit 9722488fd6
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316

View File

@ -305,19 +305,19 @@ func (d *DefaultDispatcher) routedDispatch(ctx context.Context, link *transport.
common.Interrupt(link.Reader) common.Interrupt(link.Reader)
return return
} }
} } else {
if d.router != nil {
if d.router != nil { if route, err := d.router.PickRoute(routing_session.AsRoutingContext(ctx)); err == nil {
if route, err := d.router.PickRoute(routing_session.AsRoutingContext(ctx)); err == nil { tag := route.GetOutboundTag()
tag := route.GetOutboundTag() if h := d.ohm.GetHandler(tag); h != nil {
if h := d.ohm.GetHandler(tag); h != nil { newError("taking detour [", tag, "] for [", destination, "]").WriteToLog(session.ExportIDToError(ctx))
newError("taking detour [", tag, "] for [", destination, "]").WriteToLog(session.ExportIDToError(ctx)) handler = h
handler = h } else {
newError("non existing tag: ", tag).AtWarning().WriteToLog(session.ExportIDToError(ctx))
}
} else { } else {
newError("non existing tag: ", tag).AtWarning().WriteToLog(session.ExportIDToError(ctx)) newError("default route for ", destination).WriteToLog(session.ExportIDToError(ctx))
} }
} else {
newError("default route for ", destination).WriteToLog(session.ExportIDToError(ctx))
} }
} }