wgengine/netstack: add support for custom UDP flow handlers

To be used by tsnet and sniproxy later.

Updates #5871
Updates #1748

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2023-03-05 16:50:20 +00:00
committed by Brad Fitzpatrick
parent 045f995203
commit 9ff51ca17f
3 changed files with 47 additions and 6 deletions

View File

@@ -48,3 +48,9 @@ func (a packetListenerAdapter) ListenPacket(ctx context.Context, network, addres
}
return pc.(PacketConn), nil
}
// ConnPacketConn is the interface that's a superset of net.Conn and net.PacketConn.
type ConnPacketConn interface {
net.Conn
net.PacketConn
}