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:
@@ -0,0 +1,27 @@
|
||||
package wgbackend
|
||||
|
||||
import "github.com/netbirdio/wireguard-go/conn"
|
||||
|
||||
type (
|
||||
BatchReader = conn.BatchReader
|
||||
Bind = conn.Bind
|
||||
Endpoint = conn.Endpoint
|
||||
ReceiveFunc = conn.ReceiveFunc
|
||||
StdNetBind = conn.StdNetBind
|
||||
StdNetEndpoint = conn.StdNetEndpoint
|
||||
)
|
||||
|
||||
const (
|
||||
IdealBatchSize = conn.IdealBatchSize
|
||||
UdpSegmentMaxDatagrams = conn.UdpSegmentMaxDatagrams
|
||||
)
|
||||
|
||||
var (
|
||||
ControlFns = conn.ControlFns
|
||||
GetGSOSize = conn.GetGSOSize
|
||||
GetSrcFromControl = conn.GetSrcFromControl
|
||||
NewDefaultBind = conn.NewDefaultBind
|
||||
NewStdNetBind = conn.NewStdNetBind
|
||||
NewStdNetBindWithReceiverCreator = conn.NewStdNetBindWithReceiverCreator
|
||||
SplitCoalescedMessages = conn.SplitCoalescedMessages
|
||||
)
|
||||
@@ -0,0 +1,24 @@
|
||||
package wgbackend
|
||||
|
||||
import "github.com/netbirdio/wireguard-go/device"
|
||||
|
||||
type (
|
||||
Device = device.Device
|
||||
NoisePresharedKey = device.NoisePresharedKey
|
||||
NoisePrivateKey = device.NoisePrivateKey
|
||||
NoisePublicKey = device.NoisePublicKey
|
||||
Peer = device.Peer
|
||||
PeerConfig = device.PeerConfig
|
||||
)
|
||||
|
||||
const (
|
||||
LogLevelSilent = device.LogLevelSilent
|
||||
LogLevelVerbose = device.LogLevelVerbose
|
||||
)
|
||||
|
||||
var (
|
||||
NewDevice = device.NewDevice
|
||||
NewLogger = device.NewLogger
|
||||
SetMaxBatchSizeOverride = device.SetMaxBatchSizeOverride
|
||||
SetPreallocatedBuffersPerPool = device.SetPreallocatedBuffersPerPool
|
||||
)
|
||||
@@ -0,0 +1,5 @@
|
||||
// Package wgbackend is the single place in the client's hand-written code that names
|
||||
// the WireGuard implementation. Other packages import it instead of the wireguard-go
|
||||
// packages, so swapping the implementation only touches the aliases here and the
|
||||
// generated mocks.
|
||||
package wgbackend
|
||||
@@ -0,0 +1,10 @@
|
||||
//go:build linux || darwin || freebsd || openbsd
|
||||
|
||||
package wgbackend
|
||||
|
||||
import "github.com/netbirdio/wireguard-go/ipc"
|
||||
|
||||
var (
|
||||
UAPIListen = ipc.UAPIListen
|
||||
UAPIOpen = ipc.UAPIOpen
|
||||
)
|
||||
@@ -0,0 +1,5 @@
|
||||
package wgbackend
|
||||
|
||||
import "github.com/netbirdio/wireguard-go/ipc"
|
||||
|
||||
var UAPIListen = ipc.UAPIListen
|
||||
@@ -0,0 +1,19 @@
|
||||
package wgbackend
|
||||
|
||||
import (
|
||||
"github.com/netbirdio/wireguard-go/tun"
|
||||
"github.com/netbirdio/wireguard-go/tun/netstack"
|
||||
)
|
||||
|
||||
type (
|
||||
// TUN is the packet device the WireGuard device reads from and writes to.
|
||||
TUN = tun.Device
|
||||
// TUNEvent is a status change reported by a TUN.
|
||||
TUNEvent = tun.Event
|
||||
// NetstackNet is the userspace network stack a netstack TUN is attached to.
|
||||
NetstackNet = netstack.Net
|
||||
)
|
||||
|
||||
const TUNEventDown = tun.EventDown
|
||||
|
||||
var CreateNetTUN = netstack.CreateNetTUN
|
||||
@@ -0,0 +1,5 @@
|
||||
package wgbackend
|
||||
|
||||
import "github.com/netbirdio/wireguard-go/tun"
|
||||
|
||||
var CreateUnmonitoredTUNFromFD = tun.CreateUnmonitoredTUNFromFD
|
||||
@@ -0,0 +1,10 @@
|
||||
//go:build linux || darwin || freebsd || openbsd
|
||||
|
||||
package wgbackend
|
||||
|
||||
import "github.com/netbirdio/wireguard-go/tun"
|
||||
|
||||
var (
|
||||
CreateTUN = tun.CreateTUN
|
||||
CreateTUNFromFile = tun.CreateTUNFromFile
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
package wgbackend
|
||||
|
||||
import "github.com/netbirdio/wireguard-go/tun"
|
||||
|
||||
type NativeTUN = tun.NativeTun
|
||||
|
||||
var CreateTUNWithRequestedGUID = tun.CreateTUNWithRequestedGUID
|
||||
Reference in New Issue
Block a user