Skip to content

Commit

Permalink
Add log
Browse files Browse the repository at this point in the history
  • Loading branch information
pappz committed Oct 21, 2024
1 parent bf6bf68 commit 9b36694
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/iface/wgproxy/factory_kernel.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ func NewKernelFactory(wgPort int) *KernelFactory {

ebpfProxy := ebpf.NewWGEBPFProxy(wgPort)
if err := ebpfProxy.Listen(); err != nil {
log.Infof("WireGuard Proxy Factory will produce UDP proxy")
log.Warnf("failed to initialize ebpf proxy, fallback to user space proxy: %s", err)
return f
}
log.Infof("WireGuard Proxy Factory will produce eBPF proxy")
f.ebpfProxy = ebpfProxy
return f
}
Expand Down
1 change: 1 addition & 0 deletions client/iface/wgproxy/factory_kernel_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type KernelFactory struct {
}

func NewKernelFactory(wgPort int) *KernelFactory {
log.Infof("WireGuard Proxy Factory will produce UDP proxy")
f := &KernelFactory{
wgPort: wgPort,
}
Expand Down
3 changes: 3 additions & 0 deletions client/iface/wgproxy/factory_usp.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package wgproxy

import (
log "github.com/sirupsen/logrus"

"github.com/netbirdio/netbird/client/iface/bind"
proxyBind "github.com/netbirdio/netbird/client/iface/wgproxy/bind"
)
Expand All @@ -10,6 +12,7 @@ type USPFactory struct {
}

func NewUSPFactory(iceBind *bind.ICEBind) *USPFactory {
log.Infof("WireGuard Proxy Factory will produce bind proxy")
f := &USPFactory{
bind: iceBind,
}
Expand Down

0 comments on commit 9b36694

Please sign in to comment.