mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-01 12:33:53 +01:00
d9686bae92
* Handle conn store in thread safe way * Change log line * Fix proper error handling
22 lines
374 B
Go
22 lines
374 B
Go
//go:build !android
|
|
|
|
package wgproxy
|
|
|
|
import (
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
func NewFactory(wgPort int) *Factory {
|
|
f := &Factory{wgPort: wgPort}
|
|
|
|
ebpfProxy := NewWGEBPFProxy(wgPort)
|
|
err := ebpfProxy.Listen()
|
|
if err != nil {
|
|
log.Warnf("failed to initialize ebpf proxy, fallback to user space proxy: %s", err)
|
|
return f
|
|
}
|
|
|
|
f.ebpfProxy = ebpfProxy
|
|
return f
|
|
}
|