mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-04 11:18:40 +00:00
refactor: new dns app
This commit is contained in:
parent
4e63c22197
commit
8884e948fe
24 changed files with 1240 additions and 620 deletions
|
@ -309,15 +309,10 @@ func sniffer(ctx context.Context, cReader *cachedReader, metadataOnly bool) (Sni
|
|||
func (d *DefaultDispatcher) routedDispatch(ctx context.Context, link *transport.Link, destination net.Destination) {
|
||||
var handler outbound.Handler
|
||||
|
||||
skipRoutePick := false
|
||||
if content := session.ContentFromContext(ctx); content != nil {
|
||||
skipRoutePick = content.SkipRoutePick
|
||||
}
|
||||
|
||||
routingLink := routing_session.AsRoutingContext(ctx)
|
||||
inTag := routingLink.GetInboundTag()
|
||||
isPickRoute := false
|
||||
if d.router != nil && !skipRoutePick {
|
||||
if d.router != nil {
|
||||
if route, err := d.router.PickRoute(routingLink); err == nil {
|
||||
outTag := route.GetOutboundTag()
|
||||
isPickRoute = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue