Working single channel bind

This commit is contained in:
braginini
2022-09-05 02:03:16 +02:00
parent f5e974c04c
commit 2ae4c204af
10 changed files with 224 additions and 220 deletions

View File

@@ -12,16 +12,13 @@ import (
"net"
)
func (w *WGIface) createWithUserspaceNew(sharedSock *net.UDPConn) error {
func (w *WGIface) createWithUserspaceNew(bind conn.Bind) error {
tunIface, err := tun.CreateTUN(w.Name, w.MTU)
if err != nil {
return err
}
w.Interface = tunIface
bind := &ICEBind{
conn: sharedSock,
}
// We need to create a wireguard-go device and listen to configuration requests
tunDevice := device.NewDevice(tunIface, bind, device.NewLogger(device.LogLevelSilent, "[wiretrustee] "))