Add route support
This commit is contained in:
parent
fe89bbded2
commit
56bedd2f05
13 changed files with 631 additions and 18 deletions
16
route_gvisor.go
Normal file
16
route_gvisor.go
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue