feat(wireguard): amneziawg implementation (#3150)

This commit is contained in:
Zhurik
2026-03-11 16:55:28 +03:00
committed by GitHub
parent f4eeffe79a
commit e6fc792f4f
20 changed files with 635 additions and 68 deletions
+28
View File
@@ -0,0 +1,28 @@
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
}