github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/app/tun/device/device.go (about) 1 package device 2 3 import ( 4 "gvisor.dev/gvisor/pkg/tcpip/stack" 5 6 "github.com/v2fly/v2ray-core/v5/common" 7 ) 8 9 //go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen 10 11 type Device interface { 12 stack.LinkEndpoint 13 14 common.Closable 15 } 16 17 type Options struct { 18 Name string 19 MTU uint32 20 } 21 22 type DeviceConstructor func(Options) (Device, error)