mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-07 04:20:12 +02:00
29 lines
479 B
Go
29 lines
479 B
Go
package wireguard
|
|
|
|
import (
|
|
"net"
|
|
)
|
|
|
|
type tunDevice interface {
|
|
Close() error
|
|
Name() (string, error)
|
|
}
|
|
|
|
type bind interface {
|
|
Close() error
|
|
}
|
|
|
|
type userspaceDevice interface {
|
|
Close()
|
|
Wait() chan struct{}
|
|
IpcHandle(net.Conn)
|
|
IpcSet(string) error
|
|
}
|
|
|
|
type userSpaceBackend struct {
|
|
createTun func(string, int) (tunDevice, error)
|
|
createBind func() bind
|
|
createDevice func(tunDevice, bind, Logger) userspaceDevice
|
|
preStart func(userspaceDevice, Settings) error
|
|
}
|