mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-29 07:49:14 +01:00
[client] Remove the replace directives from the embedded client (#8280)
This commit is contained in:
@@ -5,7 +5,8 @@ import (
|
||||
"net"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
"golang.zx2c4.com/wireguard/tun/netstack"
|
||||
|
||||
"github.com/netbirdio/netbird/client/iface/wgbackend"
|
||||
)
|
||||
|
||||
type Dialer interface {
|
||||
@@ -13,10 +14,10 @@ type Dialer interface {
|
||||
}
|
||||
|
||||
type NSDialer struct {
|
||||
net *netstack.Net
|
||||
net *wgbackend.NetstackNet
|
||||
}
|
||||
|
||||
func NewNSDialer(net *netstack.Net) *NSDialer {
|
||||
func NewNSDialer(net *wgbackend.NetstackNet) *NSDialer {
|
||||
return &NSDialer{
|
||||
net: net,
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"strconv"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
"golang.zx2c4.com/wireguard/tun"
|
||||
"golang.zx2c4.com/wireguard/tun/netstack"
|
||||
|
||||
"github.com/netbirdio/netbird/client/iface/wgbackend"
|
||||
)
|
||||
|
||||
const EnvSkipProxy = "NB_NETSTACK_SKIP_PROXY"
|
||||
@@ -19,7 +19,7 @@ type NetStackTun struct { //nolint:revive
|
||||
listenAddress string
|
||||
|
||||
proxy *Proxy
|
||||
tundev tun.Device
|
||||
tundev wgbackend.TUN
|
||||
}
|
||||
|
||||
func NewNetStackTun(listenAddress string, addresses []netip.Addr, dnsAddress netip.Addr, mtu int) *NetStackTun {
|
||||
@@ -31,8 +31,8 @@ func NewNetStackTun(listenAddress string, addresses []netip.Addr, dnsAddress net
|
||||
}
|
||||
}
|
||||
|
||||
func (t *NetStackTun) Create() (tun.Device, *netstack.Net, error) {
|
||||
nsTunDev, tunNet, err := netstack.CreateNetTUN(
|
||||
func (t *NetStackTun) Create() (wgbackend.TUN, *wgbackend.NetstackNet, error) {
|
||||
nsTunDev, tunNet, err := wgbackend.CreateNetTUN(
|
||||
t.addresses,
|
||||
[]netip.Addr{t.dnsAddress},
|
||||
t.mtu)
|
||||
|
||||
Reference in New Issue
Block a user