mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +00:00
Adjust Trojan & Socks handleUDPPayload
This commit is contained in:
parent
d5aeb6c545
commit
fb0e517158
2 changed files with 22 additions and 12 deletions
|
@ -218,7 +218,8 @@ func (s *Server) handleUDPPayload(ctx context.Context, conn internet.Connection,
|
|||
conn.Write(udpMessage.Bytes())
|
||||
})
|
||||
|
||||
if inbound := session.InboundFromContext(ctx); inbound != nil && inbound.Source.IsValid() {
|
||||
inbound := session.InboundFromContext(ctx)
|
||||
if inbound != nil && inbound.Source.IsValid() {
|
||||
newError("client UDP connection from ", inbound.Source).WriteToLog(session.ExportIDToError(ctx))
|
||||
}
|
||||
|
||||
|
@ -249,7 +250,7 @@ func (s *Server) handleUDPPayload(ctx context.Context, conn internet.Connection,
|
|||
|
||||
currentPacketCtx := ctx
|
||||
newError("send packet to ", destination, " with ", payload.Len(), " bytes").AtDebug().WriteToLog(session.ExportIDToError(ctx))
|
||||
if inbound := session.InboundFromContext(ctx); inbound != nil && inbound.Source.IsValid() {
|
||||
if inbound != nil && inbound.Source.IsValid() {
|
||||
currentPacketCtx = log.ContextWithAccessMessage(ctx, &log.AccessMessage{
|
||||
From: inbound.Source,
|
||||
To: destination,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue