device.go 268 B

12345678910111213141516171819
  1. package device
  2. import (
  3. "github.com/v2fly/v2ray-core/v5/common"
  4. "gvisor.dev/gvisor/pkg/tcpip/stack"
  5. )
  6. type Device interface {
  7. stack.LinkEndpoint
  8. common.Closable
  9. }
  10. type Options struct {
  11. Name string
  12. MTU uint32
  13. }
  14. type NewTUNFunc func(Options) (Device, error)