Fix gvisor icmp destination
This commit is contained in:
parent
8dbb51cfb7
commit
f46791bc0d
6 changed files with 24 additions and 27 deletions
|
|
@ -5,16 +5,9 @@ package tun
|
|||
import (
|
||||
"github.com/sagernet/gvisor/pkg/tcpip"
|
||||
"github.com/sagernet/gvisor/pkg/tcpip/header"
|
||||
stack "github.com/sagernet/gvisor/pkg/tcpip/stack"
|
||||
"github.com/sagernet/sing/common/buf"
|
||||
"github.com/sagernet/gvisor/pkg/tcpip/stack"
|
||||
)
|
||||
|
||||
type DirectRouteDestination interface {
|
||||
WritePacket(packet *buf.Buffer) error
|
||||
WritePacketBuffer(packetBuffer *stack.PacketBuffer) error
|
||||
Close() error
|
||||
}
|
||||
|
||||
func (w *NatWriter) RewritePacketBuffer(packetBuffer *stack.PacketBuffer) {
|
||||
var bindAddr tcpip.Address
|
||||
if packetBuffer.NetworkProtocolNumber == header.IPv4ProtocolNumber {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue