Do not use eBPF proxy in case of USP mode (#2180)

This commit is contained in:
Zoltan Papp
2024-06-22 15:33:10 +02:00
committed by GitHub
parent 3cf4d5758f
commit 25723e9b07
4 changed files with 14 additions and 9 deletions

View File

@@ -8,9 +8,13 @@ import (
log "github.com/sirupsen/logrus"
)
func NewFactory(ctx context.Context, wgPort int) *Factory {
func NewFactory(ctx context.Context, userspace bool, wgPort int) *Factory {
f := &Factory{wgPort: wgPort}
if userspace {
return f
}
ebpfProxy := NewWGEBPFProxy(ctx, wgPort)
err := ebpfProxy.listen()
if err != nil {