mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-29 11:33:48 +01:00
20 lines
324 B
Go
20 lines
324 B
Go
|
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.Errorf("failed to initialize ebpf proxy: %s", err)
|
||
|
return f
|
||
|
}
|
||
|
|
||
|
f.ebpfProxy = ebpfProxy
|
||
|
return f
|
||
|
}
|