Use custom stdnet

This commit is contained in:
braginini
2023-04-03 17:37:05 +02:00
parent 79a8109d5e
commit 5d191a8b9d
14 changed files with 103 additions and 40 deletions
+3 -2
View File
@@ -2,6 +2,7 @@ package iface
import (
"github.com/netbirdio/netbird/iface/bind"
"github.com/pion/transport/v2"
"net"
log "github.com/sirupsen/logrus"
@@ -23,12 +24,12 @@ type tunDevice struct {
iceBind *bind.ICEBind
}
func newTunDevice(address WGAddress, mtu int, tunAdapter TunAdapter) *tunDevice {
func newTunDevice(address WGAddress, mtu int, tunAdapter TunAdapter, transportNet transport.Net) *tunDevice {
return &tunDevice{
address: address,
mtu: mtu,
tunAdapter: tunAdapter,
iceBind: &bind.ICEBind{},
iceBind: bind.NewICEBind(transportNet),
}
}