mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-04-05 04:47:37 +03:00
Update UoT protocol
This commit is contained in:
parent
a3a5185b15
commit
43f31b40ba
16 changed files with 186 additions and 118 deletions
|
@ -589,12 +589,12 @@ func (r *Router) RouteConnection(ctx context.Context, conn net.Conn, metadata ad
|
|||
}
|
||||
metadata.Domain = metadata.Destination.Fqdn
|
||||
metadata.Destination = request.Destination
|
||||
return r.RoutePacketConnection(ctx, uot.NewConn(conn, request.IsConnect, metadata.Destination), metadata)
|
||||
return r.RoutePacketConnection(ctx, uot.NewConn(conn, *request), metadata)
|
||||
case uot.LegacyMagicAddress:
|
||||
r.logger.InfoContext(ctx, "inbound legacy UoT connection")
|
||||
metadata.Domain = metadata.Destination.Fqdn
|
||||
metadata.Destination = M.Socksaddr{Addr: netip.IPv4Unspecified()}
|
||||
return r.RoutePacketConnection(ctx, uot.NewConn(conn, false, metadata.Destination), metadata)
|
||||
return r.RoutePacketConnection(ctx, uot.NewConn(conn, uot.Request{}), metadata)
|
||||
}
|
||||
if metadata.InboundOptions.SniffEnabled {
|
||||
buffer := buf.NewPacket()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue