[client] Remove the replace directives from the embedded client (#8280)

This commit is contained in:
Viktor Liu
2026-10-22 17:39:22 +09:00
committed by GitHub
parent f886f4b06c
commit abf50e3ad4
91 changed files with 418 additions and 343 deletions
+4 -3
View File
@@ -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,
}
+5 -5
View File
@@ -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)