Add route support

This commit is contained in:
世界 2023-03-21 15:31:43 +08:00
parent fe89bbded2
commit 56bedd2f05
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
13 changed files with 631 additions and 18 deletions

16
route_gvisor.go Normal file
View file

@ -0,0 +1,16 @@
//go:build with_gvisor
package tun
import (
"github.com/sagernet/sing/common/buf"
"gvisor.dev/gvisor/pkg/tcpip/stack"
)
type DirectDestination interface {
WritePacket(buffer *buf.Buffer) error
WritePacketBuffer(buffer *stack.PacketBuffer) error
Close() error
Timeout() bool
}